2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #ifndef DOMCSSClasses_H
27 #define DOMCSSClasses_H
30 #include "DOMCoreClasses.h"
32 #include <WebCore/CSSStyleDeclaration.h>
34 class DOMCSSStyleDeclaration : public DOMObject, public IDOMCSSStyleDeclaration
37 DOMCSSStyleDeclaration(WebCore::CSSStyleDeclaration* d);
38 ~DOMCSSStyleDeclaration();
41 static IDOMCSSStyleDeclaration* createInstance(WebCore::CSSStyleDeclaration* d);
45 virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
46 virtual ULONG STDMETHODCALLTYPE AddRef(void) { return DOMObject::AddRef(); }
47 virtual ULONG STDMETHODCALLTYPE Release(void) { return DOMObject::Release(); }
50 virtual HRESULT STDMETHODCALLTYPE throwException(
51 /* [in] */ BSTR exceptionMessage,
52 /* [retval][out] */ BOOL *result) { return DOMObject::throwException(exceptionMessage, result); }
54 virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod(
56 /* [size_is][in] */ const VARIANT args[ ],
58 /* [retval][out] */ VARIANT *result) { return DOMObject::callWebScriptMethod(name, args, cArgs, result); }
60 virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(
61 /* [in] */ BSTR script,
62 /* [retval][out] */ VARIANT *result) { return DOMObject::evaluateWebScript(script, result); }
64 virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey(
65 /* [in] */ BSTR name) { return DOMObject::removeWebScriptKey(name); }
67 virtual HRESULT STDMETHODCALLTYPE stringRepresentation(
68 /* [retval][out] */ BSTR* stringRepresentation) { return DOMObject::stringRepresentation(stringRepresentation); }
70 virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex(
71 /* [in] */ unsigned int index,
72 /* [retval][out] */ VARIANT *result) { return DOMObject::webScriptValueAtIndex(index, result); }
74 virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex(
75 /* [in] */ unsigned int index,
76 /* [in] */ VARIANT val) { return DOMObject::setWebScriptValueAtIndex(index, val); }
78 virtual HRESULT STDMETHODCALLTYPE setException(
79 /* [in] */ BSTR description) { return DOMObject::setException(description); }
81 // IDOMCSSStyleDeclaration
82 virtual HRESULT STDMETHODCALLTYPE cssText(
83 /* [retval][out] */ BSTR *result);
85 virtual HRESULT STDMETHODCALLTYPE setCssText(
86 /* [in] */ BSTR cssText);
88 virtual HRESULT STDMETHODCALLTYPE getPropertyValue(
89 /* [in] */ BSTR propertyName,
90 /* [retval][out] */ BSTR *result);
92 virtual HRESULT STDMETHODCALLTYPE getPropertyCSSValue(
93 /* [in] */ BSTR propertyName,
94 /* [retval][out] */ IDOMCSSValue **result);
96 virtual HRESULT STDMETHODCALLTYPE removeProperty(
97 /* [in] */ BSTR propertyName,
98 /* [retval][out] */ BSTR *result);
100 virtual HRESULT STDMETHODCALLTYPE getPropertyPriority(
101 /* [in] */ BSTR propertyName,
102 /* [retval][out] */ BSTR *result);
104 virtual HRESULT STDMETHODCALLTYPE setProperty(
105 /* [in] */ BSTR propertyName,
106 /* [in] */ BSTR value,
107 /* [in] */ BSTR priority);
109 virtual HRESULT STDMETHODCALLTYPE length(
110 /* [retval][out] */ UINT *result);
112 virtual HRESULT STDMETHODCALLTYPE item(
113 /* [in] */ UINT index,
114 /* [retval][out] */ BSTR *result);
116 virtual HRESULT STDMETHODCALLTYPE parentRule(
117 /* [retval][out] */ IDOMCSSRule **result);
121 WebCore::CSSStyleDeclaration* m_style;