Chromium Code Reviews| Index: Source/web/InspectorOverlayImpl.cpp |
| diff --git a/Source/web/InspectorOverlayImpl.cpp b/Source/web/InspectorOverlayImpl.cpp |
| index b6599ef8bc0710cba3bebb47971336da5ace567e..ebaefa44066c1078c86e9bff0fdb64c8722b8eab 100644 |
| --- a/Source/web/InspectorOverlayImpl.cpp |
| +++ b/Source/web/InspectorOverlayImpl.cpp |
| @@ -38,6 +38,7 @@ |
| #include "core/frame/Settings.h" |
| #include "core/input/EventHandler.h" |
| #include "core/inspector/InspectorOverlayHost.h" |
| +#include "core/inspector/LayoutWYSIWYGEditor.h" |
| #include "core/loader/EmptyClients.h" |
| #include "core/loader/FrameLoadRequest.h" |
| #include "core/page/ChromeClient.h" |
| @@ -223,6 +224,7 @@ void InspectorOverlayImpl::hideHighlight() |
| m_highlightNode.clear(); |
| m_eventTargetNode.clear(); |
| m_highlightQuad.clear(); |
| + m_layoutWYSIWIGEditor.clear(); |
| update(); |
| } |
| @@ -230,6 +232,8 @@ void InspectorOverlayImpl::highlightNode(Node* node, Node* eventTarget, const In |
| { |
| m_nodeHighlightConfig = highlightConfig; |
| m_highlightNode = node; |
| + if (highlightConfig.showWYSIWYGEditor) |
| + m_layoutWYSIWIGEditor = adoptPtr(new LayoutWYSIWIGEditor(node)); |
|
dgozman
2015/06/23 14:00:30
adoptPtrWillBeNoop
sergeyv
2015/06/23 16:36:53
It's gone now
|
| m_eventTargetNode = eventTarget; |
| m_omitTooltip = omitTooltip; |
| update(); |
| @@ -306,7 +310,14 @@ void InspectorOverlayImpl::drawNodeHighlight() |
| InspectorHighlight highlight(m_highlightNode.get(), m_nodeHighlightConfig, appendElementInfo); |
| if (m_eventTargetNode) |
| highlight.appendEventTargetQuads(m_eventTargetNode.get(), m_nodeHighlightConfig); |
| - evaluateInOverlay("drawHighlight", highlight.asJSONObject()); |
| + |
| + RefPtr<JSONObject> highlightJSON = highlight.asJSONObject(); |
|
dgozman
2015/06/23 14:00:30
nit: two spaces
sergeyv
2015/06/23 16:36:52
Done.
|
| + if (m_layoutWYSIWIGEditor) { |
| + RefPtr<JSONObject> wysiwygInfo = m_layoutWYSIWIGEditor->buildJSONInfo(); |
| + if (wysiwygInfo) |
| + highlightJSON->setObject("wysiwygInfo", wysiwygInfo.release()); |
| + } |
| + evaluateInOverlay("drawHighlight", highlightJSON.release()); |
| } |
| void InspectorOverlayImpl::drawQuadHighlight() |