summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSStyleDeclaration.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/css/CSSStyleDeclaration.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/css/CSSStyleDeclaration.h')
-rw-r--r--Source/WebCore/css/CSSStyleDeclaration.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/Source/WebCore/css/CSSStyleDeclaration.h b/Source/WebCore/css/CSSStyleDeclaration.h
index ad3d8d584..e4e303859 100644
--- a/Source/WebCore/css/CSSStyleDeclaration.h
+++ b/Source/WebCore/css/CSSStyleDeclaration.h
@@ -18,10 +18,11 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef CSSStyleDeclaration_h
-#define CSSStyleDeclaration_h
+#pragma once
#include "CSSPropertyNames.h"
+#include "DeprecatedCSSOMValue.h"
+#include "ExceptionOr.h"
#include "ScriptWrappable.h"
#include <wtf/Forward.h>
@@ -35,8 +36,6 @@ class MutableStyleProperties;
class StyleProperties;
class StyledElement;
-typedef int ExceptionCode;
-
class CSSStyleDeclaration : public ScriptWrappable {
WTF_MAKE_NONCOPYABLE(CSSStyleDeclaration); WTF_MAKE_FAST_ALLOCATED;
public:
@@ -45,34 +44,33 @@ public:
virtual void ref() = 0;
virtual void deref() = 0;
+ virtual StyledElement* parentElement() const { return nullptr; }
virtual CSSRule* parentRule() const = 0;
virtual String cssText() const = 0;
- virtual void setCssText(const String&, ExceptionCode&) = 0;
+ virtual ExceptionOr<void> setCssText(const String&) = 0;
virtual unsigned length() const = 0;
virtual String item(unsigned index) const = 0;
- virtual PassRefPtr<CSSValue> getPropertyCSSValue(const String& propertyName) = 0;
+ virtual RefPtr<DeprecatedCSSOMValue> getPropertyCSSValue(const String& propertyName) = 0;
virtual String getPropertyValue(const String& propertyName) = 0;
virtual String getPropertyPriority(const String& propertyName) = 0;
virtual String getPropertyShorthand(const String& propertyName) = 0;
virtual bool isPropertyImplicit(const String& propertyName) = 0;
- virtual void setProperty(const String& propertyName, const String& value, const String& priority, ExceptionCode&) = 0;
- virtual String removeProperty(const String& propertyName, ExceptionCode&) = 0;
+ virtual ExceptionOr<void> setProperty(const String& propertyName, const String& value, const String& priority) = 0;
+ virtual ExceptionOr<String> removeProperty(const String& propertyName) = 0;
// CSSPropertyID versions of the CSSOM functions to support bindings and editing.
// Use the non-virtual methods in the concrete subclasses when possible.
// The CSSValue returned by this function should not be exposed to the web as it may be used by multiple documents at the same time.
- virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) = 0;
+ virtual RefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) = 0;
virtual String getPropertyValueInternal(CSSPropertyID) = 0;
- virtual void setPropertyInternal(CSSPropertyID, const String& value, bool important, ExceptionCode&) = 0;
+ virtual ExceptionOr<bool> setPropertyInternal(CSSPropertyID, const String& value, bool important) = 0;
- virtual PassRef<MutableStyleProperties> copyProperties() const = 0;
+ virtual Ref<MutableStyleProperties> copyProperties() const = 0;
- virtual CSSStyleSheet* parentStyleSheet() const { return 0; }
+ virtual CSSStyleSheet* parentStyleSheet() const { return nullptr; }
protected:
CSSStyleDeclaration() { }
};
} // namespace WebCore
-
-#endif // CSSStyleDeclaration_h