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

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

Issue 2705423002: Remove several unnecessary selection-related layout updates (Closed)
Patch Set: 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
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 9d5c79129f8a36f0c44ffb284c4f318fa609f68a..4e46f2363cdf7838c8bf3893e4f61d6845677530 100644
--- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
@@ -343,12 +343,7 @@ void DOMSelection::setBaseAndExtent(Node* baseNode,
clearCachedRangeIfSelectionOfDocument();
- // TODO(editing-dev): 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.
- // TODO(editing-dev): Once SVG USE element doesn't modifies DOM tree, we
+ // TODO(editing-dev): Once SVG USE element doesn't modify DOM tree, we
// should get rid of this update layout call.
// See http://crbug.com/566281
// See "svg/text/textpath-reference-crash.html"
@@ -424,10 +419,6 @@ void DOMSelection::modify(const String& alterString,
else
return;
- // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets
- // needs to be audited. See http://crbug.com/590369 for more details.
- frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
-
frame()->selection().modify(alter, direction, granularity);
}
@@ -604,13 +595,6 @@ void DOMSelection::addRange(Range* newRange) {
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();
-
if (rangeCount() == 0) {
selection.setSelectedRange(EphemeralRange(newRange), VP_DEFAULT_AFFINITY);
cacheRangeIfSelectionOfDocument(newRange);
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698