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

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: nits addressed 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 return adoptPtrWillBeNoop(new InspectorOverlayChromeClient(client, overl ay)); 131 return adoptPtrWillBeNoop(new InspectorOverlayChromeClient(client, overl ay));
132 } 132 }
133 133
134 DEFINE_INLINE_VIRTUAL_TRACE() 134 DEFINE_INLINE_VIRTUAL_TRACE()
135 { 135 {
136 visitor->trace(m_client); 136 visitor->trace(m_client);
137 visitor->trace(m_overlay); 137 visitor->trace(m_overlay);
138 EmptyChromeClient::trace(visitor); 138 EmptyChromeClient::trace(visitor);
139 } 139 }
140 140
141 void setCursor(const Cursor& cursor) override 141 void setCursor(const Cursor& cursor, LocalFrame* localRoot) override
142 { 142 {
143 toChromeClientImpl(m_client)->setCursorOverridden(false); 143 toChromeClientImpl(m_client)->setCursorOverridden(false);
144 toChromeClientImpl(m_client)->setCursor(cursor); 144 toChromeClientImpl(m_client)->setCursor(cursor, localRoot);
145 bool overrideCursor = m_overlay->m_layoutEditor; 145 bool overrideCursor = m_overlay->m_layoutEditor;
146 toChromeClientImpl(m_client)->setCursorOverridden(overrideCursor); 146 toChromeClientImpl(m_client)->setCursorOverridden(overrideCursor);
147 } 147 }
148 148
149 void setToolTip(const String& tooltip, TextDirection direction) override 149 void setToolTip(const String& tooltip, TextDirection direction) override
150 { 150 {
151 m_client->setToolTip(tooltip, direction); 151 m_client->setToolTip(tooltip, direction);
152 } 152 }
153 153
154 void invalidateRect(const IntRect&) override 154 void invalidateRect(const IntRect&) override
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 626
627 if (m_layoutEditor) { 627 if (m_layoutEditor) {
628 m_layoutEditor->dispose(); 628 m_layoutEditor->dispose();
629 m_layoutEditor.clear(); 629 m_layoutEditor.clear();
630 } 630 }
631 631
632 if (m_inspectModeHighlightConfig) 632 if (m_inspectModeHighlightConfig)
633 highlightNode(m_hoveredNodeForInspectMode.get(), *m_inspectModeHighlight Config, false); 633 highlightNode(m_hoveredNodeForInspectMode.get(), *m_inspectModeHighlight Config, false);
634 634
635 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(false); 635 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(false);
636 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursor(pointerC ursor()); 636 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursor(pointerC ursor(), overlayMainFrame());
637 } 637 }
638 638
639 void InspectorOverlay::profilingStarted() 639 void InspectorOverlay::profilingStarted()
640 { 640 {
641 if (!m_suspendCount++) 641 if (!m_suspendCount++)
642 clear(); 642 clear();
643 } 643 }
644 644
645 void InspectorOverlay::profilingStopped() 645 void InspectorOverlay::profilingStopped()
646 { 646 {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 753
754 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) 754 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node)
755 { 755 {
756 if (node && node->isElementNode() && m_inspectMode == InspectorDOMAgent::Sho wLayoutEditor && !m_layoutEditor) { 756 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()); 757 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_dom Agent, &overlayMainFrame()->script());
758 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverr idden(true); 758 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverr idden(true);
759 } 759 }
760 } 760 }
761 761
762 } // namespace blink 762 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/Source/web/WebPagePopupImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698