Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(556)

Unified Diff: Source/core/editing/FrameSelection.cpp

Issue 317493002: Change FrameTree to return Frames instead of LocalFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: dcheng's comment addressed Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/TreeScope.cpp ('k') | Source/core/editing/SpellChecker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « Source/core/dom/TreeScope.cpp ('k') | Source/core/editing/SpellChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698