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

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

Issue 2169433002: HTMLTreeBuilderSimulator: Element created inside HTMLIntegrationPoint should be HTMLElement Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/HTMLTreeBuilderSimulator.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.cpp b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.cpp
index 67e9caff836c76efa3d406a4058f54b028526890..21cdc5ff5a4f445d381aade18299b53796f5d955 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilderSimulator.cpp
@@ -175,14 +175,16 @@ HTMLTreeBuilderSimulator::SimulatedToken HTMLTreeBuilderSimulator::simulate(cons
if (inForeignContent() && tokenExitsForeignContent(token))
m_stack.removeLast();
- if (threadSafeMatch(tagName, SVGNames::svgTag))
+ if (currentNodeIsHTMLIntegrationPoint)
+ m_stack.append(StateFlags {HTML, false});
dominicc (has gone to gerrit) 2016/07/21 02:14:48 Why don't we need a matching change to "pop" this?
+ else if (threadSafeMatch(tagName, SVGNames::svgTag))
m_stack.append(StateFlags {SVG, tokenStartsHTMLIntegrationPoint(token)});
else if (threadSafeMatch(tagName, MathMLNames::mathTag))
m_stack.append(StateFlags {MathML, tokenStartsHTMLIntegrationPoint(token)});
else if ((currentNodeNamespace == SVG && tokenExitsSVG(token))
|| (currentNodeNamespace == MathML && tokenExitsMath(token)))
m_stack.append(StateFlags {HTML, tokenStartsHTMLIntegrationPoint(token)});
- else if (elementMayBeHTMLIntegrationPoint(token.data()) != currentNodeIsHTMLIntegrationPoint)
+ else if (elementMayBeHTMLIntegrationPoint(token.data()))
m_stack.append(StateFlags {static_cast<unsigned>(currentNodeNamespace), tokenStartsHTMLIntegrationPoint(token)});
if (!inForeignContent() || currentNodeIsHTMLIntegrationPoint) {

Powered by Google App Engine
This is Rietveld 408576698