mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibWeb: Add an optional pointer to an HTMLParser to the HTMLTokenizer
This is needed to access the 'adjusted current node' in the 'Markup declaration open state'. We don't want to create a full parser for something like syntax highlighting, so it's optional (null) by default.
This commit is contained in:
committed by
Andreas Kling
parent
9130ecfd5e
commit
3f7086f91a
@@ -130,6 +130,7 @@ HTMLParser::HTMLParser(DOM::Document& document, StringView input, const String&
|
||||
: m_tokenizer(input, encoding)
|
||||
, m_document(document)
|
||||
{
|
||||
m_tokenizer.set_parser({}, *this);
|
||||
m_document->set_should_invalidate_styles_on_attribute_changes(false);
|
||||
auto standardized_encoding = TextCodec::get_standardized_encoding(encoding);
|
||||
VERIFY(standardized_encoding.has_value());
|
||||
|
||||
Reference in New Issue
Block a user