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

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

Issue 23956012: Stop passing NodeRenderingContext except in textRendererIsNeeded (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | « Source/core/html/HTMLDetailsElement.h ('k') | Source/core/html/HTMLElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « Source/core/html/HTMLDetailsElement.h ('k') | Source/core/html/HTMLElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698