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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 if (!m_webView->client()) | 187 if (!m_webView->client()) |
188 return; | 188 return; |
189 if (type == WebFocusTypeBackward) | 189 if (type == WebFocusTypeBackward) |
190 m_webView->client()->focusPrevious(); | 190 m_webView->client()->focusPrevious(); |
191 else | 191 else |
192 m_webView->client()->focusNext(); | 192 m_webView->client()->focusNext(); |
193 } | 193 } |
194 | 194 |
195 void ChromeClientImpl::focusedNodeChanged(Node* fromNode, Node* toNode) | 195 void ChromeClientImpl::focusedNodeChanged(Node* fromNode, Node* toNode) |
196 { | 196 { |
| 197 if (!m_webView->client()) |
| 198 return; |
| 199 |
197 m_webView->client()->focusedNodeChanged(WebNode(fromNode), WebNode(toNode)); | 200 m_webView->client()->focusedNodeChanged(WebNode(fromNode), WebNode(toNode)); |
198 | 201 |
199 WebURL focusURL; | 202 WebURL focusURL; |
200 if (toNode && toNode->isElementNode() && toElement(toNode)->isLiveLink() &&
toNode->shouldHaveFocusAppearance()) | 203 if (toNode && toNode->isElementNode() && toElement(toNode)->isLiveLink() &&
toNode->shouldHaveFocusAppearance()) |
201 focusURL = toElement(toNode)->hrefURL(); | 204 focusURL = toElement(toNode)->hrefURL(); |
202 m_webView->client()->setKeyboardFocusURL(focusURL); | 205 m_webView->client()->setKeyboardFocusURL(focusURL); |
203 } | 206 } |
204 | 207 |
205 void ChromeClientImpl::focusedFrameChanged(LocalFrame* frame) | 208 void ChromeClientImpl::focusedFrameChanged(LocalFrame* frame) |
206 { | 209 { |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 for (const auto& observer : observers) | 976 for (const auto& observer : observers) |
974 observer->willOpenPopup(); | 977 observer->willOpenPopup(); |
975 } | 978 } |
976 | 979 |
977 FloatSize ChromeClientImpl::elasticOverscroll() const | 980 FloatSize ChromeClientImpl::elasticOverscroll() const |
978 { | 981 { |
979 return m_webView->elasticOverscroll(); | 982 return m_webView->elasticOverscroll(); |
980 } | 983 } |
981 | 984 |
982 } // namespace blink | 985 } // namespace blink |
OLD | NEW |