| Index: Source/core/css/StylePropertySet.cpp
|
| diff --git a/Source/core/css/StylePropertySet.cpp b/Source/core/css/StylePropertySet.cpp
|
| index 3d2c8f737a19d8f0daa014857a884dc053040963..49a5923bcf0ed9f110b7bf0eed44bc2b01d6bd5f 100644
|
| --- a/Source/core/css/StylePropertySet.cpp
|
| +++ b/Source/core/css/StylePropertySet.cpp
|
| @@ -81,26 +81,22 @@ ImmutableStylePropertySet::ImmutableStylePropertySet(const CSSProperty* properti
|
| : StylePropertySet(cssParserMode, length)
|
| {
|
| StylePropertyMetadata* metadataArray = const_cast<StylePropertyMetadata*>(this->metadataArray());
|
| - RawPtrWillBeMember<CSSValue>* valueArray = const_cast<RawPtrWillBeMember<CSSValue>*>(this->valueArray());
|
| + RawPtr<CSSValue>* valueArray = const_cast<RawPtr<CSSValue>*>(this->valueArray());
|
| for (unsigned i = 0; i < m_arraySize; ++i) {
|
| metadataArray[i] = properties[i].metadata();
|
| valueArray[i] = properties[i].value();
|
| -#if !ENABLE(OILPAN)
|
| valueArray[i]->ref();
|
| -#endif
|
| }
|
| }
|
|
|
| ImmutableStylePropertySet::~ImmutableStylePropertySet()
|
| {
|
| -#if !ENABLE(OILPAN)
|
| - RawPtrWillBeMember<CSSValue>* valueArray = const_cast<RawPtrWillBeMember<CSSValue>*>(this->valueArray());
|
| + RawPtr<CSSValue>* valueArray = const_cast<RawPtr<CSSValue>*>(this->valueArray());
|
| for (unsigned i = 0; i < m_arraySize; ++i) {
|
| // Checking for nullptr here is a workaround to prevent crashing. http://crbug.com/449032
|
| if (valueArray[i])
|
| valueArray[i]->deref();
|
| }
|
| -#endif
|
| }
|
|
|
| int ImmutableStylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const
|
| @@ -121,9 +117,6 @@ int ImmutableStylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const
|
|
|
| DEFINE_TRACE_AFTER_DISPATCH(ImmutableStylePropertySet)
|
| {
|
| - const RawPtrWillBeMember<CSSValue>* values = valueArray();
|
| - for (unsigned i = 0; i < m_arraySize; i++)
|
| - visitor->trace(values[i]);
|
| StylePropertySet::traceAfterDispatch(visitor);
|
| }
|
|
|
| @@ -141,14 +134,14 @@ MutableStylePropertySet::MutableStylePropertySet(const StylePropertySet& other)
|
|
|
| String StylePropertySet::getPropertyValue(CSSPropertyID propertyID) const
|
| {
|
| - RefPtrWillBeRawPtr<CSSValue> value = getPropertyCSSValue(propertyID);
|
| + RefPtr<CSSValue> value = getPropertyCSSValue(propertyID);
|
| if (value)
|
| return value->cssText();
|
|
|
| return StylePropertySerializer(*this).getPropertyValue(propertyID);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> StylePropertySet::getPropertyCSSValue(CSSPropertyID propertyID) const
|
| +PassRefPtr<CSSValue> StylePropertySet::getPropertyCSSValue(CSSPropertyID propertyID) const
|
| {
|
| int foundPropertyIndex = findPropertyIndex(propertyID);
|
| if (foundPropertyIndex == -1)
|
| @@ -254,7 +247,7 @@ bool MutableStylePropertySet::setProperty(CSSPropertyID unresolvedProperty, cons
|
| return CSSParser::parseValue(this, unresolvedProperty, value, important, cssParserMode(), contextStyleSheet);
|
| }
|
|
|
| -void MutableStylePropertySet::setProperty(CSSPropertyID propertyID, PassRefPtrWillBeRawPtr<CSSValue> prpValue, bool important)
|
| +void MutableStylePropertySet::setProperty(CSSPropertyID propertyID, PassRefPtr<CSSValue> prpValue, bool important)
|
| {
|
| StylePropertyShorthand shorthand = shorthandForProperty(propertyID);
|
| if (!shorthand.length()) {
|
| @@ -264,7 +257,7 @@ void MutableStylePropertySet::setProperty(CSSPropertyID propertyID, PassRefPtrWi
|
|
|
| removePropertiesInSet(shorthand.properties(), shorthand.length());
|
|
|
| - RefPtrWillBeRawPtr<CSSValue> value = prpValue;
|
| + RefPtr<CSSValue> value = prpValue;
|
| for (unsigned i = 0; i < shorthand.length(); ++i)
|
| m_propertyVector.append(CSSProperty(shorthand.properties()[i], value, important));
|
| }
|
| @@ -303,7 +296,7 @@ void MutableStylePropertySet::parseDeclarationList(const String& styleDeclaratio
|
| CSSParser::parseDeclarationList(context, this, styleDeclaration);
|
| }
|
|
|
| -bool MutableStylePropertySet::addParsedProperties(const WillBeHeapVector<CSSProperty, 256>& properties)
|
| +bool MutableStylePropertySet::addParsedProperties(const Vector<CSSProperty, 256>& properties)
|
| {
|
| bool changed = false;
|
| m_propertyVector.reserveCapacity(m_propertyVector.size() + properties.size());
|
| @@ -435,10 +428,10 @@ PassRefPtrWillBeRawPtr<MutableStylePropertySet> StylePropertySet::mutableCopy()
|
|
|
| PassRefPtrWillBeRawPtr<MutableStylePropertySet> StylePropertySet::copyPropertiesInSet(const Vector<CSSPropertyID>& properties) const
|
| {
|
| - WillBeHeapVector<CSSProperty, 256> list;
|
| + Vector<CSSProperty, 256> list;
|
| list.reserveInitialCapacity(properties.size());
|
| for (unsigned i = 0; i < properties.size(); ++i) {
|
| - RefPtrWillBeRawPtr<CSSValue> value = getPropertyCSSValue(properties[i]);
|
| + RefPtr<CSSValue> value = getPropertyCSSValue(properties[i]);
|
| if (value)
|
| list.append(CSSProperty(properties[i], value.release(), false));
|
| }
|
| @@ -484,7 +477,6 @@ DEFINE_TRACE_AFTER_DISPATCH(MutableStylePropertySet)
|
| {
|
| #if ENABLE(OILPAN)
|
| visitor->trace(m_cssomWrapper);
|
| - visitor->trace(m_propertyVector);
|
| #endif
|
| StylePropertySet::traceAfterDispatch(visitor);
|
| }
|
|
|