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

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

Issue 2425543003: Ensure clean layout for VisibleSelection::selectionFromContentsOfNode (Closed)
Patch Set: 201610171619 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/VisibleSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
index d8d2debe974a38b3a79b9bfe1fdbea8cfccb0f0c..afa6ea6e7382bfdf1bbae323defb2670d009e368 100644
--- a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
@@ -246,11 +246,9 @@ operator=(const VisibleSelectionTemplate<Strategy>& other) {
template <typename Strategy>
VisibleSelectionTemplate<Strategy>
VisibleSelectionTemplate<Strategy>::selectionFromContentsOfNode(Node* node) {
+ DCHECK(node);
DCHECK(!Strategy::editingIgnoresContent(node));
-
- // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
- // needs to be audited. see http://crbug.com/590369 for more details.
- node->document().updateStyleAndLayoutIgnorePendingStylesheets();
+ DCHECK(!needsLayoutTreeUpdate(*node));
typename SelectionTemplate<Strategy>::Builder builder;
builder.collapse(PositionTemplate<Strategy>::firstPositionInNode(node))

Powered by Google App Engine
This is Rietveld 408576698