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/CSSRule.h | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'Source/WebCore/css/CSSRule.h') diff --git a/Source/WebCore/css/CSSRule.h b/Source/WebCore/css/CSSRule.h index a80399d16..e52c56319 100644 --- a/Source/WebCore/css/CSSRule.h +++ b/Source/WebCore/css/CSSRule.h @@ -20,18 +20,17 @@ * Boston, MA 02110-1301, USA. */ -#ifndef CSSRule_h -#define CSSRule_h +#pragma once -#include -#include +#include "ExceptionOr.h" +#include namespace WebCore { class CSSStyleSheet; class StyleRuleBase; + struct CSSParserContext; -typedef int ExceptionCode; class CSSRule : public RefCounted { public: @@ -48,25 +47,26 @@ public: // 7 was VARIABLES_RULE; we now match other browsers with 7 as // KEYFRAMES_RULE: // . - WEBKIT_KEYFRAMES_RULE, - WEBKIT_KEYFRAME_RULE, -#if ENABLE(CSS3_CONDITIONAL_RULES) + KEYFRAMES_RULE, + KEYFRAME_RULE, + NAMESPACE_RULE = 10, // Matches other browsers. SUPPORTS_RULE = 12, -#endif #if ENABLE(CSS_DEVICE_ADAPTATION) WEBKIT_VIEWPORT_RULE = 15, #endif #if ENABLE(CSS_REGIONS) WEBKIT_REGION_RULE = 16, #endif -#if ENABLE(SHADOW_DOM) - HOST_RULE = 1001, -#endif + }; + + enum DeprecatedType { + WEBKIT_KEYFRAMES_RULE = 7, + WEBKIT_KEYFRAME_RULE = 8 }; virtual Type type() const = 0; virtual String cssText() const = 0; - virtual void reattach(StyleRuleBase*) = 0; + virtual void reattach(StyleRuleBase&) = 0; void setParentStyleSheet(CSSStyleSheet* styleSheet) { @@ -89,8 +89,7 @@ public: CSSRule* parentRule() const { return m_parentIsRule ? m_parentRule : 0; } - // NOTE: Just calls notImplemented(). - void setCssText(const String&, ExceptionCode&); + WEBCORE_EXPORT ExceptionOr setCssText(const String&); protected: CSSRule(CSSStyleSheet* parent) @@ -117,4 +116,7 @@ private: } // namespace WebCore -#endif // CSSRule_h +#define SPECIALIZE_TYPE_TRAITS_CSS_RULE(ToValueTypeName, predicate) \ +SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::ToValueTypeName) \ + static bool isType(const WebCore::CSSRule& rule) { return rule.type() == WebCore::predicate; } \ +SPECIALIZE_TYPE_TRAITS_END() -- cgit v1.2.1