Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 7de388683f0ec641d83ef3cacaa3c95618a7c364..9eb4c4abc69546b6ecd40d53d77b0c6967b7d9af 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -3469,6 +3469,11 @@ bool Document::setFocusedElement(PassRefPtr<Element> prpNewFocusedElement, Focus |
else |
view()->setFocus(false); |
} |
+ |
+ // Autofill client may have modified the value of newFocusedElement, thus require |
+ // a layout update here, otherwise it will assert at newFocusedElement->isFocusable(). |
+ // See crbug.com/251163. |
+ updateLayoutIgnorePendingStylesheets(); |
} |
if (newFocusedElement && newFocusedElement->isFocusable()) { |