summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSPropertySourceData.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/CSSPropertySourceData.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/css/CSSPropertySourceData.h')
-rw-r--r--Source/WebCore/css/CSSPropertySourceData.h44
1 files changed, 14 insertions, 30 deletions
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 <utility>
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
@@ -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<CSSStyleSourceData> {
- static PassRefPtr<CSSStyleSourceData> create()
+ static Ref<CSSStyleSourceData> create()
{
- return adoptRef(new CSSStyleSourceData());
+ return adoptRef(*new CSSStyleSourceData);
}
Vector<CSSPropertySourceData> propertyData;
};
struct CSSRuleSourceData;
-typedef Vector<RefPtr<CSSRuleSourceData>> RuleSourceDataList;
+typedef Vector<Ref<CSSRuleSourceData>> RuleSourceDataList;
typedef Vector<SourceRange> SelectorRangeList;
struct CSSRuleSourceData : public RefCounted<CSSRuleSourceData> {
- 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<CSSRuleSourceData> create(Type type)
+ static Ref<CSSRuleSourceData> create(StyleRule::Type type)
{
- return adoptRef(new CSSRuleSourceData(type));
+ return adoptRef(*new CSSRuleSourceData(type));
}
- static PassRefPtr<CSSRuleSourceData> createUnknown()
+ static Ref<CSSRuleSourceData> 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<CSSRuleSourceData> {
};
} // namespace WebCore
-
-#endif // CSSPropertySourceData_h