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

Unified Diff: Source/core/inspector/InspectorCSSAgent.cpp

Issue 1206833003: Devtools[LayoutEditor]: Pass data about property change from InspectorOverlayPage (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix empty line Created 5 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
Index: Source/core/inspector/InspectorCSSAgent.cpp
diff --git a/Source/core/inspector/InspectorCSSAgent.cpp b/Source/core/inspector/InspectorCSSAgent.cpp
index 610d7179d9a2d1f56302de0ef6bacb5787ee9cda..9b28af102997590c7d21a9480378a23c89f6cb57 100644
--- a/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/Source/core/inspector/InspectorCSSAgent.cpp
@@ -1517,6 +1517,16 @@ void InspectorCSSAgent::resetPseudoStates()
document->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::Inspector));
}
+void InspectorCSSAgent::updateCSSProperty(Node* node, CSSPropertyID propertyId, float newValue)
+{
+ Element* element = toElement(node);
+ if (element) {
+ TrackExceptionState exceptionState;
+ String newText = getPropertyNameString(propertyId) + " : " + String::number(newValue) + "px";
+ element->style()->setCSSText(newText, exceptionState);
+ }
+}
+
DEFINE_TRACE(InspectorCSSAgent)
{
visitor->trace(m_domAgent);

Powered by Google App Engine
This is Rietveld 408576698