OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
190 void ChromeClientImpl::takeFocus(FocusType type) | 190 void ChromeClientImpl::takeFocus(FocusType type) |
191 { | 191 { |
192 if (!m_webView->client()) | 192 if (!m_webView->client()) |
193 return; | 193 return; |
194 if (type == FocusTypeBackward) | 194 if (type == FocusTypeBackward) |
195 m_webView->client()->focusPrevious(); | 195 m_webView->client()->focusPrevious(); |
196 else | 196 else |
197 m_webView->client()->focusNext(); | 197 m_webView->client()->focusNext(); |
198 } | 198 } |
199 | 199 |
200 void ChromeClientImpl::focusedNodeChanged(Node* node) | 200 void ChromeClientImpl::focusedNodeChanged(Node* previouslyFocusedNode, Node* foc usedNode) |
201 { | 201 { |
202 m_webView->client()->focusedNodeChanged(WebNode(node)); | 202 // TODO(estade): remove. |
Mike West
2015/01/19 08:52:16
Totally tiny nit: We use FIXME in Blink.
Evan Stade
2015/01/20 22:23:54
Done.
| |
203 m_webView->client()->focusedNodeChanged(WebNode(focusedNode)); | |
204 m_webView->client()->focusedNodeChanged(WebNode(previouslyFocusedNode), WebN ode(focusedNode)); | |
203 | 205 |
204 WebURL focusURL; | 206 WebURL focusURL; |
205 if (node && node->isElementNode() && toElement(node)->isLiveLink()) | 207 if (focusedNode && focusedNode->isElementNode() && toElement(focusedNode)->i sLiveLink()) |
206 focusURL = toElement(node)->hrefURL(); | 208 focusURL = toElement(focusedNode)->hrefURL(); |
207 m_webView->client()->setKeyboardFocusURL(focusURL); | 209 m_webView->client()->setKeyboardFocusURL(focusURL); |
208 } | 210 } |
209 | 211 |
210 void ChromeClientImpl::focusedFrameChanged(LocalFrame* frame) | 212 void ChromeClientImpl::focusedFrameChanged(LocalFrame* frame) |
211 { | 213 { |
212 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); | 214 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); |
213 if (webframe && webframe->client()) | 215 if (webframe && webframe->client()) |
214 webframe->client()->frameFocused(); | 216 webframe->client()->frameFocused(); |
215 } | 217 } |
216 | 218 |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
881 webframe->autofillClient()->dataListOptionsChanged(WebInputElement(&inpu t)); | 883 webframe->autofillClient()->dataListOptionsChanged(WebInputElement(&inpu t)); |
882 } | 884 } |
883 | 885 |
884 void ChromeClientImpl::registerViewportLayers() const | 886 void ChromeClientImpl::registerViewportLayers() const |
885 { | 887 { |
886 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView() && m_webVie w->pinchVirtualViewportEnabled()) | 888 if (m_webView->rootGraphicsLayer() && m_webView->layerTreeView() && m_webVie w->pinchVirtualViewportEnabled()) |
887 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie w(m_webView->layerTreeView()); | 889 m_webView->page()->frameHost().pinchViewport().registerLayersWithTreeVie w(m_webView->layerTreeView()); |
888 } | 890 } |
889 | 891 |
890 } // namespace blink | 892 } // namespace blink |
OLD | NEW |