Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1423053002: Make document.activeElement work with OOPIF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@focus-preserve-page-focus-on-subframe-navigations
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 return; 1348 return;
1349 } 1349 }
1350 frame()->inputMethodController().extendSelectionAndDelete(before, after); 1350 frame()->inputMethodController().extendSelectionAndDelete(before, after);
1351 } 1351 }
1352 1352
1353 void WebLocalFrameImpl::setCaretVisible(bool visible) 1353 void WebLocalFrameImpl::setCaretVisible(bool visible)
1354 { 1354 {
1355 frame()->selection().setCaretVisible(visible); 1355 frame()->selection().setCaretVisible(visible);
1356 } 1356 }
1357 1357
1358 void WebLocalFrameImpl::clearFocus() 1358 void WebLocalFrameImpl::clearFocus(WebRemoteFrame* newFocusedFrame)
1359 { 1359 {
1360 // This uses setFocusedElement rather than setFocusedFrame so that blur 1360 // This uses setFocusedElement rather than setFocusedFrame so that blur
1361 // events are properly dispatched on any currently focused elements. 1361 // events are properly dispatched on any currently focused elements.
1362 frame()->page()->focusController().setFocusedElement(nullptr, nullptr); 1362 frame()->page()->focusController().setFocusedElement(nullptr, toCoreFrame(ne wFocusedFrame));
1363 } 1363 }
1364 1364
1365 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoin t& pointInViewport) 1365 VisiblePosition WebLocalFrameImpl::visiblePositionForViewportPoint(const WebPoin t& pointInViewport)
1366 { 1366 {
1367 return visiblePositionForContentsPoint(frame()->view()->viewportToContents(p ointInViewport), frame()); 1367 return visiblePositionForContentsPoint(frame()->view()->viewportToContents(p ointInViewport), frame());
1368 } 1368 }
1369 1369
1370 WebPlugin* WebLocalFrameImpl::focusedPluginIfInputMethodSupported() 1370 WebPlugin* WebLocalFrameImpl::focusedPluginIfInputMethodSupported()
1371 { 1371 {
1372 WebPluginContainerImpl* container = WebLocalFrameImpl::pluginContainerFromNo de(frame(), WebNode(frame()->document()->focusedElement())); 1372 WebPluginContainerImpl* container = WebLocalFrameImpl::pluginContainerFromNo de(frame(), WebNode(frame()->document()->focusedElement()));
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 } 2203 }
2204 2204
2205 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const 2205 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const
2206 { 2206 {
2207 if (!frame()) 2207 if (!frame())
2208 return WebSandboxFlags::None; 2208 return WebSandboxFlags::None;
2209 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2209 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2210 } 2210 }
2211 2211
2212 } // namespace blink 2212 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698