From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/css/CSSStyleDeclaration.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'Source/WebCore/css/CSSStyleDeclaration.h') 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 @@ -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 setCssText(const String&) = 0; virtual unsigned length() const = 0; virtual String item(unsigned index) const = 0; - virtual PassRefPtr getPropertyCSSValue(const String& propertyName) = 0; + virtual RefPtr 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 setProperty(const String& propertyName, const String& value, const String& priority) = 0; + virtual ExceptionOr 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 getPropertyCSSValueInternal(CSSPropertyID) = 0; + virtual RefPtr getPropertyCSSValueInternal(CSSPropertyID) = 0; virtual String getPropertyValueInternal(CSSPropertyID) = 0; - virtual void setPropertyInternal(CSSPropertyID, const String& value, bool important, ExceptionCode&) = 0; + virtual ExceptionOr setPropertyInternal(CSSPropertyID, const String& value, bool important) = 0; - virtual PassRef copyProperties() const = 0; + virtual Ref copyProperties() const = 0; - virtual CSSStyleSheet* parentStyleSheet() const { return 0; } + virtual CSSStyleSheet* parentStyleSheet() const { return nullptr; } protected: CSSStyleDeclaration() { } }; } // namespace WebCore - -#endif // CSSStyleDeclaration_h -- cgit v1.2.1