| Index: Source/core/css/StylePropertySerializer.cpp
|
| diff --git a/Source/core/css/StylePropertySerializer.cpp b/Source/core/css/StylePropertySerializer.cpp
|
| index e81a5aead2ebfba3714bcdfac3408d5992ff73bc..5eb0a3fea3fcf5d800f74bf91b700f01e7e06130 100644
|
| --- a/Source/core/css/StylePropertySerializer.cpp
|
| +++ b/Source/core/css/StylePropertySerializer.cpp
|
| @@ -40,16 +40,16 @@ static bool isInitialOrInherit(const String& value)
|
| }
|
|
|
| StylePropertySerializer::StylePropertySetForSerializer::StylePropertySetForSerializer(const StylePropertySet& properties)
|
| - : m_propertySet(properties)
|
| - , m_allIndex(m_propertySet.findPropertyIndex(CSSPropertyAll))
|
| + : m_propertySet(&properties)
|
| + , m_allIndex(m_propertySet->findPropertyIndex(CSSPropertyAll))
|
| , m_needToExpandAll(false)
|
| {
|
| if (!hasAllProperty())
|
| return;
|
|
|
| - StylePropertySet::PropertyReference allProperty = m_propertySet.propertyAt(m_allIndex);
|
| - for (unsigned i = 0; i < m_propertySet.propertyCount(); ++i) {
|
| - StylePropertySet::PropertyReference property = m_propertySet.propertyAt(i);
|
| + StylePropertySet::PropertyReference allProperty = m_propertySet->propertyAt(m_allIndex);
|
| + for (unsigned i = 0; i < m_propertySet->propertyCount(); ++i) {
|
| + StylePropertySet::PropertyReference property = m_propertySet->propertyAt(i);
|
| if (CSSProperty::isAffectedByAllProperty(property.id())) {
|
| if (allProperty.isImportant() && !property.isImportant())
|
| continue;
|
| @@ -64,27 +64,32 @@ StylePropertySerializer::StylePropertySetForSerializer::StylePropertySetForSeria
|
| }
|
| }
|
|
|
| +DEFINE_TRACE(StylePropertySerializer::StylePropertySetForSerializer)
|
| +{
|
| + visitor->trace(m_propertySet);
|
| +}
|
| +
|
| unsigned StylePropertySerializer::StylePropertySetForSerializer::propertyCount() const
|
| {
|
| if (!hasExpandedAllProperty())
|
| - return m_propertySet.propertyCount();
|
| + return m_propertySet->propertyCount();
|
| return lastCSSProperty - firstCSSProperty + 1;
|
| }
|
|
|
| StylePropertySerializer::PropertyValueForSerializer StylePropertySerializer::StylePropertySetForSerializer::propertyAt(unsigned index) const
|
| {
|
| if (!hasExpandedAllProperty())
|
| - return StylePropertySerializer::PropertyValueForSerializer(m_propertySet.propertyAt(index));
|
| + return StylePropertySerializer::PropertyValueForSerializer(m_propertySet->propertyAt(index));
|
|
|
| CSSPropertyID propertyID = static_cast<CSSPropertyID>(index + firstCSSProperty);
|
| ASSERT(firstCSSProperty <= propertyID && propertyID <= lastCSSProperty);
|
| if (m_longhandPropertyUsed.get(index)) {
|
| - int index = m_propertySet.findPropertyIndex(propertyID);
|
| + int index = m_propertySet->findPropertyIndex(propertyID);
|
| ASSERT(index != -1);
|
| - return StylePropertySerializer::PropertyValueForSerializer(m_propertySet.propertyAt(index));
|
| + return StylePropertySerializer::PropertyValueForSerializer(m_propertySet->propertyAt(index));
|
| }
|
|
|
| - StylePropertySet::PropertyReference property = m_propertySet.propertyAt(m_allIndex);
|
| + StylePropertySet::PropertyReference property = m_propertySet->propertyAt(m_allIndex);
|
| return StylePropertySerializer::PropertyValueForSerializer(propertyID, property.value(), property.isImportant());
|
| }
|
|
|
| @@ -97,7 +102,7 @@ bool StylePropertySerializer::StylePropertySetForSerializer::shouldProcessProper
|
| // If all is not expanded, we need to process "all" and properties which
|
| // are not overwritten by "all".
|
| if (!m_needToExpandAll) {
|
| - StylePropertySet::PropertyReference property = m_propertySet.propertyAt(index);
|
| + StylePropertySet::PropertyReference property = m_propertySet->propertyAt(index);
|
| if (property.id() == CSSPropertyAll || !CSSProperty::isAffectedByAllProperty(property.id()))
|
| return true;
|
| return m_longhandPropertyUsed.get(property.id() - firstCSSProperty);
|
| @@ -124,7 +129,7 @@ bool StylePropertySerializer::StylePropertySetForSerializer::shouldProcessProper
|
| int StylePropertySerializer::StylePropertySetForSerializer::findPropertyIndex(CSSPropertyID propertyID) const
|
| {
|
| if (!hasExpandedAllProperty())
|
| - return m_propertySet.findPropertyIndex(propertyID);
|
| + return m_propertySet->findPropertyIndex(propertyID);
|
| return propertyID - firstCSSProperty;
|
| }
|
|
|
| @@ -140,7 +145,7 @@ const CSSValue* StylePropertySerializer::StylePropertySetForSerializer::getPrope
|
| String StylePropertySerializer::StylePropertySetForSerializer::getPropertyValue(CSSPropertyID propertyID) const
|
| {
|
| if (!hasExpandedAllProperty())
|
| - return m_propertySet.getPropertyValue(propertyID);
|
| + return m_propertySet->getPropertyValue(propertyID);
|
|
|
| const CSSValue* value = getPropertyCSSValue(propertyID);
|
| if (!value)
|
|
|