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

Unified Diff: Source/core/css/StyleRule.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/StylePropertySet.cpp ('k') | Source/core/css/StyleRule.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StyleRule.h
diff --git a/Source/core/css/StyleRule.h b/Source/core/css/StyleRule.h
index 3d0663f91088b0801a8f942a0c852a1743bdc9e1..7e9b5e99e18bedd39ed82f5e55e10e15daf11828 100644
--- a/Source/core/css/StyleRule.h
+++ b/Source/core/css/StyleRule.h
@@ -106,8 +106,8 @@ public:
~StyleRule();
const CSSSelectorList& selectorList() const { return m_selectorList; }
- const StylePropertySet* properties() const { return m_properties.get(); }
- MutableStylePropertySet* mutableProperties();
+ const StylePropertySet& properties() const { return *m_properties; }
+ MutableStylePropertySet& mutableProperties();
void parserAdoptSelectorVector(Vector<OwnPtr<CSSParserSelector> >& selectors) { m_selectorList.adoptSelectorVector(selectors); }
void wrapperAdoptSelectorList(CSSSelectorList& selectors) { m_selectorList.adopt(selectors); }
@@ -123,7 +123,7 @@ private:
StyleRule();
StyleRule(const StyleRule&);
- RefPtr<StylePropertySet> m_properties;
+ RefPtr<StylePropertySet> m_properties; // Cannot be null.
CSSSelectorList m_selectorList;
};
@@ -133,8 +133,8 @@ public:
~StyleRuleFontFace();
- const StylePropertySet* properties() const { return m_properties.get(); }
- MutableStylePropertySet* mutableProperties();
+ const StylePropertySet& properties() const { return *m_properties; }
+ MutableStylePropertySet& mutableProperties();
void setProperties(PassRefPtr<StylePropertySet>);
@@ -146,7 +146,7 @@ private:
StyleRuleFontFace();
StyleRuleFontFace(const StyleRuleFontFace&);
- RefPtr<StylePropertySet> m_properties;
+ RefPtr<StylePropertySet> m_properties; // Cannot be null.
};
class StyleRulePage : public StyleRuleBase {
@@ -156,8 +156,8 @@ public:
~StyleRulePage();
const CSSSelector* selector() const { return m_selectorList.first(); }
- const StylePropertySet* properties() const { return m_properties.get(); }
- MutableStylePropertySet* mutableProperties();
+ const StylePropertySet& properties() const { return *m_properties; }
+ MutableStylePropertySet& mutableProperties();
void parserAdoptSelectorVector(Vector<OwnPtr<CSSParserSelector> >& selectors) { m_selectorList.adoptSelectorVector(selectors); }
void wrapperAdoptSelectorList(CSSSelectorList& selectors) { m_selectorList.adopt(selectors); }
@@ -171,7 +171,7 @@ private:
StyleRulePage();
StyleRulePage(const StyleRulePage&);
- RefPtr<StylePropertySet> m_properties;
+ RefPtr<StylePropertySet> m_properties; // Cannot be null.
CSSSelectorList m_selectorList;
};
@@ -239,8 +239,8 @@ public:
~StyleRuleViewport();
- const StylePropertySet* properties() const { return m_properties.get(); }
- MutableStylePropertySet* mutableProperties();
+ const StylePropertySet& properties() const { return *m_properties; }
+ MutableStylePropertySet& mutableProperties();
void setProperties(PassRefPtr<StylePropertySet>);
@@ -252,7 +252,7 @@ private:
StyleRuleViewport();
StyleRuleViewport(const StyleRuleViewport&);
- RefPtr<StylePropertySet> m_properties;
+ RefPtr<StylePropertySet> m_properties; // Cannot be null
};
class StyleRuleFilter : public StyleRuleBase {
@@ -263,8 +263,8 @@ public:
const String& filterName() const { return m_filterName; }
- const StylePropertySet* properties() const { return m_properties.get(); }
- MutableStylePropertySet* mutableProperties();
+ const StylePropertySet& properties() const { return *m_properties; }
+ MutableStylePropertySet& mutableProperties();
void setProperties(PassRefPtr<StylePropertySet>);
« no previous file with comments | « Source/core/css/StylePropertySet.cpp ('k') | Source/core/css/StyleRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698