Index: Source/core/html/HTMLDetailsElement.cpp |
diff --git a/Source/core/html/HTMLDetailsElement.cpp b/Source/core/html/HTMLDetailsElement.cpp |
index 1042996532f29fd4ee045e188b095154cc5f3673..0303c8f77a44b3d71b17c05f47c6a046764de12f 100644 |
--- a/Source/core/html/HTMLDetailsElement.cpp |
+++ b/Source/core/html/HTMLDetailsElement.cpp |
@@ -23,7 +23,6 @@ |
#include "HTMLNames.h" |
#include "bindings/v8/ExceptionStatePlaceholder.h" |
-#include "core/dom/NodeRenderingContext.h" |
#include "core/dom/Text.h" |
#include "core/dom/shadow/ShadowRoot.h" |
#include "core/html/HTMLSummaryElement.h" |
@@ -93,13 +92,14 @@ void HTMLDetailsElement::parseAttribute(const QualifiedName& name, const AtomicS |
HTMLElement::parseAttribute(name, value); |
} |
-bool HTMLDetailsElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const |
+bool HTMLDetailsElement::childShouldCreateRenderer(const Node& child) const |
{ |
+ // FIXME: These checks do not look correct, we should just use insertion points instead. |
if (m_isOpen) |
- return HTMLElement::childShouldCreateRenderer(childContext); |
- if (!childContext.node()->hasTagName(summaryTag)) |
+ return HTMLElement::childShouldCreateRenderer(child); |
+ if (!child.hasTagName(summaryTag)) |
return false; |
- return childContext.node() == findMainSummary() && HTMLElement::childShouldCreateRenderer(childContext); |
+ return &child == findMainSummary() && HTMLElement::childShouldCreateRenderer(child); |
} |
void HTMLDetailsElement::toggleOpen() |