OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 return; | 1353 return; |
1354 } | 1354 } |
1355 frame()->inputMethodController().extendSelectionAndDelete(before, after); | 1355 frame()->inputMethodController().extendSelectionAndDelete(before, after); |
1356 } | 1356 } |
1357 | 1357 |
1358 void WebLocalFrameImpl::setCaretVisible(bool visible) | 1358 void WebLocalFrameImpl::setCaretVisible(bool visible) |
1359 { | 1359 { |
1360 frame()->selection().setCaretVisible(visible); | 1360 frame()->selection().setCaretVisible(visible); |
1361 } | 1361 } |
1362 | 1362 |
| 1363 void WebLocalFrameImpl::clearFocus() |
| 1364 { |
| 1365 // This uses setFocusedElement rather than setFocusedFrame so that blur |
| 1366 // events are properly dispatched on any currently focused elements. |
| 1367 frame()->page()->focusController().setFocusedElement(nullptr, nullptr); |
| 1368 } |
| 1369 |
1363 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoin
t& pointInViewport) | 1370 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoin
t& pointInViewport) |
1364 { | 1371 { |
1365 return visiblePositionForContentsPoint(frame()->view()->viewportToContents(p
ointInViewport), frame()); | 1372 return visiblePositionForContentsPoint(frame()->view()->viewportToContents(p
ointInViewport), frame()); |
1366 } | 1373 } |
1367 | 1374 |
1368 WebPlugin* WebLocalFrameImpl::focusedPluginIfInputMethodSupported() | 1375 WebPlugin* WebLocalFrameImpl::focusedPluginIfInputMethodSupported() |
1369 { | 1376 { |
1370 WebPluginContainerImpl* container = WebLocalFrameImpl::pluginContainerFromNo
de(frame(), WebNode(frame()->document()->focusedElement())); | 1377 WebPluginContainerImpl* container = WebLocalFrameImpl::pluginContainerFromNo
de(frame(), WebNode(frame()->document()->focusedElement())); |
1371 if (container && container->supportsInputMethod()) | 1378 if (container && container->supportsInputMethod()) |
1372 return container->plugin(); | 1379 return container->plugin(); |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2191 } | 2198 } |
2192 | 2199 |
2193 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const | 2200 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const |
2194 { | 2201 { |
2195 if (!frame()) | 2202 if (!frame()) |
2196 return WebSandboxFlags::None; | 2203 return WebSandboxFlags::None; |
2197 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2204 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
2198 } | 2205 } |
2199 | 2206 |
2200 } // namespace blink | 2207 } // namespace blink |
OLD | NEW |