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

Unified Diff: third_party/WebKit/Source/core/page/FocusController.cpp

Issue 2680943004: Make FrameSelection to hold non-canonicalized positions (Closed)
Patch Set: 2014-02-14T23:34:22 Update TestExpectation to include extend-{0,2,4}0.html and selectAllChildren.html Created 3 years, 10 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 | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/FocusController.cpp
diff --git a/third_party/WebKit/Source/core/page/FocusController.cpp b/third_party/WebKit/Source/core/page/FocusController.cpp
index c75f524ac1ac4de629c2045c739a8667a6e8457c..110d8bf12a8de8c3fa4cf6a7c0088d3b2008b582 100644
--- a/third_party/WebKit/Source/core/page/FocusController.cpp
+++ b/third_party/WebKit/Source/core/page/FocusController.cpp
@@ -1076,10 +1076,11 @@ static void clearSelectionIfNeeded(LocalFrame* oldFocusedFrame,
return;
FrameSelection& selection = oldFocusedFrame->selection();
- if (selection.isNone())
+ const SelectionInDOMTree& selectionInDOMTree = selection.selectionInDOMTree();
+ if (selectionInDOMTree.isNone())
return;
- Node* selectionStartNode = selection.selection().start().anchorNode();
+ Node* selectionStartNode = selectionInDOMTree.base().anchorNode();
if (selectionStartNode == newFocusedElement ||
selectionStartNode->isDescendantOf(newFocusedElement))
return;
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698