| Index: Source/core/css/CSSComputedStyleDeclaration.cpp
|
| diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
|
| index 8e2570aaef7a9e927b0d9c8b0ce82ccae20890c7..77d5d0f09d058595c840834218b668dad80a614e 100644
|
| --- a/Source/core/css/CSSComputedStyleDeclaration.cpp
|
| +++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
|
| @@ -412,7 +412,7 @@ inline static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(d
|
| return cssValuePool().createValue(adjustFloatForAbsoluteZoom(value, style), CSSPrimitiveValue::CSS_PX);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword() const
|
| +NullableCSSValue CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword() const
|
| {
|
| if (!m_node)
|
| return nullptr;
|
| @@ -529,7 +529,7 @@ Node* CSSComputedStyleDeclaration::styledNode() const
|
| return m_node.get();
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropertyID propertyID) const
|
| +NullableCSSValue CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropertyID propertyID) const
|
| {
|
| Node* styledNode = this->styledNode();
|
| if (!styledNode)
|
| @@ -565,9 +565,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu
|
| if (!style)
|
| return nullptr;
|
|
|
| - RefPtrWillBeRawPtr<CSSValue> value = ComputedStyleCSSValueMapping::get(propertyID, *style, layoutObject, styledNode, m_allowVisitedStyle);
|
| + NullableCSSValue value = ComputedStyleCSSValueMapping::get(propertyID, *style, layoutObject, styledNode, m_allowVisitedStyle);
|
| if (value)
|
| - return value;
|
| + return *value;
|
|
|
| logUnimplementedPropertyID(propertyID);
|
| return nullptr;
|
| @@ -575,7 +575,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu
|
|
|
| String CSSComputedStyleDeclaration::getPropertyValue(CSSPropertyID propertyID) const
|
| {
|
| - RefPtrWillBeRawPtr<CSSValue> value = getPropertyCSSValue(propertyID);
|
| + NullableCSSValue value = getPropertyCSSValue(propertyID);
|
| if (value)
|
| return value->cssText();
|
| return "";
|
| @@ -597,20 +597,20 @@ String CSSComputedStyleDeclaration::item(unsigned i) const
|
| return getPropertyNameString(computableProperties()[i]);
|
| }
|
|
|
| -bool CSSComputedStyleDeclaration::cssPropertyMatches(CSSPropertyID propertyID, const CSSValue* propertyValue) const
|
| +bool CSSComputedStyleDeclaration::cssPropertyMatches(CSSPropertyID propertyID, const CSSValue propertyValue) const
|
| {
|
| - if (propertyID == CSSPropertyFontSize && propertyValue->isPrimitiveValue() && m_node) {
|
| + if (propertyID == CSSPropertyFontSize && propertyValue.isPrimitiveValue() && m_node) {
|
| m_node->document().updateLayoutIgnorePendingStylesheets();
|
| const ComputedStyle* style = m_node->ensureComputedStyle(m_pseudoElementSpecifier);
|
| if (style && style->fontDescription().keywordSize()) {
|
| CSSValueID sizeValue = cssIdentifierForFontSizeKeyword(style->fontDescription().keywordSize());
|
| - const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(propertyValue);
|
| - if (primitiveValue->isValueID() && primitiveValue->getValueID() == sizeValue)
|
| + const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(propertyValue);
|
| + if (primitiveValue.isValueID() && primitiveValue.getValueID() == sizeValue)
|
| return true;
|
| }
|
| }
|
| - RefPtrWillBeRawPtr<CSSValue> value = getPropertyCSSValue(propertyID);
|
| - return value && propertyValue && value->equals(*propertyValue);
|
| + NullableCSSValue value = getPropertyCSSValue(propertyID);
|
| + return value && value->equals(propertyValue);
|
| }
|
|
|
| PassRefPtrWillBeRawPtr<MutableStylePropertySet> CSSComputedStyleDeclaration::copyProperties() const
|
| @@ -623,9 +623,9 @@ PassRefPtrWillBeRawPtr<MutableStylePropertySet> CSSComputedStyleDeclaration::cop
|
| WillBeHeapVector<CSSProperty, 256> list;
|
| list.reserveInitialCapacity(properties.size());
|
| for (unsigned i = 0; i < properties.size(); ++i) {
|
| - RefPtrWillBeRawPtr<CSSValue> value = getPropertyCSSValue(properties[i]);
|
| + NullableCSSValue value = getPropertyCSSValue(properties[i]);
|
| if (value)
|
| - list.append(CSSProperty(properties[i], value.release(), false));
|
| + list.append(CSSProperty(properties[i], *value, false));
|
| }
|
| return MutableStylePropertySet::create(list.data(), list.size());
|
| }
|
| @@ -671,7 +671,7 @@ String CSSComputedStyleDeclaration::removeProperty(const String& name, Exception
|
| return String();
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValueInternal(CSSPropertyID propertyID)
|
| +NullableCSSValue CSSComputedStyleDeclaration::getPropertyCSSValueInternal(CSSPropertyID propertyID)
|
| {
|
| return getPropertyCSSValue(propertyID);
|
| }
|
|
|