| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 { | 308 { |
| 309 if (!m_highlightNode) | 309 if (!m_highlightNode) |
| 310 return; | 310 return; |
| 311 | 311 |
| 312 bool appendElementInfo = m_highlightNode->isElementNode() && !m_omitTooltip
&& m_nodeHighlightConfig.showInfo && m_highlightNode->layoutObject() && m_highli
ghtNode->document().frame(); | 312 bool appendElementInfo = m_highlightNode->isElementNode() && !m_omitTooltip
&& m_nodeHighlightConfig.showInfo && m_highlightNode->layoutObject() && m_highli
ghtNode->document().frame(); |
| 313 InspectorHighlight highlight(m_highlightNode.get(), m_nodeHighlightConfig, a
ppendElementInfo); | 313 InspectorHighlight highlight(m_highlightNode.get(), m_nodeHighlightConfig, a
ppendElementInfo); |
| 314 if (m_eventTargetNode) | 314 if (m_eventTargetNode) |
| 315 highlight.appendEventTargetQuads(m_eventTargetNode.get(), m_nodeHighligh
tConfig); | 315 highlight.appendEventTargetQuads(m_eventTargetNode.get(), m_nodeHighligh
tConfig); |
| 316 | 316 |
| 317 RefPtr<JSONObject> highlightJSON = highlight.asJSONObject(); | 317 RefPtr<JSONObject> highlightJSON = highlight.asJSONObject(); |
| 318 evaluateInOverlay("drawHighlight", highlightJSON.release()); |
| 318 if (m_layoutEditor) { | 319 if (m_layoutEditor) { |
| 319 RefPtr<JSONObject> layoutEditorInfo = m_layoutEditor->buildJSONInfo(); | 320 RefPtr<JSONObject> layoutEditorInfo = m_layoutEditor->buildJSONInfo(); |
| 320 if (layoutEditorInfo) | 321 if (layoutEditorInfo) |
| 321 highlightJSON->setObject("layoutEditorInfo", layoutEditorInfo.releas
e()); | 322 evaluateInOverlay("showLayoutEditor", layoutEditorInfo.release()); |
| 322 } | 323 } |
| 323 evaluateInOverlay("drawHighlight", highlightJSON.release()); | |
| 324 } | 324 } |
| 325 | 325 |
| 326 void InspectorOverlayImpl::drawQuadHighlight() | 326 void InspectorOverlayImpl::drawQuadHighlight() |
| 327 { | 327 { |
| 328 if (!m_highlightQuad) | 328 if (!m_highlightQuad) |
| 329 return; | 329 return; |
| 330 | 330 |
| 331 InspectorHighlight highlight; | 331 InspectorHighlight highlight; |
| 332 highlight.appendQuad(*m_highlightQuad, m_quadHighlightConfig.content, m_quad
HighlightConfig.contentOutline); | 332 highlight.appendQuad(*m_highlightQuad, m_quadHighlightConfig.content, m_quad
HighlightConfig.contentOutline); |
| 333 evaluateInOverlay("drawHighlight", highlight.asJSONObject()); | 333 evaluateInOverlay("drawHighlight", highlight.asJSONObject()); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 } | 487 } |
| 488 | 488 |
| 489 void InspectorOverlayImpl::setLayoutEditor(PassOwnPtrWillBeRawPtr<LayoutEditor>
layoutEditor) | 489 void InspectorOverlayImpl::setLayoutEditor(PassOwnPtrWillBeRawPtr<LayoutEditor>
layoutEditor) |
| 490 { | 490 { |
| 491 m_layoutEditor = layoutEditor; | 491 m_layoutEditor = layoutEditor; |
| 492 m_overlayHost->setLayoutEditorListener(m_layoutEditor.get()); | 492 m_overlayHost->setLayoutEditorListener(m_layoutEditor.get()); |
| 493 } | 493 } |
| 494 | 494 |
| 495 | 495 |
| 496 } // namespace blink | 496 } // namespace blink |
| OLD | NEW |