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

Side by Side Diff: Source/web/InspectorOverlayImpl.cpp

Issue 1293793008: Devtools: Create a separate mode to turn LayoutEditor on (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address comments Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « Source/devtools/front_end/sdk/DOMModel.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 if (!m_highlightNode) 356 if (!m_highlightNode)
357 return; 357 return;
358 358
359 bool appendElementInfo = m_highlightNode->isElementNode() && !m_omitTooltip && m_nodeHighlightConfig.showInfo && m_highlightNode->layoutObject() && m_highli ghtNode->document().frame(); 359 bool appendElementInfo = m_highlightNode->isElementNode() && !m_omitTooltip && m_nodeHighlightConfig.showInfo && m_highlightNode->layoutObject() && m_highli ghtNode->document().frame();
360 InspectorHighlight highlight(m_highlightNode.get(), m_nodeHighlightConfig, a ppendElementInfo); 360 InspectorHighlight highlight(m_highlightNode.get(), m_nodeHighlightConfig, a ppendElementInfo);
361 if (m_eventTargetNode) 361 if (m_eventTargetNode)
362 highlight.appendEventTargetQuads(m_eventTargetNode.get(), m_nodeHighligh tConfig); 362 highlight.appendEventTargetQuads(m_eventTargetNode.get(), m_nodeHighligh tConfig);
363 363
364 RefPtr<JSONObject> highlightJSON = highlight.asJSONObject(); 364 RefPtr<JSONObject> highlightJSON = highlight.asJSONObject();
365 evaluateInOverlay("drawHighlight", highlightJSON.release()); 365 evaluateInOverlay("drawHighlight", highlightJSON.release());
366 if (m_layoutEditor) { 366 if (m_layoutEditor && m_nodeHighlightConfig.showLayoutEditor) {
367 RefPtr<JSONObject> layoutEditorInfo = m_layoutEditor->buildJSONInfo(); 367 RefPtr<JSONObject> layoutEditorInfo = m_layoutEditor->buildJSONInfo();
368 if (layoutEditorInfo) 368 if (layoutEditorInfo)
369 evaluateInOverlay("showLayoutEditor", layoutEditorInfo.release()); 369 evaluateInOverlay("showLayoutEditor", layoutEditorInfo.release());
370 } 370 }
371 } 371 }
372 372
373 void InspectorOverlayImpl::drawQuadHighlight() 373 void InspectorOverlayImpl::drawQuadHighlight()
374 { 374 {
375 if (!m_highlightQuad) 375 if (!m_highlightQuad)
376 return; 376 return;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 --m_suspendCount; 533 --m_suspendCount;
534 } 534 }
535 535
536 void InspectorOverlayImpl::setLayoutEditor(PassOwnPtrWillBeRawPtr<LayoutEditor> layoutEditor) 536 void InspectorOverlayImpl::setLayoutEditor(PassOwnPtrWillBeRawPtr<LayoutEditor> layoutEditor)
537 { 537 {
538 m_layoutEditor = layoutEditor; 538 m_layoutEditor = layoutEditor;
539 m_overlayHost->setLayoutEditorListener(m_layoutEditor.get()); 539 m_overlayHost->setLayoutEditorListener(m_layoutEditor.get());
540 } 540 }
541 541
542 } // namespace blink 542 } // namespace blink
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/DOMModel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698