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

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

Issue 1382593004: Allow out-of-process iframes to update the mouse cursor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improved feng shui 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
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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 return adoptPtrWillBeNoop(new InspectorOverlayChromeClient(client, overl ay)); 130 return adoptPtrWillBeNoop(new InspectorOverlayChromeClient(client, overl ay));
131 } 131 }
132 132
133 DEFINE_INLINE_VIRTUAL_TRACE() 133 DEFINE_INLINE_VIRTUAL_TRACE()
134 { 134 {
135 visitor->trace(m_client); 135 visitor->trace(m_client);
136 visitor->trace(m_overlay); 136 visitor->trace(m_overlay);
137 EmptyChromeClient::trace(visitor); 137 EmptyChromeClient::trace(visitor);
138 } 138 }
139 139
140 void setCursor(const Cursor& cursor) override 140 void setCursor(const Cursor& cursor, LocalFrame* localRoot) override
141 { 141 {
142 toChromeClientImpl(m_client)->setCursorOverridden(false); 142 toChromeClientImpl(m_client)->setCursorOverridden(false);
143 toChromeClientImpl(m_client)->setCursor(cursor); 143 toChromeClientImpl(m_client)->setCursor(cursor, localRoot);
144 bool overrideCursor = m_overlay->m_layoutEditor; 144 bool overrideCursor = m_overlay->m_layoutEditor;
145 toChromeClientImpl(m_client)->setCursorOverridden(overrideCursor); 145 toChromeClientImpl(m_client)->setCursorOverridden(overrideCursor);
146 } 146 }
147 147
148 void setToolTip(const String& tooltip, TextDirection direction) override 148 void setToolTip(const String& tooltip, TextDirection direction) override
149 { 149 {
150 m_client->setToolTip(tooltip, direction); 150 m_client->setToolTip(tooltip, direction);
151 } 151 }
152 152
153 void invalidateRect(const IntRect&) override 153 void invalidateRect(const IntRect&) override
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 617
618 if (m_layoutEditor) { 618 if (m_layoutEditor) {
619 m_layoutEditor->dispose(); 619 m_layoutEditor->dispose();
620 m_layoutEditor.clear(); 620 m_layoutEditor.clear();
621 } 621 }
622 622
623 if (m_inspectModeHighlightConfig) 623 if (m_inspectModeHighlightConfig)
624 highlightNode(m_hoveredNodeForInspectMode.get(), *m_inspectModeHighlight Config, false); 624 highlightNode(m_hoveredNodeForInspectMode.get(), *m_inspectModeHighlight Config, false);
625 625
626 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(false); 626 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(false);
627 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursor(pointerC ursor()); 627 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursor(pointerC ursor(), overlayMainFrame());
628 } 628 }
629 629
630 void InspectorOverlay::profilingStarted() 630 void InspectorOverlay::profilingStarted()
631 { 631 {
632 if (!m_suspendCount++) 632 if (!m_suspendCount++)
633 clear(); 633 clear();
634 } 634 }
635 635
636 void InspectorOverlay::profilingStopped() 636 void InspectorOverlay::profilingStopped()
637 { 637 {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 744
745 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) 745 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node)
746 { 746 {
747 if (node && node->isElementNode() && m_inspectMode == InspectorDOMAgent::Sho wLayoutEditor && !m_layoutEditor) { 747 if (node && node->isElementNode() && m_inspectMode == InspectorDOMAgent::Sho wLayoutEditor && !m_layoutEditor) {
748 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_dom Agent, &overlayMainFrame()->script()); 748 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_dom Agent, &overlayMainFrame()->script());
749 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverr idden(true); 749 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverr idden(true);
750 } 750 }
751 } 751 }
752 752
753 } // namespace blink 753 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698