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

Unified Diff: Source/core/html/HTMLFormElement.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/HTMLFormElement.h ('k') | Source/core/html/HTMLFrameElement.h » ('j') | 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 44950f2c9d60dafa60b5681d66a356e914534df7..42b095f73c4b21deba16876cd6551f482d579afe 100644
--- a/Source/core/html/HTMLFormElement.cpp
+++ b/Source/core/html/HTMLFormElement.cpp
@@ -36,7 +36,6 @@
#include "core/dom/Event.h"
#include "core/dom/EventNames.h"
#include "core/dom/NamedNodesCollection.h"
-#include "core/dom/NodeRenderingContext.h"
#include "core/html/FormController.h"
#include "core/html/HTMLCollection.h"
#include "core/html/HTMLImageElement.h"
@@ -99,14 +98,15 @@ bool HTMLFormElement::formWouldHaveSecureSubmission(const String& url)
return document().completeURL(url).protocolIs("https");
}
-bool HTMLFormElement::rendererIsNeeded(const NodeRenderingContext& context)
+bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style)
{
if (!m_wasDemoted)
- return HTMLElement::rendererIsNeeded(context);
+ return HTMLElement::rendererIsNeeded(style);
ContainerNode* node = parentNode();
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.
bool parentIsTableElementPart = (parentRenderer->isTable() && isHTMLTableElement(node))
|| (parentRenderer->isTableRow() && node->hasTagName(trTag))
|| (parentRenderer->isTableSection() && node->hasTagName(tbodyTag))
@@ -116,7 +116,7 @@ bool HTMLFormElement::rendererIsNeeded(const NodeRenderingContext& context)
if (!parentIsTableElementPart)
return true;
- EDisplay display = context.style()->display();
+ EDisplay display = style.display();
bool formIsTablePart = display == TABLE || display == INLINE_TABLE || display == TABLE_ROW_GROUP
|| display == TABLE_HEADER_GROUP || display == TABLE_FOOTER_GROUP || display == TABLE_ROW
|| display == TABLE_COLUMN_GROUP || display == TABLE_COLUMN || display == TABLE_CELL
« no previous file with comments | « Source/core/html/HTMLFormElement.h ('k') | Source/core/html/HTMLFrameElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698