mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
If attachment fails for whatever reason (e.g the host element is not allowed to be a host), the HTML spec tells us to insert the template element anyway and proceed. Before this change, we were recomputing the insertion location at this point, which caused it to be *inside* the template element. Inserting the template element into itself didn't work, and so the DOM would end up incorrect. The fix here is to simply use the insertion point we determined earlier in the same function, before putting a template element on the stack of open elements. We already do this elsewhere. Fixes at least 228 subtests on WPT. :^) |
||
---|---|---|
.. | ||
Entities.cpp | ||
Entities.h | ||
Entities.json | ||
HTMLEncodingDetection.cpp | ||
HTMLEncodingDetection.h | ||
HTMLParser.cpp | ||
HTMLParser.h | ||
HTMLToken.cpp | ||
HTMLToken.h | ||
HTMLToken.swift | ||
HTMLTokenizer.cpp | ||
HTMLTokenizer.h | ||
HTMLTokenizer.swift | ||
HTMLTokenizerHelpers.cpp | ||
HTMLTokenizerHelpers.h | ||
ListOfActiveFormattingElements.cpp | ||
ListOfActiveFormattingElements.h | ||
SpeculativeHTMLParser.swift | ||
StackOfOpenElements.cpp | ||
StackOfOpenElements.h |