| Index: Source/core/inspector/InspectorOverlay.cpp
|
| diff --git a/Source/core/inspector/InspectorOverlay.cpp b/Source/core/inspector/InspectorOverlay.cpp
|
| index 8ede7d22ea0c93f336fca63139b8d0acabc1bc26..32016f3b1f56f21c13adb4c2c7a4e42263f4ecd1 100644
|
| --- a/Source/core/inspector/InspectorOverlay.cpp
|
| +++ b/Source/core/inspector/InspectorOverlay.cpp
|
| @@ -315,8 +315,12 @@ static void buildNodeHighlight(Node& node, const HighlightConfig& highlightConfi
|
| if (renderer->node() && renderer->node()->isSVGElement() && !renderer->isSVGRoot()) {
|
| Vector<FloatQuad> quads;
|
| renderer->absoluteQuads(quads);
|
| - for (size_t i = 0; i < quads.size(); ++i)
|
| + FrameView* containingView = renderer->frameView();
|
| + for (size_t i = 0; i < quads.size(); ++i) {
|
| + if (containingView)
|
| + contentsQuadToScreen(containingView, quads[i]);
|
| highlight->appendQuad(quads[i], highlightConfig.content, highlightConfig.contentOutline);
|
| + }
|
| return;
|
| }
|
|
|
| @@ -833,6 +837,26 @@ bool InspectorOverlay::getBoxModel(Node* node, RefPtr<TypeBuilder::DOM::BoxModel
|
| return true;
|
| }
|
|
|
| +PassRefPtr<JSONObject> InspectorOverlay::highlightJSONForNode(Node* node)
|
| +{
|
| + HighlightConfig config;
|
| + config.content = Color(255, 0, 0, 0);
|
| + config.contentOutline = Color(128, 0, 0, 0);
|
| + config.padding = Color(0, 255, 0, 0);
|
| + config.border = Color(0, 0, 255, 0);
|
| + config.margin = Color(255, 255, 255, 0);
|
| + config.eventTarget = Color(128, 128, 128, 0);
|
| + config.shape = Color(0, 0, 0, 0);
|
| + config.shapeMargin = Color(128, 128, 128, 0);
|
| + config.showInfo = true;
|
| + config.showRulers = true;
|
| + config.showExtensionLines = true;
|
| + Highlight highlight;
|
| + appendPathsForShapeOutside(highlight, config, node);
|
| + buildNodeHighlight(*node, config, &highlight);
|
| + return highlight.asJSONObject();
|
| +}
|
| +
|
| void InspectorOverlay::freePage()
|
| {
|
| if (m_overlayPage) {
|
|
|