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

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

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 5 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/CSSPrimitiveValueMappings.h ('k') | Source/core/css/CSSProperty.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSProperty.h
diff --git a/Source/core/css/CSSProperty.h b/Source/core/css/CSSProperty.h
index e01e3702167994d4607297aa3605999b09b974ed..2a2230055f81dacee3e0a6a7f747c3114efe399d 100644
--- a/Source/core/css/CSSProperty.h
+++ b/Source/core/css/CSSProperty.h
@@ -56,14 +56,14 @@ struct StylePropertyMetadata {
class CSSProperty {
ALLOW_ONLY_INLINE_ALLOCATION();
public:
- CSSProperty(CSSPropertyID propertyID, PassRefPtrWillBeRawPtr<CSSValue> value, bool important = false, bool isSetFromShorthand = false, int indexInShorthandsVector = 0, bool implicit = false)
+ CSSProperty(CSSPropertyID propertyID, 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, CSSValue value)
: m_metadata(metadata)
, m_value(value)
{
@@ -74,7 +74,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; }
static CSSPropertyID resolveDirectionAwareProperty(CSSPropertyID, TextDirection, WritingMode);
static bool isAffectedByAllProperty(CSSPropertyID);
@@ -87,11 +87,12 @@ public:
private:
StylePropertyMetadata m_metadata;
- RefPtrWillBeMember<CSSValue> m_value;
+ CSSValue m_value;
};
} // namespace blink
+// TODO(sashab): Shouldn't initialize CSSProperty with null, since it contains a CSSValue.
WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::CSSProperty);
#endif // CSSProperty_h
« no previous file with comments | « Source/core/css/CSSPrimitiveValueMappings.h ('k') | Source/core/css/CSSProperty.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698