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

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

Issue 1153503010: Devtools: Margin resizer in overlay experiment (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
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.cpp ('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/InspectorHighlight.cpp
diff --git a/Source/core/inspector/InspectorHighlight.cpp b/Source/core/inspector/InspectorHighlight.cpp
index 141ce470697d2a65a340439fa60941bda7eee5a5..1062eec741884504fa2ca4ae1aab4f1c80d5bc17 100644
--- a/Source/core/inspector/InspectorHighlight.cpp
+++ b/Source/core/inspector/InspectorHighlight.cpp
@@ -265,6 +265,20 @@ PassRefPtr<JSONObject> buildElementInfo(Element* element)
elementInfo->setString("nodeWidth", String::number(boundingBox->width()));
elementInfo->setString("nodeHeight", String::number(boundingBox->height()));
+ if (layoutObject->isBox()) {
+ LayoutBox* layoutBox = toLayoutBox(layoutObject);
+ int marginLeft = (layoutBox->marginLeft().toInt());
+ printf("bbb1 %d\n", marginLeft);
+ elementInfo->setString("marginLeft", String::number(marginLeft));
+
+ } else {
+ LayoutInline* layoutInline = toLayoutInline(layoutObject);
+ int marginLeft = (layoutInline->marginLeft().toInt());
+ printf("bbb %d\n", marginLeft);
+ elementInfo->setString("marginLeft", String::number(marginLeft));
+ }
+
+
return elementInfo;
}
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.cpp ('k') | Source/core/inspector/InspectorOverlay.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698