mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-04 17:33:04 +00: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:
parent
3c45d155a6
commit
8cfac6ed71
Notes:
github-actions[bot]
2025-04-16 15:03:28 +00:00
Author: https://github.com/ADKaster
Commit: 8cfac6ed71
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4373
3 changed files with 39 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue