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/CSSPropertySourceData.h | 44 ++++++++++-------------------- 1 file changed, 14 insertions(+), 30 deletions(-) (limited to 'Source/WebCore/css/CSSPropertySourceData.h') diff --git a/Source/WebCore/css/CSSPropertySourceData.h b/Source/WebCore/css/CSSPropertySourceData.h index c995a00da..02a201df2 100644 --- a/Source/WebCore/css/CSSPropertySourceData.h +++ b/Source/WebCore/css/CSSPropertySourceData.h @@ -28,9 +28,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef CSSPropertySourceData_h -#define CSSPropertySourceData_h +#pragma once +#include "StyleRule.h" #include #include #include @@ -52,7 +52,7 @@ struct SourceRange { }; struct CSSPropertySourceData { - CSSPropertySourceData(const String& name, const String& value, bool important, bool parsedOk, const SourceRange& range); + CSSPropertySourceData(const String& name, const String& value, bool important, bool disabled, bool parsedOk, const SourceRange&); CSSPropertySourceData(const CSSPropertySourceData& other); CSSPropertySourceData(); @@ -62,57 +62,43 @@ struct CSSPropertySourceData { String name; String value; bool important; + bool disabled; bool parsedOk; SourceRange range; }; struct CSSStyleSourceData : public RefCounted { - static PassRefPtr create() + static Ref create() { - return adoptRef(new CSSStyleSourceData()); + return adoptRef(*new CSSStyleSourceData); } Vector propertyData; }; struct CSSRuleSourceData; -typedef Vector> RuleSourceDataList; +typedef Vector> RuleSourceDataList; typedef Vector SelectorRangeList; struct CSSRuleSourceData : public RefCounted { - enum Type { - UNKNOWN_RULE, - STYLE_RULE, - CHARSET_RULE, - IMPORT_RULE, - MEDIA_RULE, - FONT_FACE_RULE, - PAGE_RULE, - KEYFRAMES_RULE, - REGION_RULE, - HOST_RULE, - VIEWPORT_RULE, - SUPPORTS_RULE, - }; - - static PassRefPtr create(Type type) + static Ref create(StyleRule::Type type) { - return adoptRef(new CSSRuleSourceData(type)); + return adoptRef(*new CSSRuleSourceData(type)); } - static PassRefPtr createUnknown() + static Ref createUnknown() { - return adoptRef(new CSSRuleSourceData(UNKNOWN_RULE)); + return adoptRef(*new CSSRuleSourceData(StyleRule::Unknown)); } - CSSRuleSourceData(Type type) + CSSRuleSourceData(StyleRule::Type type) : type(type) { - if (type == STYLE_RULE || type == FONT_FACE_RULE || type == PAGE_RULE) + if (type == StyleRule::Style || type == StyleRule::FontFace || type == StyleRule::Page) styleSourceData = CSSStyleSourceData::create(); } - Type type; + StyleRule::Type type; // Range of the selector list in the enclosing source. SourceRange ruleHeaderRange; @@ -131,5 +117,3 @@ struct CSSRuleSourceData : public RefCounted { }; } // namespace WebCore - -#endif // CSSPropertySourceData_h -- cgit v1.2.1