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

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

Issue 21346002: Fix renderer assert after autofill (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 84cdba6d01e4121cc747a449e173fd6034358797..7b83771f0c6dea6f01cf887491c243d048c85660 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -3174,6 +3174,13 @@ bool Document::setFocusedElement(PassRefPtr<Element> prpNewFocusedElement, Focus
else
view()->setFocus(false);
}
+
+ // Autofill client may have modified the value of newFocusNode, thus require
falken 2013/07/31 18:27:01 nit: newFocusNode -> newFocusedNode
+ // a layout update here, otherwise it will assert at newFocusedNode->isFocusable().
+ // See crbug.com/251163.
+ RenderObject* renderer = newFocusedNode ? newFocusedNode->renderer() : 0;
tkent 2013/07/31 21:52:05 It looks this code is not compilable. There is no
+ if (renderer && renderer->needsLayout())
+ updateLayout();
esprehn 2013/07/31 22:20:25 You shouldn't reach into the render tree and inspe
}
if (newFocusedElement && newFocusedElement->isFocusable()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698