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

Unified Diff: Source/core/html/HTMLFormElement.cpp

Issue 218753003: Fix crash when a demoted FORM element is moved into a ShadowRoot. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « LayoutTests/fast/dom/shadow/shadowdom-for-unknown-with-form-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFormElement.cpp
diff --git a/Source/core/html/HTMLFormElement.cpp b/Source/core/html/HTMLFormElement.cpp
index 806610fefecc0bc07bca1908c800eaff85e547df..2e03d062be0f554693537bc13d52e3231729a2fb 100644
--- a/Source/core/html/HTMLFormElement.cpp
+++ b/Source/core/html/HTMLFormElement.cpp
@@ -92,6 +92,8 @@ bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style)
return HTMLElement::rendererIsNeeded(style);
ContainerNode* node = parentNode();
+ if (!node || !node->renderer())
+ return HTMLElement::rendererIsNeeded(style);
RenderObject* parentRenderer = node->renderer();
// FIXME: Shouldn't we also check for table caption (see |formIsTablePart| below).
// FIXME: This check is not correct for Shadow DOM.
« no previous file with comments | « LayoutTests/fast/dom/shadow/shadowdom-for-unknown-with-form-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698