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

Unified Diff: Source/core/dom/TreeScope.cpp

Issue 189573002: Convert HTMLFrameOwnerElement and FocusController to use Frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed LocalFrame verification in Editor Created 6 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/TreeScope.cpp
diff --git a/Source/core/dom/TreeScope.cpp b/Source/core/dom/TreeScope.cpp
index 45dd8a0e991870a8dad6293ec9cfefea410871ee..50820e8bcaa67281e64f92888878de442aae3e29 100644
--- a/Source/core/dom/TreeScope.cpp
+++ b/Source/core/dom/TreeScope.cpp
@@ -351,8 +351,10 @@ Element* TreeScope::adjustedFocusedElement() const
{
Document& document = rootNode().document();
Element* element = document.focusedElement();
+ // FIXME(kenrb): The toLocalFrame() cast should be removed when RemoteFrames can have FrameTrees.
+ // At that point, focusedFrameOwnerElement should take a Frame instead of a LocalFrame.
if (!element && document.page())
- element = focusedFrameOwnerElement(document.page()->focusController().focusedFrame(), document.frame());
+ element = focusedFrameOwnerElement(toLocalFrame(document.page()->focusController().focusedFrame()), document.frame());
if (!element)
return 0;

Powered by Google App Engine
This is Rietveld 408576698