Index: Source/core/css/StylePropertySet.h |
diff --git a/Source/core/css/StylePropertySet.h b/Source/core/css/StylePropertySet.h |
index b4b20d0bf68c4c95d83e464a12cad33d4bdf0e41..0716d5b3ae5ed4063f7ad9158e363eeaad44dfad 100644 |
--- a/Source/core/css/StylePropertySet.h |
+++ b/Source/core/css/StylePropertySet.h |
@@ -70,9 +70,8 @@ public: |
bool isInherited() const { return propertyMetadata().m_inherited; } |
bool isImplicit() const { return propertyMetadata().m_implicit; } |
- const CSSValue value() const { return propertyValue(); } |
// FIXME: We should try to remove this mutable overload. |
- CSSValue value() { return propertyValue(); } |
+ const CSSValue& value() { return propertyValue(); } |
// FIXME: Remove this. |
CSSProperty toCSSProperty() const { return CSSProperty(propertyMetadata(), propertyValue()); } |
@@ -80,7 +79,7 @@ public: |
const StylePropertyMetadata& propertyMetadata() const; |
private: |
- const CSSValue propertyValue() const; |
+ const CSSValue& propertyValue() const; |
const StylePropertySet& m_propertySet; |
unsigned m_index; |
@@ -92,7 +91,7 @@ public: |
int findPropertyIndex(CSSPropertyID) const; |
bool hasProperty(CSSPropertyID property) const { return findPropertyIndex(property) != -1; } |
- NullableCSSValue getPropertyCSSValue(CSSPropertyID) const; |
+ const NullableCSSValue getPropertyCSSValue(CSSPropertyID) const; |
String getPropertyValue(CSSPropertyID) const; |
bool propertyIsImportant(CSSPropertyID) const; |
@@ -144,6 +143,7 @@ protected: |
unsigned m_arraySize : 28; |
friend class PropertySetCSSStyleDeclaration; |
+ |
}; |
class CORE_EXPORT ImmutableStylePropertySet : public StylePropertySet { |
@@ -256,7 +256,7 @@ inline const StylePropertyMetadata& StylePropertySet::PropertyReference::propert |
return toImmutableStylePropertySet(m_propertySet).metadataArray()[m_index]; |
} |
-inline const CSSValue StylePropertySet::PropertyReference::propertyValue() const |
+inline const CSSValue& StylePropertySet::PropertyReference::propertyValue() const |
{ |
if (m_propertySet.isMutable()) |
return toMutableStylePropertySet(m_propertySet).m_propertyVector.at(m_index).value(); |