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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2414263002: Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in toNormalizedEphemeralRange (Closed)
Patch Set: fix nit 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/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index 825503e5eef2d5bcaf59d1fc7305585e83bdd018..ecc4f0b32520fb4e8414f81c4f714816c539e7a1 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -2875,6 +2875,9 @@ String Internals::selectedHTMLForClipboard() {
if (!frame())
return String();
+ // Selection normalization and markup generation require clean layout.
+ frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
+
return frame()->selection().selectedHTMLForClipboard();
}

Powered by Google App Engine
This is Rietveld 408576698