Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Unified Diff: third_party/WebKit/Source/core/inspector/LayoutEditor.cpp

Issue 2046463003: Resubmission of sashab's patch: Make CSSComputedStyledeclaration::getPropertyCSSValue return const (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing const Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/inspector/LayoutEditor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/LayoutEditor.cpp
diff --git a/third_party/WebKit/Source/core/inspector/LayoutEditor.cpp b/third_party/WebKit/Source/core/inspector/LayoutEditor.cpp
index afda780e205877604f7a09b8324cdf8261e07fa9..470f7d73f949edc19f14b081fa4ae6abd82e961d 100644
--- a/third_party/WebKit/Source/core/inspector/LayoutEditor.cpp
+++ b/third_party/WebKit/Source/core/inspector/LayoutEditor.cpp
@@ -187,20 +187,20 @@ void LayoutEditor::rebuild()
editableSelectorUpdated(false);
}
-CSSPrimitiveValue* LayoutEditor::getPropertyCSSValue(CSSPropertyID property) const
+const CSSPrimitiveValue* LayoutEditor::getPropertyCSSValue(CSSPropertyID property) const
{
CSSStyleDeclaration* style = m_cssAgent->findEffectiveDeclaration(property, m_matchedStyles);
if (!style)
return nullptr;
- CSSValue* cssValue = style->getPropertyCSSValueInternal(property);
+ const CSSValue* cssValue = style->getPropertyCSSValueInternal(property);
if (!cssValue || !cssValue->isPrimitiveValue())
return nullptr;
return toCSSPrimitiveValue(cssValue);
}
-bool LayoutEditor::growInside(String propertyName, CSSPrimitiveValue* value)
+bool LayoutEditor::growInside(String propertyName, const CSSPrimitiveValue* value)
{
FloatQuad content1, padding1, border1, margin1;
InspectorHighlight::buildNodeQuads(m_element.get(), &content1, &padding1, &border1, &margin1);
@@ -254,7 +254,7 @@ bool LayoutEditor::growInside(String propertyName, CSSPrimitiveValue* value)
std::unique_ptr<protocol::DictionaryValue> LayoutEditor::createValueDescription(const String& propertyName)
{
- CSSPrimitiveValue* cssValue = getPropertyCSSValue(cssPropertyID(propertyName));
+ const CSSPrimitiveValue* cssValue = getPropertyCSSValue(cssPropertyID(propertyName));
if (cssValue && !(cssValue->isLength() || cssValue->isPercentage()))
return nullptr;
@@ -284,7 +284,7 @@ void LayoutEditor::overlayStartedPropertyChange(const String& anchorName)
if (!m_changingProperty)
return;
- CSSPrimitiveValue* cssValue = getPropertyCSSValue(m_changingProperty);
+ const CSSPrimitiveValue* cssValue = getPropertyCSSValue(m_changingProperty);
m_valueUnitType = cssValue ? cssValue->typeWithCalcResolved() : CSSPrimitiveValue::UnitType::Pixels;
if (!isMutableUnitType(m_valueUnitType))
return;
« no previous file with comments | « third_party/WebKit/Source/core/inspector/LayoutEditor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698