| 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..4e41d759821826a0196dce177264e89c3c324f80 100644
|
| --- a/third_party/WebKit/Source/core/dom/TreeScope.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/TreeScope.cpp
|
| @@ -414,23 +414,12 @@ void TreeScope::adoptIfNeeded(Node& node)
|
| adopter.execute();
|
| }
|
|
|
| -static Element* focusedFrameOwnerElement(Frame* focusedFrame, Frame* currentFrame)
|
| -{
|
| - for (; focusedFrame; focusedFrame = focusedFrame->tree().parent()) {
|
| - if (focusedFrame->tree().parent() == currentFrame) {
|
| - // FIXME: This won't work for OOPI.
|
| - return focusedFrame->deprecatedLocalOwner();
|
| - }
|
| - }
|
| - return 0;
|
| -}
|
| -
|
| 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 = document.page()->focusController().focusedFrameOwnerElement(*document.frame());
|
| if (!element)
|
| return 0;
|
|
|
|
|