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

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

Issue 2395053002: Prune createVisibleSelectionDeprecated from SelectionAdjuster (Closed)
Patch Set: Add TODO about lazy VS validation 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e94156d02c1b8b69dc8c1087b694d12f12973d45..174bdb33879295143299fc2673a7e0b5a99a45b5 100644
--- a/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
@@ -208,7 +208,17 @@ void SelectionAdjuster::adjustSelectionInDOMTree(
const Position& extent = toPositionInDOMTree(selectionInFlatTree.extent());
if (isCrossingShadowBoundaries(selectionInFlatTree)) {
- *selection = createVisibleSelectionDeprecated(base, extent);
+ DCHECK(base.document());
+
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ // This layout update call cannot be hoisted out of the |if|, otherwise it's
+ // going to cause performance regression (http://crbug.com/652301).
+ // TODO(yosin): Implement and apply lazy visible selection validation so
+ // that we don't need to update layout here.
+ base.document()->updateStyleAndLayoutIgnorePendingStylesheets();
+
+ *selection = createVisibleSelection(base, extent);
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698