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

Unified Diff: Source/core/css/PropertySetCSSStyleDeclaration.h

Issue 181783005: Have Element::ensureMutableInlineStyle() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/PageRuleCollector.cpp ('k') | Source/core/css/PropertySetCSSStyleDeclaration.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/PropertySetCSSStyleDeclaration.h
diff --git a/Source/core/css/PropertySetCSSStyleDeclaration.h b/Source/core/css/PropertySetCSSStyleDeclaration.h
index 8c4163142dab336df2d6f403dd9fdee55aa8dd3c..1bc15a95193035c13757eb5e8dc24481c5180ea7 100644
--- a/Source/core/css/PropertySetCSSStyleDeclaration.h
+++ b/Source/core/css/PropertySetCSSStyleDeclaration.h
@@ -72,28 +72,28 @@ protected:
enum MutationType { NoChanges, PropertyChanged };
virtual void willMutate() { }
virtual void didMutate(MutationType) { }
- virtual MutableStylePropertySet* propertySet() const = 0;
+ virtual MutableStylePropertySet& propertySet() const = 0;
OwnPtrWillBePersistent<WillBeHeapHashMap<CSSValue*, RefPtrWillBeMember<CSSValue> > > m_cssomCSSValueClones;
};
class PropertySetCSSStyleDeclaration : public AbstractPropertySetCSSStyleDeclaration {
public:
- PropertySetCSSStyleDeclaration(MutableStylePropertySet* propertySet) : m_propertySet(propertySet) { }
+ PropertySetCSSStyleDeclaration(MutableStylePropertySet& propertySet) : m_propertySet(&propertySet) { }
virtual void ref() OVERRIDE;
virtual void deref() OVERRIDE;
protected:
- virtual MutableStylePropertySet* propertySet() const OVERRIDE FINAL { return m_propertySet; }
+ virtual MutableStylePropertySet& propertySet() const OVERRIDE FINAL { ASSERT(m_propertySet); return *m_propertySet; }
- MutableStylePropertySet* m_propertySet;
+ MutableStylePropertySet* m_propertySet; // Cannot be null
};
class StyleRuleCSSStyleDeclaration FINAL : public PropertySetCSSStyleDeclaration
{
public:
- static PassRefPtr<StyleRuleCSSStyleDeclaration> create(MutableStylePropertySet* propertySet, CSSRule* parentRule)
+ static PassRefPtr<StyleRuleCSSStyleDeclaration> create(MutableStylePropertySet& propertySet, CSSRule* parentRule)
{
return adoptRef(new StyleRuleCSSStyleDeclaration(propertySet, parentRule));
}
@@ -103,10 +103,10 @@ public:
virtual void ref() OVERRIDE;
virtual void deref() OVERRIDE;
- void reattach(MutableStylePropertySet*);
+ void reattach(MutableStylePropertySet&);
private:
- StyleRuleCSSStyleDeclaration(MutableStylePropertySet*, CSSRule*);
+ StyleRuleCSSStyleDeclaration(MutableStylePropertySet&, CSSRule*);
virtual ~StyleRuleCSSStyleDeclaration();
virtual CSSStyleSheet* parentStyleSheet() const OVERRIDE;
@@ -129,7 +129,7 @@ public:
}
private:
- virtual MutableStylePropertySet* propertySet() const OVERRIDE;
+ virtual MutableStylePropertySet& propertySet() const OVERRIDE;
virtual void ref() OVERRIDE;
virtual void deref() OVERRIDE;
virtual CSSStyleSheet* parentStyleSheet() const OVERRIDE;
« no previous file with comments | « Source/core/css/PageRuleCollector.cpp ('k') | Source/core/css/PropertySetCSSStyleDeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698