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

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

Issue 2634453003: Remove SelectionBehaviorOnFocus argument of Document::updateFocusAppearanceSoon(). (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLInputElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
index 17b847a79ca96e46bc1a90f271dfffb4bfe080f2..07ee1a2913f46159eb75bc6ea820fe260f577862 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -501,8 +501,10 @@ void HTMLInputElement::updateType() {
}
}
+ // UA Shadow tree was recreated. We need to set selection again. We do it
+ // later in order to avoid force layout.
if (document().focusedElement() == this)
- document().updateFocusAppearanceSoon(SelectionBehaviorOnFocus::Restore);
+ document().updateFocusAppearanceLater();
setTextAsOfLastFormControlChangeEvent(value());
setChangedSinceLastFormControlChangeEvent(false);
@@ -854,9 +856,6 @@ void HTMLInputElement::attachLayoutTree(const AttachContext& context) {
m_inputTypeView->startResourceLoading();
m_inputType->countUsage();
-
- if (document().focusedElement() == this)
- document().updateFocusAppearanceSoon(SelectionBehaviorOnFocus::Restore);
}
void HTMLInputElement::detachLayoutTree(const AttachContext& context) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698