Index: third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp |
diff --git a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp |
index cb1067fa567b165c03751ed43ef0e1947d05f34d..caa07404b1d77a104667051011be2b55ad56397a 100644 |
--- a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp |
+++ b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp |
@@ -419,6 +419,10 @@ void TextFieldInputType::handleBeforeTextInsertedEvent(BeforeTextInsertedEvent* |
// that case, and nothing in the text field will be removed. |
unsigned selectionLength = 0; |
if (element().focused()) { |
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
+ // needs to be audited. See http://crbug.com/590369 for more details. |
+ element().document().updateStyleAndLayoutIgnorePendingStylesheets(); |
+ |
selectionLength = element().document().frame()->selection().selectedText().length(); |
} |
DCHECK_GE(oldLength, selectionLength); |