Index: Source/core/editing/FrameSelection.cpp |
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp |
index 4f53aba0f442dbbe2b6d9de79290c216724638dd..16e620df97cae52317e1f1aee6263d23f48c64a3 100644 |
--- a/Source/core/editing/FrameSelection.cpp |
+++ b/Source/core/editing/FrameSelection.cpp |
@@ -1323,7 +1323,7 @@ bool FrameSelection::contains(const LayoutPoint& point) |
void FrameSelection::selectFrameElementInParentIfFullySelected() |
{ |
// Find the parent frame; if there is none, then we have nothing to do. |
- LocalFrame* parent = m_frame->tree().parent(); |
+ Frame* parent = m_frame->tree().parent(); |
if (!parent) |
return; |
Page* page = m_frame->page(); |
@@ -1338,6 +1338,10 @@ void FrameSelection::selectFrameElementInParentIfFullySelected() |
if (!isEndOfDocument(selection().visibleEnd())) |
return; |
+ // FIXME: This is not yet implemented for cross-process frame relationships. |
+ if (!parent->isLocalFrame()) |
+ return; |
+ |
// Get to the <iframe> or <frame> (or even <object>) element in the parent frame. |
// FIXME: Doesn't work for OOPI. |
Element* ownerElement = m_frame->deprecatedLocalOwner(); |
@@ -1359,7 +1363,7 @@ void FrameSelection::selectFrameElementInParentIfFullySelected() |
// Focus on the parent frame, and then select from before this element to after. |
VisibleSelection newSelection(beforeOwnerElement, afterOwnerElement); |
page->focusController().setFocusedFrame(parent); |
- parent->selection().setSelection(newSelection); |
+ toLocalFrame(parent)->selection().setSelection(newSelection); |
} |
void FrameSelection::selectAll() |