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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1667623002: Make sure Document::updateLayoutTree*() is called before Element::isFocusable(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index a6fe87a40f7c79897252a8137154d9adbfcb923e..a95ed79ed218a5179c3dcfa2b7e5364534618d74 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -3623,9 +3623,6 @@ bool Document::setFocusedElement(PassRefPtrWillBeRawPtr<Element> prpNewFocusedEl
focusChangeBlocked = true;
newFocusedElement = nullptr;
}
- // Event handlers might make newFocusedElement dirty.
- if (newFocusedElement)
- updateLayoutTreeIgnorePendingStylesheets();
}
if (view()) {
@@ -3637,6 +3634,8 @@ bool Document::setFocusedElement(PassRefPtrWillBeRawPtr<Element> prpNewFocusedEl
}
}
+ if (newFocusedElement)
+ updateLayoutTreeIgnorePendingStylesheets();
if (newFocusedElement && newFocusedElement->isFocusable()) {
if (newFocusedElement->isRootEditableElement() && !acceptsEditingFocus(*newFocusedElement)) {
// delegate blocks focus change
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Element.h » ('j') | third_party/WebKit/Source/core/dom/Element.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698