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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp

Issue 2451613003: Get rid of createVisibleSelection() taking two Position (Closed)
Patch Set: 2016-10-26T15:09:55 Created 4 years, 2 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/editing/SelectionAdjuster.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp b/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
index 82afb0b2e9658467ab5fda32e1ca971bde0e11ab..450fe189491bacae676770847718c5d3d8302383 100644
--- a/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
@@ -197,6 +197,9 @@ static bool isCrossingShadowBoundaries(
selection.end().anchorNode()->treeScope() != treeScope;
}
+// TODO(yosin): We should make |adjustSelectionInDOMTree()| to return
+// |VisibleSelection| once |VisibleSelection| constructor doesn't call
+// |validate()|.
void SelectionAdjuster::adjustSelectionInDOMTree(
VisibleSelection* selection,
const VisibleSelectionInFlatTree& selectionInFlatTree) {
@@ -219,7 +222,8 @@ void SelectionAdjuster::adjustSelectionInDOMTree(
// that we don't need to update layout here.
base.document()->updateStyleAndLayoutIgnorePendingStylesheets();
- *selection = createVisibleSelection(base, extent);
+ *selection = createVisibleSelection(
+ SelectionInDOMTree::Builder().setBaseAndExtent(base, extent).build());
return;
}

Powered by Google App Engine
This is Rietveld 408576698