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

Side by Side Diff: third_party/WebKit/Source/core/css/PropertySetCSSStyleDeclaration.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 String getPropertyValue(const String& propertyName) final; 53 String getPropertyValue(const String& propertyName) final;
54 String getPropertyPriority(const String& propertyName) final; 54 String getPropertyPriority(const String& propertyName) final;
55 String getPropertyShorthand(const String& propertyName) final; 55 String getPropertyShorthand(const String& propertyName) final;
56 bool isPropertyImplicit(const String& propertyName) final; 56 bool isPropertyImplicit(const String& propertyName) final;
57 void setProperty(const String& propertyName, const String& value, const Stri ng& priority, ExceptionState&) final; 57 void setProperty(const String& propertyName, const String& value, const Stri ng& priority, ExceptionState&) final;
58 String removeProperty(const String& propertyName, ExceptionState&) final; 58 String removeProperty(const String& propertyName, ExceptionState&) final;
59 String cssFloat() const; 59 String cssFloat() const;
60 void setCSSFloat(const String&, ExceptionState&); 60 void setCSSFloat(const String&, ExceptionState&);
61 String cssText() const final; 61 String cssText() const final;
62 void setCSSText(const String&, ExceptionState&) final; 62 void setCSSText(const String&, ExceptionState&) final;
63 PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) final; 63 RawPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) final;
64 String getPropertyValueInternal(CSSPropertyID) final; 64 String getPropertyValueInternal(CSSPropertyID) final;
65 void setPropertyInternal(CSSPropertyID, const String& customPropertyName, co nst String& value, bool important, ExceptionState&) final; 65 void setPropertyInternal(CSSPropertyID, const String& customPropertyName, co nst String& value, bool important, ExceptionState&) final;
66 66
67 bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const final; 67 bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const final;
68 68
69 protected: 69 protected:
70 enum MutationType { NoChanges, PropertyChanged }; 70 enum MutationType { NoChanges, PropertyChanged };
71 virtual void willMutate() { } 71 virtual void willMutate() { }
72 virtual void didMutate(MutationType) { } 72 virtual void didMutate(MutationType) { }
73 virtual MutableStylePropertySet& propertySet() const = 0; 73 virtual MutableStylePropertySet& propertySet() const = 0;
74 }; 74 };
75 75
76 class PropertySetCSSStyleDeclaration : public AbstractPropertySetCSSStyleDeclara tion { 76 class PropertySetCSSStyleDeclaration : public AbstractPropertySetCSSStyleDeclara tion {
77 public: 77 public:
78 PropertySetCSSStyleDeclaration(MutableStylePropertySet& propertySet) : m_pro pertySet(&propertySet) { } 78 PropertySetCSSStyleDeclaration(MutableStylePropertySet& propertySet) : m_pro pertySet(&propertySet) { }
79 79
80 #if !ENABLE(OILPAN) 80 #if !ENABLE(OILPAN)
81 void ref() override; 81 void ref() override;
82 void deref() override; 82 void deref() override;
83 #endif 83 #endif
84 84
85 DECLARE_VIRTUAL_TRACE(); 85 DECLARE_VIRTUAL_TRACE();
86 86
87 protected: 87 protected:
88 MutableStylePropertySet& propertySet() const final { ASSERT(m_propertySet); return *m_propertySet; } 88 MutableStylePropertySet& propertySet() const final { ASSERT(m_propertySet); return *m_propertySet; }
89 89
90 RawPtrWillBeMember<MutableStylePropertySet> m_propertySet; // Cannot be null 90 Member<MutableStylePropertySet> m_propertySet; // Cannot be null
91 }; 91 };
92 92
93 class StyleRuleCSSStyleDeclaration : public PropertySetCSSStyleDeclaration { 93 class StyleRuleCSSStyleDeclaration : public PropertySetCSSStyleDeclaration {
94 public: 94 public:
95 static PassRefPtrWillBeRawPtr<StyleRuleCSSStyleDeclaration> create(MutableSt ylePropertySet& propertySet, CSSRule* parentRule) 95 static RawPtr<StyleRuleCSSStyleDeclaration> create(MutableStylePropertySet& propertySet, CSSRule* parentRule)
96 { 96 {
97 return adoptRefWillBeNoop(new StyleRuleCSSStyleDeclaration(propertySet, parentRule)); 97 return (new StyleRuleCSSStyleDeclaration(propertySet, parentRule));
98 } 98 }
99 99
100 #if !ENABLE(OILPAN) 100 #if !ENABLE(OILPAN)
101 void clearParentRule() { m_parentRule = nullptr; } 101 void clearParentRule() { m_parentRule = nullptr; }
102 102
103 void ref() override; 103 void ref() override;
104 void deref() override; 104 void deref() override;
105 #endif 105 #endif
106 106
107 void reattach(MutableStylePropertySet&); 107 void reattach(MutableStylePropertySet&);
108 108
109 DECLARE_VIRTUAL_TRACE(); 109 DECLARE_VIRTUAL_TRACE();
110 110
111 protected: 111 protected:
112 StyleRuleCSSStyleDeclaration(MutableStylePropertySet&, CSSRule*); 112 StyleRuleCSSStyleDeclaration(MutableStylePropertySet&, CSSRule*);
113 ~StyleRuleCSSStyleDeclaration() override; 113 ~StyleRuleCSSStyleDeclaration() override;
114 114
115 CSSStyleSheet* parentStyleSheet() const override; 115 CSSStyleSheet* parentStyleSheet() const override;
116 116
117 CSSRule* parentRule() const override { return m_parentRule; } 117 CSSRule* parentRule() const override { return m_parentRule; }
118 118
119 void willMutate() override; 119 void willMutate() override;
120 void didMutate(MutationType) override; 120 void didMutate(MutationType) override;
121 121
122 #if !ENABLE(OILPAN) 122 #if !ENABLE(OILPAN)
123 unsigned m_refCount; 123 unsigned m_refCount;
124 #endif 124 #endif
125 RawPtrWillBeMember<CSSRule> m_parentRule; 125 Member<CSSRule> m_parentRule;
126 }; 126 };
127 127
128 class InlineCSSStyleDeclaration final : public AbstractPropertySetCSSStyleDeclar ation { 128 class InlineCSSStyleDeclaration final : public AbstractPropertySetCSSStyleDeclar ation {
129 public: 129 public:
130 explicit InlineCSSStyleDeclaration(Element* parentElement) 130 explicit InlineCSSStyleDeclaration(Element* parentElement)
131 : m_parentElement(parentElement) 131 : m_parentElement(parentElement)
132 { 132 {
133 } 133 }
134 134
135 DECLARE_VIRTUAL_TRACE(); 135 DECLARE_VIRTUAL_TRACE();
136 136
137 private: 137 private:
138 MutableStylePropertySet& propertySet() const override; 138 MutableStylePropertySet& propertySet() const override;
139 #if !ENABLE(OILPAN) 139 #if !ENABLE(OILPAN)
140 void ref() override; 140 void ref() override;
141 void deref() override; 141 void deref() override;
142 #endif 142 #endif
143 CSSStyleSheet* parentStyleSheet() const override; 143 CSSStyleSheet* parentStyleSheet() const override;
144 Element* parentElement() const override { return m_parentElement; } 144 Element* parentElement() const override { return m_parentElement; }
145 145
146 void didMutate(MutationType) override; 146 void didMutate(MutationType) override;
147 147
148 RawPtrWillBeMember<Element> m_parentElement; 148 Member<Element> m_parentElement;
149 }; 149 };
150 150
151 } // namespace blink 151 } // namespace blink
152 152
153 #endif 153 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698