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

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: Address pfeldman's comment 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
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.h ('k') | Source/core/inspector/InspectorOverlay.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorCSSAgent.cpp
diff --git a/Source/core/inspector/InspectorCSSAgent.cpp b/Source/core/inspector/InspectorCSSAgent.cpp
index 610d7179d9a2d1f56302de0ef6bacb5787ee9cda..c29f766145e71240adb68a515478719a90500b8a 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::setCSSPropertyValue(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);
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.h ('k') | Source/core/inspector/InspectorOverlay.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698