This doesn't seem like something we will neccessarily do in the URL
class anyway due to performance reasons - unless strictly needed (like
for the DOMURL implementation).
(cherry picked from commit 670ce3ebb17173a2f529cd0ce7cbe8b194c1573a)
The definition of an "ASCII tab or newline" also includes U+000D CR.
This fixes 3 subtests in:
https://wpt.live/url/url-constructor.any.html
(cherry picked from commit 41cf9f6fe3f6a36094a8db3ace0733e1e3666092)
We were previously not checking for C0 control, U+0025 (%), or U+007F
DELETE.
This makes another good set of URL tests in WPT pass :^)
(cherry picked from commit fdf4f1e887df18bfb51d2c4d8cc469bc75cc016f)
This patch moves the data members of URL to an internal URL::Data struct
that is also reference-counted. URL then uses a CopyOnWrite<T> template
to give itself copy-on-write behavior.
This means that URL itself is now 8 bytes per instance, and copying is
cheap as long as you don't mutate.
This shrinks many data structures over in LibWeb land. As an example,
CSS::ComputedValues goes from 3024 bytes to 2288 bytes per instance.
(cherry picked from commit 936b76f36e87a6d4cf267c15c95786ef677515fc)
This fixes an issue where entering EXAMPLE.COM into the URL bar in the
browser would fail to load as expected.
(cherry picked from commit 1a4b042664f8fddbfa70f009c5873b1f8575bf0b)
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.