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 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1345 return; | 1345 return; |
1346 } | 1346 } |
1347 frame()->inputMethodController().extendSelectionAndDelete(before, after); | 1347 frame()->inputMethodController().extendSelectionAndDelete(before, after); |
1348 } | 1348 } |
1349 | 1349 |
1350 void WebLocalFrameImpl::setCaretVisible(bool visible) | 1350 void WebLocalFrameImpl::setCaretVisible(bool visible) |
1351 { | 1351 { |
1352 frame()->selection().setCaretVisible(visible); | 1352 frame()->selection().setCaretVisible(visible); |
1353 } | 1353 } |
1354 | 1354 |
1355 void WebLocalFrameImpl::clearFocus() | |
1356 { | |
1357 // This uses setFocusedElement rather than setFocusedFrame so that blur | |
1358 // events are properly dispatched on any currently focused elements. | |
1359 frame()->page()->focusController().setFocusedElement(nullptr, nullptr); | |
1360 } | |
1361 | |
1362 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoin
t& pointInViewport) | 1355 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoin
t& pointInViewport) |
1363 { | 1356 { |
1364 return visiblePositionForContentsPoint(frame()->view()->viewportToContents(p
ointInViewport), frame()); | 1357 return visiblePositionForContentsPoint(frame()->view()->viewportToContents(p
ointInViewport), frame()); |
1365 } | 1358 } |
1366 | 1359 |
1367 WebPlugin* WebLocalFrameImpl::focusedPluginIfInputMethodSupported() | 1360 WebPlugin* WebLocalFrameImpl::focusedPluginIfInputMethodSupported() |
1368 { | 1361 { |
1369 WebPluginContainerImpl* container = WebLocalFrameImpl::pluginContainerFromNo
de(frame(), WebNode(frame()->document()->focusedElement())); | 1362 WebPluginContainerImpl* container = WebLocalFrameImpl::pluginContainerFromNo
de(frame(), WebNode(frame()->document()->focusedElement())); |
1370 if (container && container->supportsInputMethod()) | 1363 if (container && container->supportsInputMethod()) |
1371 return container->plugin(); | 1364 return container->plugin(); |
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2219 } | 2212 } |
2220 | 2213 |
2221 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const | 2214 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const |
2222 { | 2215 { |
2223 if (!frame()) | 2216 if (!frame()) |
2224 return WebSandboxFlags::None; | 2217 return WebSandboxFlags::None; |
2225 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2218 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
2226 } | 2219 } |
2227 | 2220 |
2228 } // namespace blink | 2221 } // namespace blink |
OLD | NEW |