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

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

Issue 317493002: Change FrameTree to return Frames instead of LocalFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: dcheng's comment addressed Created 6 years, 6 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
« no previous file with comments | « Source/core/dom/FullscreenElementStack.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/TreeScope.cpp
diff --git a/Source/core/dom/TreeScope.cpp b/Source/core/dom/TreeScope.cpp
index 6399cf7372366dbbbc397398ad4b6ff7bf22c06b..47bb698eb4a4cd4251d1f5f141aa17e76aefac8c 100644
--- a/Source/core/dom/TreeScope.cpp
+++ b/Source/core/dom/TreeScope.cpp
@@ -346,7 +346,7 @@ void TreeScope::adoptIfNeeded(Node& node)
adopter.execute();
}
-static Element* focusedFrameOwnerElement(LocalFrame* focusedFrame, LocalFrame* currentFrame)
+static Element* focusedFrameOwnerElement(Frame* focusedFrame, Frame* currentFrame)
{
for (; focusedFrame; focusedFrame = focusedFrame->tree().parent()) {
if (focusedFrame->tree().parent() == currentFrame) {
@@ -361,10 +361,8 @@ 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(toLocalFrameTemporary(document.page()->focusController().focusedFrame()), document.frame());
+ element = focusedFrameOwnerElement(document.page()->focusController().focusedFrame(), document.frame());
if (!element)
return 0;
« no previous file with comments | « Source/core/dom/FullscreenElementStack.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698