Chromium Code Reviews| Index: Source/core/css/PropertySetCSSStyleDeclaration.h |
| diff --git a/Source/core/css/PropertySetCSSStyleDeclaration.h b/Source/core/css/PropertySetCSSStyleDeclaration.h |
| index ad87376dc9b826cfd0059776146be98acb43361b..bd026cf36be6a7acc1aad0443d599049b3f340a4 100644 |
| --- a/Source/core/css/PropertySetCSSStyleDeclaration.h |
| +++ b/Source/core/css/PropertySetCSSStyleDeclaration.h |
| @@ -46,6 +46,8 @@ public: |
| virtual void clearParentElement() { ASSERT_NOT_REACHED(); } |
| StyleSheetContents* contextStyleSheet() const; |
| + virtual void trace(Visitor*) OVERRIDE; |
| + |
| private: |
| virtual CSSRule* parentRule() const OVERRIDE { return 0; } |
| virtual unsigned length() const OVERRIDE FINAL; |
| @@ -74,37 +76,45 @@ protected: |
| virtual void didMutate(MutationType) { } |
| virtual MutableStylePropertySet& propertySet() const = 0; |
| - OwnPtrWillBePersistent<WillBeHeapHashMap<CSSValue*, RefPtrWillBeMember<CSSValue> > > m_cssomCSSValueClones; |
| + OwnPtrWillBeMember<WillBeHeapHashMap<CSSValue*, RefPtrWillBeMember<CSSValue> > > m_cssomCSSValueClones; |
|
haraken
2014/03/20 11:22:38
Shouldn't this be OwnPtrWillBeMember<WillBeHeapHas
wibling-chromium
2014/03/20 11:59:33
Yes, that would be better. Done.
|
| }; |
| class PropertySetCSSStyleDeclaration : public AbstractPropertySetCSSStyleDeclaration { |
| public: |
| PropertySetCSSStyleDeclaration(MutableStylePropertySet& propertySet) : m_propertySet(&propertySet) { } |
| +#if !ENABLE(OILPAN) |
| virtual void ref() OVERRIDE; |
| virtual void deref() OVERRIDE; |
| +#endif |
| + |
| + virtual void trace(Visitor*) OVERRIDE; |
| protected: |
| virtual MutableStylePropertySet& propertySet() const OVERRIDE FINAL { ASSERT(m_propertySet); return *m_propertySet; } |
| - MutableStylePropertySet* m_propertySet; // Cannot be null |
| + RawPtrWillBeMember<MutableStylePropertySet> m_propertySet; // Cannot be null |
| }; |
| class StyleRuleCSSStyleDeclaration FINAL : public PropertySetCSSStyleDeclaration |
| { |
| public: |
| - static PassRefPtr<StyleRuleCSSStyleDeclaration> create(MutableStylePropertySet& propertySet, CSSRule* parentRule) |
| + static PassRefPtrWillBeRawPtr<StyleRuleCSSStyleDeclaration> create(MutableStylePropertySet& propertySet, CSSRule* parentRule) |
| { |
| - return adoptRef(new StyleRuleCSSStyleDeclaration(propertySet, parentRule)); |
| + return adoptRefWillBeNoop(new StyleRuleCSSStyleDeclaration(propertySet, parentRule)); |
| } |
| - void clearParentRule() { m_parentRule = 0; } |
| +#if !ENABLE(OILPAN) |
| + void clearParentRule() { m_parentRule = nullptr; } |
| virtual void ref() OVERRIDE; |
| virtual void deref() OVERRIDE; |
| +#endif |
| void reattach(MutableStylePropertySet&); |
| + virtual void trace(Visitor*); |
|
haraken
2014/03/20 11:22:38
Add OVERRIDE.
wibling-chromium
2014/03/20 11:59:33
Done.
|
| + |
| private: |
| StyleRuleCSSStyleDeclaration(MutableStylePropertySet&, CSSRule*); |
| virtual ~StyleRuleCSSStyleDeclaration(); |
| @@ -116,8 +126,10 @@ private: |
| virtual void willMutate() OVERRIDE; |
| virtual void didMutate(MutationType) OVERRIDE; |
| +#if !ENABLE(OILPAN) |
| unsigned m_refCount; |
| - CSSRule* m_parentRule; |
| +#endif |
| + RawPtrWillBeMember<CSSRule> m_parentRule; |
| }; |
| class InlineCSSStyleDeclaration FINAL : public AbstractPropertySetCSSStyleDeclaration |
| @@ -128,10 +140,14 @@ public: |
| { |
| } |
| + virtual void trace(Visitor*) OVERRIDE; |
| + |
| private: |
| virtual MutableStylePropertySet& propertySet() const OVERRIDE; |
| +#if !ENABLE(OILPAN) |
| virtual void ref() OVERRIDE; |
| virtual void deref() OVERRIDE; |
| +#endif |
| virtual CSSStyleSheet* parentStyleSheet() const OVERRIDE; |
| virtual Element* parentElement() const OVERRIDE { return m_parentElement; } |
| virtual void clearParentElement() OVERRIDE { m_parentElement = 0; } |