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; |