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

Unified Diff: third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp

Issue 2315223002: Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in FrameSelection::selectedText (Closed)
Patch Set: Created 4 years, 3 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/html/HTMLTextAreaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp b/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp
index 04a213f5895fa40158d0a2ba227ba543714106ab..fde336599849ec660ebd6d80f45efc1fb1b6af34 100644
--- a/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp
@@ -326,6 +326,10 @@ void HTMLTextAreaElement::handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*
// that case, and nothing in the text field will be removed.
unsigned selectionLength = 0;
if (focused()) {
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ document().updateStyleAndLayoutIgnorePendingStylesheets();
+
selectionLength = computeLengthForSubmission(document().frame()->selection().selectedText());
}
DCHECK_GE(currentLength, selectionLength);

Powered by Google App Engine
This is Rietveld 408576698