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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLElementStack.cpp

Issue 2628723004: Experiment with restricting form submission with open elements. (Closed)
Patch Set: Rebase. Created 3 years, 11 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
Index: third_party/WebKit/Source/core/html/parser/HTMLElementStack.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLElementStack.cpp b/third_party/WebKit/Source/core/html/parser/HTMLElementStack.cpp
index 29b41c836863bc15e7838f3b4029558c81c526e7..e6f23d6efaca0d42bcc8605da12c6efa358ccc81 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLElementStack.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLElementStack.cpp
@@ -31,6 +31,8 @@
#include "core/SVGNames.h"
#include "core/dom/Element.h"
#include "core/html/HTMLElement.h"
+#include "core/html/HTMLFormControlElement.h"
+#include "core/html/HTMLSelectElement.h"
namespace blink {
@@ -163,8 +165,11 @@ void HTMLElementStack::popAll() {
m_stackDepth = 0;
while (m_top) {
Node& node = *topNode();
- if (node.isElementNode())
+ if (node.isElementNode()) {
toElement(node).finishParsingChildren();
+ if (isHTMLSelectElement(node))
+ toHTMLFormControlElement(node).setBlocksFormSubmission(true);
+ }
m_top = m_top->releaseNext();
}
}

Powered by Google App Engine
This is Rietveld 408576698