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); |