LibWeb+LibGC: Import GC swift module into LibWeb and an initial user

Start work on a speculative HTML Parser in Swift. This component will
walk ahead of the normal HTML parser looking for fetch() requests to
make while the normal parser is blocked. This work exposed many holes in
the Swift C++ interop component, which have been reported upstream.
This commit is contained in:
Andrew Kaster 2025-03-22 19:12:30 -06:00 committed by Andrew Kaster
parent 8554ee386e
commit 9ee2473aa4
Notes: github-actions[bot] 2025-04-03 22:49:20 +00:00
5 changed files with 70 additions and 4 deletions

View file

@ -214,10 +214,14 @@ private:
GC::Ptr<DOM::Text> m_character_insertion_node;
StringBuilder m_character_insertion_builder;
};
} SWIFT_UNSAFE_REFERENCE;
RefPtr<CSS::CSSStyleValue> parse_dimension_value(StringView);
RefPtr<CSS::CSSStyleValue> parse_nonzero_dimension_value(StringView);
Optional<Color> parse_legacy_color_value(StringView);
// Swift interop
using HTMLParserGCPtr = GC::Ptr<HTMLParser>;
using HTMLParserGCRef = GC::Ref<HTMLParser>;
}