summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/html/parser/html_tree_builder_simulator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/html/parser/html_tree_builder_simulator.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/html/parser/html_tree_builder_simulator.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/chromium/third_party/blink/renderer/core/html/parser/html_tree_builder_simulator.cc b/chromium/third_party/blink/renderer/core/html/parser/html_tree_builder_simulator.cc
index ed65f066854..65135aee48b 100644
--- a/chromium/third_party/blink/renderer/core/html/parser/html_tree_builder_simulator.cc
+++ b/chromium/third_party/blink/renderer/core/html/parser/html_tree_builder_simulator.cc
@@ -211,7 +211,13 @@ HTMLTreeBuilderSimulator::SimulatedToken HTMLTreeBuilderSimulator::Simulate(
}
}
}
-
+ if (token.GetType() == HTMLToken::kEndTag && InForeignContent()) {
+ const String& tag_name = token.Data();
+ if (ThreadSafeMatch(tag_name, html_names::kPTag) ||
+ ThreadSafeMatch(tag_name, html_names::kBrTag)) {
+ namespace_stack_.pop_back();
+ }
+ }
if (token.GetType() == HTMLToken::kEndTag ||
(token.GetType() == HTMLToken::kStartTag && token.SelfClosing() &&
InForeignContent())) {