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; |
} |