mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Store a SpeculativeHTMLParser on the HTML Parser
The parser was previously added, but unused. Actually attaching one to the HTML Parser will let us test the limits of Swift interop.
This commit is contained in:
committed by
Andrew Kaster
parent
3c45d155a6
commit
8cfac6ed71
Notes:
github-actions[bot]
2025-04-16 15:03:28 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/8cfac6ed710 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4373
@@ -14,6 +14,14 @@
|
||||
#include <LibWeb/HTML/Parser/StackOfOpenElements.h>
|
||||
#include <LibWeb/MimeSniff/MimeType.h>
|
||||
|
||||
#ifdef LIBWEB_USE_SWIFT
|
||||
# include <LibGC/ForeignCell.h>
|
||||
|
||||
namespace Web {
|
||||
class SpeculativeHTMLParser;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
#define ENUMERATE_INSERTION_MODES \
|
||||
@@ -96,6 +104,7 @@ private:
|
||||
HTMLParser(DOM::Document&);
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
char const* insertion_mode_name() const;
|
||||
|
||||
@@ -210,6 +219,10 @@ private:
|
||||
GC::Ptr<HTMLFormElement> m_form_element;
|
||||
GC::Ptr<DOM::Element> m_context_element;
|
||||
|
||||
#ifdef LIBWEB_USE_SWIFT
|
||||
GC::ForeignPtr<Web::SpeculativeHTMLParser> m_speculative_parser;
|
||||
#endif
|
||||
|
||||
Vector<HTMLToken> m_pending_table_character_tokens;
|
||||
|
||||
GC::Ptr<DOM::Text> m_character_insertion_node;
|
||||
|
||||
Reference in New Issue
Block a user