Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick "LibURL+LibWeb: More WPT fixes, and deduplication of Origin implementation" #25446

Merged
merged 9 commits into from
Nov 22, 2024

Conversation

nico
Copy link
Contributor

@nico nico commented Nov 22, 2024

(cherry picked from commit fb2b78620d7db7b969c29624d0cc183222441e9c)
This fixes four tests for the IDL harness for URL under:

https://wpt.live/url/idlharness.any.html
and https://wpt.live/url/idlharness.any.worker.html

But probably some tests in other places too :^)

(cherry picked from commit e9dd05b2b52aa6363b5c5e2e90099b8e1c28e868)
While Origin is defined in the HTML spec - this leaves us with quite an
awkward relationship as the URL spec makes use of AO's from what is
defined in the HTML spec.

To simplify this factoring, relocate Origin into LibURL.

(cherry picked from commit dc401f49ea7e861064484e79594e35c3d93000ae;
amended to fix minor conflicts due to serenity not (yet?) having a
LibUnicode/Segmenter.h include in Document.cpp, and due to
BrowsingContext already having LadybirdBrowser/ladybird#2358 in
serenity)
This will help solve a future circular dependency between URL.h
and Origin.h

(cherry picked from commit 53ad982bb7f144a21eded724f873d201350d95e1)
This is also in an effort towards resolving a future circular dependency
between Origin.h and URL.h

(cherry picked from commit 43973f2d0a32aedf4405f246b5f2806f61016384;
amended to fix tiny include conflict in Document.cpp)
This closer matches specification - and removes any dependency on
LibWeb in the implementation of DOMURL::url_origin.

It is also one step closer to moving BlobURLRegistry to a singleton
process to match LibWeb's multiprocess Worker architecture.

(cherry picked from commit 12ea470417e837c9c7456ecc1cc81b0294a2d3bb)
@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Nov 22, 2024
shannonbooth and others added 3 commits November 21, 2024 21:32
Because of the previous awkward factoring of Origin we had two
implementations of Origin serializing and creation. Move the
implementation of DOMURL::url_origin into URL::origin, and
instead use the implemenation of URL::Origin::serialize for
serialization (replacing URL::serialize_origin).

This happens to fix 8 URL subtests as the two implemenations had
diverged, and URL::serialize_origin was previously missing the spec
changes of: whatwg/url@eee49fd and whatwg/url@fff33c3

(cherry picked from commit 501f92b54eee7bcf7b60621aa4238fcbdc610d99;
amended to add leading whitespace to expectation due to serenity not
yet having LadybirdBrowser/ladybird#1603)
It is not treated as the same thing in the specification, or by us in
other places too. This fixes 8 more origin related URL tests on WPT.

(cherry picked from commit 088b659abd123e0462bca7a6a9b534c0d89c668a;
amended to add leading whitespace to expectation due to serenity not
yet having LadybirdBrowser/ladybird#1603)
@nico nico merged commit fec88bd into SerenityOS:master Nov 22, 2024
12 checks passed
@nico nico deleted the pr-1636 branch November 22, 2024 03:16
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants