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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
135 DEFINE_INLINE_VIRTUAL_TRACE() | 135 DEFINE_INLINE_VIRTUAL_TRACE() |
136 { | 136 { |
137 visitor->trace(m_client); | 137 visitor->trace(m_client); |
138 visitor->trace(m_overlay); | 138 visitor->trace(m_overlay); |
139 EmptyChromeClient::trace(visitor); | 139 EmptyChromeClient::trace(visitor); |
140 } | 140 } |
141 | 141 |
142 void setCursor(const Cursor& cursor, LocalFrame* localRoot) override | 142 void setCursor(const Cursor& cursor, LocalFrame* localRoot) override |
143 { | 143 { |
144 toChromeClientImpl(m_client)->setCursorOverridden(false); | 144 toChromeClientImpl(m_client)->setCursorOverridden(false); |
145 toChromeClientImpl(m_client)->setCursor(cursor, localRoot); | 145 // TODO(lfg): Inspector overlay should be fixed to work with |
146 // out-of-process iframes. For now, just assume there's a single | |
147 // widget. | |
dcheng
2016/07/08 10:38:04
Nit: I'm not sure this needs a TODO, I think it's
lfg
2016/07/11 18:37:24
Done.
| |
148 toChromeClientImpl(m_client)->setCursor(cursor, m_overlay->m_webViewImpl ->mainFrameImpl()->frame()); | |
146 bool overrideCursor = m_overlay->m_layoutEditor; | 149 bool overrideCursor = m_overlay->m_layoutEditor; |
147 toChromeClientImpl(m_client)->setCursorOverridden(overrideCursor); | 150 toChromeClientImpl(m_client)->setCursorOverridden(overrideCursor); |
148 } | 151 } |
149 | 152 |
150 void setToolTip(const String& tooltip, TextDirection direction) override | 153 void setToolTip(const String& tooltip, TextDirection direction) override |
151 { | 154 { |
152 m_client->setToolTip(tooltip, direction); | 155 m_client->setToolTip(tooltip, direction); |
153 } | 156 } |
154 | 157 |
155 void invalidateRect(const IntRect&) override | 158 void invalidateRect(const IntRect&) override |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
790 | 793 |
791 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) | 794 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) |
792 { | 795 { |
793 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node-> isElementNode() || !node->ownerDocument()->isActive() || !m_cssAgent || !m_domAg ent) | 796 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node-> isElementNode() || !node->ownerDocument()->isActive() || !m_cssAgent || !m_domAg ent) |
794 return; | 797 return; |
795 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen t, &overlayMainFrame()->script()); | 798 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen t, &overlayMainFrame()->script()); |
796 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(true); | 799 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(true); |
797 } | 800 } |
798 | 801 |
799 } // namespace blink | 802 } // namespace blink |
OLD | NEW |