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

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

Issue 1958093002: CONTINUED Make FrameSelection to hold non-canonicalized positions Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2017-01-16T20:04:35 Created 3 years, 11 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
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 de9da91658722ce16c2e4d1f9ba55da8cf1a3666..01e6583590c348f1ebcc1df00d580dc2d5c1607b 100644
--- a/third_party/WebKit/Source/core/page/FocusController.cpp
+++ b/third_party/WebKit/Source/core/page/FocusController.cpp
@@ -1068,10 +1068,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/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698