mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
AK+LibURL: Move AK::URL into a new URL library
This URL library ends up being a relatively fundamental base library of the system, as LibCore depends on LibURL. This change has two main benefits: * Moving AK back more towards being an agnostic library that can be used between the kernel and userspace. URL has never really fit that description - and is not used in the kernel. * URL _should_ depend on LibUnicode, as it needs punnycode support. However, it's not really possible to do this inside of AK as it can't depend on any external library. This change brings us a little closer to being able to do that, but unfortunately we aren't there quite yet, as the code generators depend on LibCore.
This commit is contained in:
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
Parser(Parser&&);
|
||||
|
||||
CSSStyleSheet* parse_as_css_stylesheet(Optional<URL> location);
|
||||
CSSStyleSheet* parse_as_css_stylesheet(Optional<URL::URL> location);
|
||||
ElementInlineCSSStyleDeclaration* parse_as_style_attribute(DOM::Element&);
|
||||
CSSRule* parse_as_css_rule();
|
||||
Optional<StyleProperty> parse_as_supports_condition();
|
||||
@@ -86,11 +86,11 @@ private:
|
||||
|
||||
// "Parse a stylesheet" is intended to be the normal parser entry point, for parsing stylesheets.
|
||||
struct ParsedStyleSheet {
|
||||
Optional<URL> location;
|
||||
Optional<URL::URL> location;
|
||||
Vector<NonnullRefPtr<Rule>> rules;
|
||||
};
|
||||
template<typename T>
|
||||
ParsedStyleSheet parse_a_stylesheet(TokenStream<T>&, Optional<URL> location);
|
||||
ParsedStyleSheet parse_a_stylesheet(TokenStream<T>&, Optional<URL::URL> location);
|
||||
|
||||
// "Parse a list of rules" is intended for the content of at-rules such as @media. It differs from "Parse a stylesheet" in the handling of <CDO-token> and <CDC-token>.
|
||||
template<typename T>
|
||||
@@ -195,7 +195,7 @@ private:
|
||||
Optional<GridRepeat> parse_repeat(Vector<ComponentValue> const&);
|
||||
Optional<ExplicitGridTrack> parse_track_sizing_function(ComponentValue const&);
|
||||
|
||||
Optional<URL> parse_url_function(ComponentValue const&);
|
||||
Optional<URL::URL> parse_url_function(ComponentValue const&);
|
||||
RefPtr<StyleValue> parse_url_value(ComponentValue const&);
|
||||
|
||||
Optional<Vector<LinearColorStopListElement>> parse_linear_color_stop_list(TokenStream<ComponentValue>&);
|
||||
@@ -330,7 +330,7 @@ private:
|
||||
|
||||
namespace Web {
|
||||
|
||||
CSS::CSSStyleSheet* parse_css_stylesheet(CSS::Parser::ParsingContext const&, StringView, Optional<URL> location = {});
|
||||
CSS::CSSStyleSheet* parse_css_stylesheet(CSS::Parser::ParsingContext const&, StringView, Optional<URL::URL> location = {});
|
||||
CSS::ElementInlineCSSStyleDeclaration* parse_css_style_attribute(CSS::Parser::ParsingContext const&, StringView, DOM::Element&);
|
||||
RefPtr<CSS::StyleValue> parse_css_value(CSS::Parser::ParsingContext const&, StringView, CSS::PropertyID property_id = CSS::PropertyID::Invalid);
|
||||
Optional<CSS::SelectorList> parse_selector(CSS::Parser::ParsingContext const&, StringView);
|
||||
|
||||
Reference in New Issue
Block a user