Index: Source/core/inspector/LayoutEditor.cpp |
diff --git a/Source/core/inspector/LayoutEditor.cpp b/Source/core/inspector/LayoutEditor.cpp |
index e7d46b2534318ac01fee895bf37774c8b97f58a5..81dc8cb7fb42aab04d74d65940af8627fbd0833e 100644 |
--- a/Source/core/inspector/LayoutEditor.cpp |
+++ b/Source/core/inspector/LayoutEditor.cpp |
@@ -6,7 +6,6 @@ |
#include "core/inspector/LayoutEditor.h" |
#include "core/css/CSSComputedStyleDeclaration.h" |
-#include "core/css/CSSPrimitiveValue.h" |
#include "core/frame/FrameView.h" |
#include "core/inspector/InspectorCSSAgent.h" |
#include "core/layout/LayoutBox.h" |
@@ -133,24 +132,24 @@ PassRefPtr<JSONObject> LayoutEditor::buildJSONInfo() const |
return object.release(); |
} |
-RefPtrWillBeRawPtr<CSSPrimitiveValue> LayoutEditor::getPropertyCSSValue(CSSPropertyID property) const |
+NullableCSSValue LayoutEditor::getPropertyCSSValue(CSSPropertyID property) const |
{ |
RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> computedStyleInfo = CSSComputedStyleDeclaration::create(m_node, true); |
- RefPtrWillBeRawPtr<CSSValue> cssValue = computedStyleInfo->getPropertyCSSValue(property); |
- if (!cssValue->isPrimitiveValue()) |
+ NullableCSSValue cssValue = computedStyleInfo->getPropertyCSSValue(property); |
+ if (!cssValue || !cssValue->isPrimitiveValue()) |
return nullptr; |
- return toCSSPrimitiveValue(cssValue.get()); |
+ return cssValue; |
} |
PassRefPtr<JSONObject> LayoutEditor::createValueDescription(const String& propertyName) const |
{ |
- RefPtrWillBeRawPtr<CSSPrimitiveValue> cssValue = getPropertyCSSValue(cssPropertyID(propertyName)); |
+ NullableCSSValue cssValue = getPropertyCSSValue(cssPropertyID(propertyName)); |
if (!cssValue) |
return nullptr; |
RefPtr<JSONObject> object = JSONObject::create(); |
- object->setNumber("value", cssValue->getFloatValue()); |
+ object->setNumber("value", toCSSPrimitiveValue(cssValue)->getFloatValue()); |
object->setString("unit", "px"); |
return object.release(); |
} |
@@ -161,13 +160,13 @@ void LayoutEditor::overlayStartedPropertyChange(const String& anchorName) |
if (!m_node || !m_changingProperty) |
return; |
- RefPtrWillBeRawPtr<CSSPrimitiveValue> cssValue = getPropertyCSSValue(m_changingProperty); |
+ NullableCSSValue cssValue = getPropertyCSSValue(m_changingProperty); |
if (!cssValue) { |
m_changingProperty = CSSPropertyInvalid; |
return; |
} |
- m_propertyInitialValue = cssValue->getFloatValue(); |
+ m_propertyInitialValue = toCSSPrimitiveValue(cssValue)->getFloatValue(); |
} |
void LayoutEditor::overlayPropertyChanged(float cssDelta) |