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

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

Issue 2457613004: Utilize FrameSelection::setSelection() taking SelectionInDOMTree/SelectionInFlatTree (Closed)
Patch Set: 2016-11-24T13:04:01 Rebase Created 4 years, 1 month 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 | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/DOMSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/DOMSelection.cpp b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
index 0a1501f0ffea6ca18800ee7703434d1d08b6bad4..c28eff62c570923843f83084db8d82d4a0f5ebc7 100644
--- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
@@ -222,16 +222,9 @@ void DOMSelection::collapseToEnd(ExceptionState& exceptionState) {
return;
}
- // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
- // needs to be audited. See http://crbug.com/590369 for more details.
- // In the long term, we should change FrameSelection::setSelection to take a
- // parameter that does not require clean layout, so that modifying selection
- // no longer performs synchronous layout by itself.
- frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
-
SelectionInDOMTree::Builder builder;
builder.collapse(selection.end());
- frame()->selection().setSelection(createVisibleSelection(builder.build()));
+ frame()->selection().setSelection(builder.build());
}
void DOMSelection::collapseToStart(ExceptionState& exceptionState) {
@@ -246,16 +239,9 @@ void DOMSelection::collapseToStart(ExceptionState& exceptionState) {
return;
}
- // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
- // needs to be audited. See http://crbug.com/590369 for more details.
- // In the long term, we should change FrameSelection::setSelection to take a
- // parameter that does not require clean layout, so that modifying selection
- // no longer performs synchronous layout by itself.
- frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
-
SelectionInDOMTree::Builder builder;
builder.collapse(selection.start());
- frame()->selection().setSelection(createVisibleSelection(builder.build()));
+ frame()->selection().setSelection(builder.build());
}
void DOMSelection::empty() {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698