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

Side by Side Diff: third_party/WebKit/Source/web/InspectorOverlay.cpp

Issue 1403853002: Devtools: DOM inspection follows inspect cursor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 5 years, 2 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 | « third_party/WebKit/Source/devtools/protocol.json ('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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 685
686 if (!node) 686 if (!node)
687 return true; 687 return true;
688 688
689 Node* eventTarget = event.shiftKey() ? hoveredNodeForEvent(m_webViewImpl->ma inFrameImpl()->frame(), event, false) : nullptr; 689 Node* eventTarget = event.shiftKey() ? hoveredNodeForEvent(m_webViewImpl->ma inFrameImpl()->frame(), event, false) : nullptr;
690 if (eventTarget == node) 690 if (eventTarget == node)
691 eventTarget = nullptr; 691 eventTarget = nullptr;
692 692
693 if (node && m_inspectModeHighlightConfig) { 693 if (node && m_inspectModeHighlightConfig) {
694 m_hoveredNodeForInspectMode = node; 694 m_hoveredNodeForInspectMode = node;
695 m_domAgent->nodeHighlightedInOverlay(node);
695 highlightNode(node, eventTarget, *m_inspectModeHighlightConfig, event.ct rlKey() || event.metaKey()); 696 highlightNode(node, eventTarget, *m_inspectModeHighlightConfig, event.ct rlKey() || event.metaKey());
696 } 697 }
697 return true; 698 return true;
698 } 699 }
699 700
700 bool InspectorOverlay::handleMousePress() 701 bool InspectorOverlay::handleMousePress()
701 { 702 {
702 if (!shouldSearchForNode()) 703 if (!shouldSearchForNode())
703 return false; 704 return false;
704 705
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 754
754 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) 755 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node)
755 { 756 {
756 if (node && node->isElementNode() && m_inspectMode == InspectorDOMAgent::Sho wLayoutEditor && !m_layoutEditor) { 757 if (node && node->isElementNode() && m_inspectMode == InspectorDOMAgent::Sho wLayoutEditor && !m_layoutEditor) {
757 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_dom Agent, &overlayMainFrame()->script()); 758 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_dom Agent, &overlayMainFrame()->script());
758 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverr idden(true); 759 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverr idden(true);
759 } 760 }
760 } 761 }
761 762
762 } // namespace blink 763 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/protocol.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698