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

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: 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..343b704914d7fa88f5ccda1ffc77218ef4e96f7b 100644
--- a/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/Source/core/inspector/InspectorCSSAgent.cpp
@@ -54,6 +54,7 @@
#include "core/html/HTMLHeadElement.h"
#include "core/html/VoidCallback.h"
#include "core/inspector/InspectorHistory.h"
+#include "core/inspector/InspectorOverlay.h"
dgozman 2015/06/25 10:10:38 Not used.
sergeyv 2015/06/25 12:19:16 Done.
#include "core/inspector/InspectorPageAgent.h"
#include "core/inspector/InspectorResourceAgent.h"
#include "core/inspector/InspectorResourceContentLoader.h"
@@ -1517,6 +1518,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