Commit graph

7 commits

Author SHA1 Message Date
Simon Wülker
7fd0c81f55
Implement URLPattern::{text, exec} (#37044)
With this change the URLPattern API is fully implemented. I'll look into
the remaining failures and then enable the preference by default.

Testing: Covered by web platform tests

Depends on https://github.com/servo/servo/pull/37042

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-05-24 11:12:11 +00:00
Simon Wülker
03abec4148
Replace urlpattern implementation with rust-urlpattern crate (#36826)
This change implements the full URLPattern API using
https://github.com/denoland/rust-urlpattern, except the two most
important functions (`test` and `exec`). These two are blocked on
https://github.com/servo/servo/issues/28679 due to this union:
539ca27284/components/script_bindings/webidls/URLPattern.webidl (L61).

Testing: Covered by existing web platform tests
Makes https://github.com/servo/servo/pull/36421 obsolete

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-05-06 09:42:55 +00:00
Simon Wülker
8f1c23692e
Create a parser for URLPatterns (#36382)
This change implements the pattern parser, completing the "parsing
pipeline" for URL patterns.

Testing: Primarily `urlpattern/urlpattern-hasregexpgroups.any.js`, some
other subtests start to pass too.

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-07 18:08:22 +00:00
Simon Wülker
0a4174ad0e
Add a tokenizer for URLPatterns (#36362)
Not a lot of new tests start to pass because the actual parser is still
missing, so we're only passing tests for invalid inputs. The parser will
be added in the next PR.

This is part 3 of upstreaming the changes in
https://github.com/simonwuelker/servo/tree/urlpattern

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-04-07 06:25:32 +00:00
Servo WPT Sync
ecaf2930cc
Update web-platform-tests to revision b'9d20f3ae600d00673a27a69f69e13d4cd8eca443' (#36195)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
2025-03-28 06:07:42 +00:00
Simon Wülker
517f99e067
Start implementing the URLPattern API (#36144)
* Start working on a basic URLPattern implementation

This is API part of Interop 2025, so we should definitely support it!

This change implements the basic workflow for parsing
and compiling URL patterns. Parts of it are stubbed out and will be
implemented later.

For now the API is preference-gated behind "dom_urlpattern_enabled".

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Preference-gate the URLPattern API

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update WPT expectations

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Fix full wildcard value (Should be ".*" not "*")

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-03-27 10:39:57 +00:00
Simon Wülker
c8a8f56f4e
Import URLPattern tests (#36145)
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-03-25 17:51:08 +00:00