Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: sky/engine/core/css/PropertySetCSSStyleDeclaration.h

Issue 723253004: Remove tons of OILPAN. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/core/css/Pair.cpp ('k') | sky/engine/core/css/PropertySetCSSStyleDeclaration.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 27 matching lines...) Expand all
38 class Element; 38 class Element;
39 class ExceptionState; 39 class ExceptionState;
40 class MutableStylePropertySet; 40 class MutableStylePropertySet;
41 class StyleSheetContents; 41 class StyleSheetContents;
42 42
43 class AbstractPropertySetCSSStyleDeclaration : public CSSStyleDeclaration { 43 class AbstractPropertySetCSSStyleDeclaration : public CSSStyleDeclaration {
44 public: 44 public:
45 virtual Element* parentElement() const { return 0; } 45 virtual Element* parentElement() const { return 0; }
46 StyleSheetContents* contextStyleSheet() const; 46 StyleSheetContents* contextStyleSheet() const;
47 47
48 virtual void trace(Visitor*) override;
49
50 private: 48 private:
51 virtual CSSRule* parentRule() const override { return 0; } 49 virtual CSSRule* parentRule() const override { return 0; }
52 virtual unsigned length() const override final; 50 virtual unsigned length() const override final;
53 virtual String item(unsigned index) const override final; 51 virtual String item(unsigned index) const override final;
54 virtual PassRefPtr<CSSValue> getPropertyCSSValue(const String& propertyName) override final; 52 virtual PassRefPtr<CSSValue> getPropertyCSSValue(const String& propertyName) override final;
55 virtual String getPropertyValue(const String& propertyName) override final; 53 virtual String getPropertyValue(const String& propertyName) override final;
56 virtual String getPropertyPriority(const String& propertyName) override fina l; 54 virtual String getPropertyPriority(const String& propertyName) override fina l;
57 virtual String getPropertyShorthand(const String& propertyName) override fin al; 55 virtual String getPropertyShorthand(const String& propertyName) override fin al;
58 virtual bool isPropertyImplicit(const String& propertyName) override final; 56 virtual bool isPropertyImplicit(const String& propertyName) override final;
59 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionState&) override final; 57 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionState&) override final;
(...skipping 20 matching lines...) Expand all
80 78
81 class PropertySetCSSStyleDeclaration : public AbstractPropertySetCSSStyleDeclara tion { 79 class PropertySetCSSStyleDeclaration : public AbstractPropertySetCSSStyleDeclara tion {
82 public: 80 public:
83 PropertySetCSSStyleDeclaration(MutableStylePropertySet& propertySet) : m_pro pertySet(&propertySet) { } 81 PropertySetCSSStyleDeclaration(MutableStylePropertySet& propertySet) : m_pro pertySet(&propertySet) { }
84 82
85 #if !ENABLE(OILPAN) 83 #if !ENABLE(OILPAN)
86 virtual void ref() override; 84 virtual void ref() override;
87 virtual void deref() override; 85 virtual void deref() override;
88 #endif 86 #endif
89 87
90 virtual void trace(Visitor*) override;
91
92 protected: 88 protected:
93 virtual MutableStylePropertySet& propertySet() const override final { ASSERT (m_propertySet); return *m_propertySet; } 89 virtual MutableStylePropertySet& propertySet() const override final { ASSERT (m_propertySet); return *m_propertySet; }
94 90
95 RawPtr<MutableStylePropertySet> m_propertySet; // Cannot be null 91 RawPtr<MutableStylePropertySet> m_propertySet; // Cannot be null
96 }; 92 };
97 93
98 class StyleRuleCSSStyleDeclaration final : public PropertySetCSSStyleDeclaration 94 class StyleRuleCSSStyleDeclaration final : public PropertySetCSSStyleDeclaration
99 { 95 {
100 public: 96 public:
101 static PassRefPtr<StyleRuleCSSStyleDeclaration> create(MutableStylePropertyS et& propertySet, CSSRule* parentRule) 97 static PassRefPtr<StyleRuleCSSStyleDeclaration> create(MutableStylePropertyS et& propertySet, CSSRule* parentRule)
102 { 98 {
103 return adoptRef(new StyleRuleCSSStyleDeclaration(propertySet, parentRule )); 99 return adoptRef(new StyleRuleCSSStyleDeclaration(propertySet, parentRule ));
104 } 100 }
105 101
106 #if !ENABLE(OILPAN) 102 #if !ENABLE(OILPAN)
107 void clearParentRule() { m_parentRule = nullptr; } 103 void clearParentRule() { m_parentRule = nullptr; }
108 104
109 virtual void ref() override; 105 virtual void ref() override;
110 virtual void deref() override; 106 virtual void deref() override;
111 #endif 107 #endif
112 108
113 void reattach(MutableStylePropertySet&); 109 void reattach(MutableStylePropertySet&);
114 110
115 virtual void trace(Visitor*) override;
116
117 private: 111 private:
118 StyleRuleCSSStyleDeclaration(MutableStylePropertySet&, CSSRule*); 112 StyleRuleCSSStyleDeclaration(MutableStylePropertySet&, CSSRule*);
119 virtual ~StyleRuleCSSStyleDeclaration(); 113 virtual ~StyleRuleCSSStyleDeclaration();
120 114
121 virtual CSSStyleSheet* parentStyleSheet() const override; 115 virtual CSSStyleSheet* parentStyleSheet() const override;
122 116
123 virtual CSSRule* parentRule() const override { return m_parentRule; } 117 virtual CSSRule* parentRule() const override { return m_parentRule; }
124 118
125 virtual void willMutate() override; 119 virtual void willMutate() override;
126 virtual void didMutate(MutationType) override; 120 virtual void didMutate(MutationType) override;
127 121
128 #if !ENABLE(OILPAN) 122 #if !ENABLE(OILPAN)
129 unsigned m_refCount; 123 unsigned m_refCount;
130 #endif 124 #endif
131 RawPtr<CSSRule> m_parentRule; 125 RawPtr<CSSRule> m_parentRule;
132 }; 126 };
133 127
134 class InlineCSSStyleDeclaration final : public AbstractPropertySetCSSStyleDeclar ation 128 class InlineCSSStyleDeclaration final : public AbstractPropertySetCSSStyleDeclar ation
135 { 129 {
136 public: 130 public:
137 explicit InlineCSSStyleDeclaration(Element* parentElement) 131 explicit InlineCSSStyleDeclaration(Element* parentElement)
138 : m_parentElement(parentElement) 132 : m_parentElement(parentElement)
139 { 133 {
140 } 134 }
141 135
142 virtual void trace(Visitor*) override;
143
144 private: 136 private:
145 virtual MutableStylePropertySet& propertySet() const override; 137 virtual MutableStylePropertySet& propertySet() const override;
146 #if !ENABLE(OILPAN) 138 #if !ENABLE(OILPAN)
147 virtual void ref() override; 139 virtual void ref() override;
148 virtual void deref() override; 140 virtual void deref() override;
149 #endif 141 #endif
150 virtual CSSStyleSheet* parentStyleSheet() const override; 142 virtual CSSStyleSheet* parentStyleSheet() const override;
151 virtual Element* parentElement() const override { return m_parentElement; } 143 virtual Element* parentElement() const override { return m_parentElement; }
152 144
153 virtual void didMutate(MutationType) override; 145 virtual void didMutate(MutationType) override;
154 146
155 RawPtr<Element> m_parentElement; 147 RawPtr<Element> m_parentElement;
156 }; 148 };
157 149
158 } // namespace blink 150 } // namespace blink
159 151
160 #endif 152 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/css/Pair.cpp ('k') | sky/engine/core/css/PropertySetCSSStyleDeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698