| Index: third_party/WebKit/Source/core/dom/TreeScope.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/TreeScope.cpp b/third_party/WebKit/Source/core/dom/TreeScope.cpp
|
| index 81f97184077e74281496dadfa852f8d5a23fbd50..0d93f1c2f1d952a88fed29191ea7a46bb53e6c9f 100644
|
| --- a/third_party/WebKit/Source/core/dom/TreeScope.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/TreeScope.cpp
|
| @@ -414,11 +414,11 @@ void TreeScope::adoptIfNeeded(Node& node)
|
| adopter.execute();
|
| }
|
|
|
| -static Element* focusedFrameOwnerElement(Frame* focusedFrame, Frame* currentFrame)
|
| +static Element* focusedFrameOwnerElement(Frame* focusedFrame, LocalFrame* currentFrame)
|
| {
|
| for (; focusedFrame; focusedFrame = focusedFrame->tree().parent()) {
|
| if (focusedFrame->tree().parent() == currentFrame) {
|
| - // FIXME: This won't work for OOPI.
|
| + ASSERT(focusedFrame->owner()->isLocal());
|
| return focusedFrame->deprecatedLocalOwner();
|
| }
|
| }
|
| @@ -430,7 +430,7 @@ Element* TreeScope::adjustedFocusedElement() const
|
| Document& document = rootNode().document();
|
| Element* element = document.focusedElement();
|
| if (!element && document.page())
|
| - element = focusedFrameOwnerElement(document.page()->focusController().focusedFrame(), document.frame());
|
| + element = focusedFrameOwnerElement(document.page()->focusController().focusedFrameEvenIfRemote(), document.frame());
|
| if (!element)
|
| return 0;
|
|
|
|
|