| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index ff699d8b21e0cb702e42b06a18cc5bcce3318583..f8efac01d427436c761537e5600d2864ed719d41 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -995,7 +995,7 @@ PassRefPtr<Node> Document::adoptNode(PassRefPtr<Node> source, ExceptionState& ex
|
|
|
| if (source->isFrameOwnerElement()) {
|
| HTMLFrameOwnerElement* frameOwnerElement = toHTMLFrameOwnerElement(source.get());
|
| - if (frame() && frame()->tree().isDescendantOf(frameOwnerElement->contentFrame())) {
|
| + if (frame() && frame()->tree().isDescendantOf(toLocalFrame(frameOwnerElement->contentFrame()))) {
|
| exceptionState.throwDOMException(HierarchyRequestError, "The node provided is a frame which contains this document.");
|
| return nullptr;
|
| }
|
| @@ -5450,7 +5450,7 @@ bool Document::hasFocus() const
|
| return false;
|
| if (!page->focusController().isActive() || !page->focusController().isFocused())
|
| return false;
|
| - if (LocalFrame* focusedFrame = page->focusController().focusedFrame()) {
|
| + if (LocalFrame* focusedFrame = toLocalFrame(page->focusController().focusedFrame())) {
|
| if (focusedFrame->tree().isDescendantOf(frame()))
|
| return true;
|
| }
|
|
|