Index: Source/core/css/CSSComputedStyleDeclaration.cpp |
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp |
index df84903ef27a30ab300efc8405dd9e60968ed193..efb9963d1792cab24c422a8205be7a0f940a75da 100644 |
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp |
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp |
@@ -415,7 +415,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; |
@@ -535,7 +535,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) |
@@ -571,9 +571,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; |
@@ -581,7 +581,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 ""; |
@@ -603,20 +603,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 |
@@ -629,9 +629,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()); |
} |
@@ -677,7 +677,7 @@ String CSSComputedStyleDeclaration::removeProperty(const String& name, Exception |
return String(); |
} |
-PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValueInternal(CSSPropertyID propertyID) |
+NullableCSSValue CSSComputedStyleDeclaration::getPropertyCSSValueInternal(CSSPropertyID propertyID) |
{ |
return getPropertyCSSValue(propertyID); |
} |