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

Unified Diff: third_party/WebKit/Source/core/css/CSSProperty.h

Issue 2037973002: Make CSSProperty store a const CSSValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_make_stylepropertyset_use_const
Patch Set: Rebase Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSProperty.h
diff --git a/third_party/WebKit/Source/core/css/CSSProperty.h b/third_party/WebKit/Source/core/css/CSSProperty.h
index fb1dc8832de72d3866ec9efcfeba86c68c1f62fc..1af11dea508561d78de359a6783a630160f859af 100644
--- a/third_party/WebKit/Source/core/css/CSSProperty.h
+++ b/third_party/WebKit/Source/core/css/CSSProperty.h
@@ -58,14 +58,14 @@ struct StylePropertyMetadata {
class CSSProperty {
DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
public:
- CSSProperty(CSSPropertyID propertyID, CSSValue* value, bool important = false, bool isSetFromShorthand = false, int indexInShorthandsVector = 0, bool implicit = false)
+ CSSProperty(CSSPropertyID propertyID, const CSSValue* value, bool important = false, bool isSetFromShorthand = false, int indexInShorthandsVector = 0, bool implicit = false)
: m_metadata(propertyID, isSetFromShorthand, indexInShorthandsVector, important, implicit, CSSPropertyMetadata::isInheritedProperty(propertyID))
, m_value(value)
{
}
// FIXME: Remove this.
- CSSProperty(StylePropertyMetadata metadata, CSSValue* value)
+ CSSProperty(StylePropertyMetadata metadata, const CSSValue* value)
: m_metadata(metadata)
, m_value(value)
{
@@ -76,7 +76,7 @@ public:
CSSPropertyID shorthandID() const { return m_metadata.shorthandID(); }
bool isImportant() const { return m_metadata.m_important; }
- CSSValue* value() const { return m_value.get(); }
+ const CSSValue* value() const { return m_value.get(); }
static CSSPropertyID resolveDirectionAwareProperty(CSSPropertyID, TextDirection, WritingMode);
static bool isAffectedByAllProperty(CSSPropertyID);
@@ -89,7 +89,7 @@ public:
private:
StylePropertyMetadata m_metadata;
- Member<CSSValue> m_value;
+ Member<const CSSValue> m_value;
};
} // namespace blink
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698