-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 29.75 Ladybird PRs #25345
Commits on Nov 9, 2024
-
LibWeb: Keep custom properties from all cascade layers
Before this change, we were cascading custom properties for each layer, and then replacing any previously cascaded properties for the element with only the set from this latest layer. The patch fixes the issue by making each pass of the custom property cascade add to the same set, and then finally assigning that set of properties to the element. (cherry picked from commit 95bd0602ba079e0bd7608e39bcbc3b0403ed89d1)
Configuration menu - View commit details
-
Copy full SHA for ddabc44 - Browse repository at this point
Copy the full SHA ddabc44View commit details -
LibWebView: Do floating-point-error-free zoom calculation using rounding
The current min/max zoom levels are supposed to be: 30% and 500%. Before, due to floating point error accumulation in incremental addition of zoom-step into zoom-level, one extra zoom step would get allowed, enabling user to zoom 20%-to-510%. Now, using rounding, the intermediate zoom-level values should be as close to the theoretical value as FP32 can represent. E.g. zoom-level of 70% (theoretical multiplier 0.7) is 0.69... . (cherry picked from commit 96335f31d5a8c6180a4cc0254585bc01ba6742fa)
Configuration menu - View commit details
-
Copy full SHA for d66778f - Browse repository at this point
Copy the full SHA d66778fView commit details -
LibWeb: Implement Range's extension method
This patch implements `Range::getClientRects` and `Range::getBoundingClientRect`. Since the rects returned by invoking getClientRects can be accessed without adding them to the Selection, `ViewportPaintable::recompute_selection_states` has been updated to accept a Range as a parameter, rather than acquiring it through the Document's Selection. With this change, the following tests now pass: - wpt[css/cssom-view/range-bounding-client-rect-with-nested-text.html] - wpt[css/cssom-view/DOMRectList.html] Note: The test "css/cssom-view/range-bounding-client-rect-with-display-contents.html" still fails due to an issue with Element::getClientRects, which will be addressed in a future commit. (cherry picked from commit 75c7dbc5d2dd045733a4c319aeab6644b5b7b36d)
Configuration menu - View commit details
-
Copy full SHA for d9f0de7 - Browse repository at this point
Copy the full SHA d9f0de7View commit details -
LibWeb: Add StyleElementUtils::visit_edges()
Let's do this instead of making embedders visit every field of this helper class. (cherry picked from commit 2064be708f7318f72553fb210f918fe167e08257)
Configuration menu - View commit details
-
Copy full SHA for 4c386e0 - Browse repository at this point
Copy the full SHA 4c386e0View commit details -
LibWeb: Let style elements remember which StyleSheetList they live in
Instead of trying to locate the relevant StyleSheetList on style element removal from the DOM, we now simply keep a pointer to the list instead. This fixes an issue where using attachShadow() on an element that had a declarative shadow DOM would cause any style elements present to use the wrong StyleSheetList when removing themselves from the tree. (cherry picked from commit 8543b8ad6a4d96bd0c247052572b8c2abf3929a7)
Configuration menu - View commit details
-
Copy full SHA for 01a9d5a - Browse repository at this point
Copy the full SHA 01a9d5aView commit details -
LibWeb: Return a WindowProxy from
document.defaultView
This aligns our implementation with the most recent specification steps. (cherry picked from commit 089139f09dbc78455c5c09916cbc97e33f823ca0)
Configuration menu - View commit details
-
Copy full SHA for a2315d8 - Browse repository at this point
Copy the full SHA a2315d8View commit details -
LibWeb: Always flush character insertions before exiting HTML parser
This fixes an issue where document.write() with only text input would leave all the character data as unflushed text in the parser. This fixes many of the WPT tests for document.write(). (cherry picked from commit a0ed12e839f14b3ac80caca0e18a09ca256fd99d)
Configuration menu - View commit details
-
Copy full SHA for 77f0c4e - Browse repository at this point
Copy the full SHA 77f0c4eView commit details -
LibWeb: Allow setting shorthand CSS properties via CSSStyleDeclaration
We now expand shorthands into their respective longhand values when assigning to a shorthand named property on a CSSStyleDeclaration. We also make sure that shorthands can be round-tripped by correctly routing named property access through the getPropertyValue() AO, and expanding it to handle shorthands as well. A lot of WPT tests for CSS parsing rely on these mechanisms and should now start working. :^) Note that multi-level recursive shorthands like `border` don't work 100% correctly yet. We're going to need a bunch more logic to properly serialize e.g `border-width` or `border` itself. (cherry picked from commit e40ad73ae79023f64e250f854d0730c21e0f54fc)
Configuration menu - View commit details
-
Copy full SHA for 063123b - Browse repository at this point
Copy the full SHA 063123bView commit details -
LibWeb: Include siblings+descendants when invalidating style
When an element is invalidated, it's possible for any subsequent sibling or any of their descendants to also need invalidation. (Due to the CSS sibling combinators, `+` and `~`) For DOM node insertion/removal, we must also invalidate preceding siblings, since they could be affected by :first-child, :last-child or :nth-child() selectors. This increases the amount of invalidation we do, but it's more correct. In the future, we will implement optimizations that drastically reduce the number of elements invalidated. (cherry picked from commit df048e10f5a84d7fd90b1115c6bb90f45acd75ec)
Configuration menu - View commit details
-
Copy full SHA for ccb85fa - Browse repository at this point
Copy the full SHA ccb85faView commit details -
LibWeb: Cache whether there are any :has() selectors present
As useful as they may be to web developers, :has() selectors complicate the style invalidation process quite a lot. Let's have StyleComputer keep track of whether they are present at all in the current set of active style sheets. This will allow us to implement fast-path optimizations when there are no :has() selectors. (cherry picked from commit 8beb7c77002a3359ad2fe73969fc6bb2dbc75413)
Configuration menu - View commit details
-
Copy full SHA for a7bab05 - Browse repository at this point
Copy the full SHA a7bab05View commit details -
LibWeb: Don't try to invalidate style for character data nodes
Character data nodes like text and HTML comments don't have style, so let's just exit invalidation immediately for those. (cherry picked from commit f351f75a34619ad969f660312a2e5486f742f685)
Configuration menu - View commit details
-
Copy full SHA for ffe28eb - Browse repository at this point
Copy the full SHA ffe28ebView commit details -
LibWeb: Distinguish parent/child on style invalidation for DOM insertion
(cherry picked from commit 7d644ecd50c57454dfb73b92e59d7112d54a1b1d)
Configuration menu - View commit details
-
Copy full SHA for 1cf02e8 - Browse repository at this point
Copy the full SHA 1cf02e8View commit details -
LibWeb: Invalidate less style on textContent change and node removal
...unless there are :has() selectors present. Then we have to invalidate everything for now. (cherry picked from commit b8ce34068f5bf8ab8cf049d56b864bff52ef3dff)
Configuration menu - View commit details
-
Copy full SHA for d40f857 - Browse repository at this point
Copy the full SHA d40f857View commit details -
LibWeb: Abort ongoing fetch before starting a new link element fetch
If we decide to fetch another linked resource, we don't care about the earlier fetch and can safely abort it. This fixes an issue on GitHub where we'd load the same style sheet multiple times and invalidate style for the entire document every time it finished fetching. By aborting the ongoing fetch, no excess invalidation happens. (cherry picked from commit 57e26ed6b9b2c0cf1e4f5ac3e85ca0c7f3647caa)
Configuration menu - View commit details
-
Copy full SHA for cbe6f44 - Browse repository at this point
Copy the full SHA cbe6f44View commit details -
UI/Qt: Move "Open in New Tab" to the top of the link context menu
(cherry picked from commit 7a2d837c8ab137d8d31b3789dfe7ef377b3b225e)
Configuration menu - View commit details
-
Copy full SHA for c676eb6 - Browse repository at this point
Copy the full SHA c676eb6View commit details -
LibWeb: Update
close_top_level_traversable()
to match the spec(cherry picked from commit 583eef265fe9ba4f91a08e5ef1b7c7339f2371d7)
Configuration menu - View commit details
-
Copy full SHA for aab2670 - Browse repository at this point
Copy the full SHA aab2670View commit details -
LibWeb: Allow WebSockets to be established within workers
Previously, we would crash when attempting to establish a web socket connection from inside a worker, as we were assuming that the ESO's global object was a `Window`. (cherry picked from commit 0c0595bb31db827fc14b5d16b8645bc6aa912d60)
Configuration menu - View commit details
-
Copy full SHA for 1ce9f6f - Browse repository at this point
Copy the full SHA 1ce9f6fView commit details -
LibWeb: Clean up HTMLInputElement-related includes
This mainly uses forward declarations as appropriate for input element related files. This reduces the number of targets being built when we change HTMLInputElement.h from 430 to 44. (cherry picked from commit 57e4fb0caebb0074a23bef70d7558ce5e8a5f357)
Configuration menu - View commit details
-
Copy full SHA for 3621b29 - Browse repository at this point
Copy the full SHA 3621b29View commit details
Commits on Nov 10, 2024
-
LibWeb: Sync with spec in "destroy a document and its descendants"
The only real change here is that we make the document unsalvageable. Everything else is fixing up spec comments. (cherry picked from commit faf097bb4168208a7c0250280ff07e638be8058a)
Configuration menu - View commit details
-
Copy full SHA for 60d6668 - Browse repository at this point
Copy the full SHA 60d6668View commit details -
LibWeb: Make
make_unsalvageable
a public field(cherry picked from commit 8b4dde0b0911f59512e1c40d19f33f49bdeeb10c)
Configuration menu - View commit details
-
Copy full SHA for d22ec94 - Browse repository at this point
Copy the full SHA d22ec94View commit details -
LibWeb: Fix "attempt to update a history entry's document"
This updates our implementation of [attempt-to-populate-the-history-entry's-document](https://html.spec.whatwg.org/multipage/browsing-the-web.html#attempt-to-populate-the-history-entry's-document) after fixes were made to the logic inside the queued task in whatwg/html@cdd014a#diff-41cf6794ba4200b839c53531555f0f3998df4cbb01a4d5cb0b94e3ca5e23947dL99534. (cherry picked from commit ed04124cbffbfe8b850e8e3a1bc0788513ce6a4d)
Configuration menu - View commit details
-
Copy full SHA for 9487535 - Browse repository at this point
Copy the full SHA 9487535View commit details -
LibJS: Update wording from Console spec
whatwg/console#240 is an editorial change to use the term "implementation-defined" more consistently. This seems to be the only instance in the spec text which we quote verbatim. (cherry picked from commit 51f82c1d939dd28a3e719d7fa495cf9f30d0921c)
Configuration menu - View commit details
-
Copy full SHA for 2dd7b53 - Browse repository at this point
Copy the full SHA 2dd7b53View commit details -
WebDriver: Do not break WebDriver responses into multiple socket writes
WPT uses Python's http.client.HTTPConnection to send/receive WebDriver messages. For some reason, on Linux, we see an ~0.04s delay between the WPT server receiving the WebDriver response headers and its body. There are tests which make north of 1100 of these requests, which adds up to ~44s. These connections are almost always going to be over localhost and able the be sent in a single write. So let's send the response all at once. On my Linux machine, this reduces the runtime of /cookies/name/name.html from 45-60s down to 3-4s. (cherry picked from commit e5877cda61eb53cd9c1eebbfaf3c35d084b2973c)
Configuration menu - View commit details
-
Copy full SHA for b9baf79 - Browse repository at this point
Copy the full SHA b9baf79View commit details -
LibWeb/HTML: Implement TextTrackCue idl interface
(cherry picked from commit 0b2449d8d264f58b39ed2a4a69b0afb8eb762011)
Configuration menu - View commit details
-
Copy full SHA for 01e8508 - Browse repository at this point
Copy the full SHA 01e8508View commit details -
LibWeb/HTML: Implement TextTrackCueList idl interface
(cherry picked from commit cfec88feb312f3fbffe2270009a9ba07e2fd9b3f)
Configuration menu - View commit details
-
Copy full SHA for c395b31 - Browse repository at this point
Copy the full SHA c395b31View commit details -
LibWeb/WebVTT: Implement VTTRegion idl interface
(cherry picked from commit 1a012f279a9791c685781b7189fba6cddb973f96)
Configuration menu - View commit details
-
Copy full SHA for 82259fc - Browse repository at this point
Copy the full SHA 82259fcView commit details -
LibWeb/WebVTT: Implement VTTCue idl interface
(cherry picked from commit 973f774e56b519964f2f43d965035d9076658096)
Configuration menu - View commit details
-
Copy full SHA for 9359123 - Browse repository at this point
Copy the full SHA 9359123View commit details -
LibWeb/CSS: Correct behavior of
revert
inside a@layer
`revert` is supposed to revert to the previous cascade origin, but we previously had it reverting to the previous layer. To support both, track them separately during the cascade. As part of this, we make `set_property_expanding_shorthands()` fall back to `initial` if it can't find a previous value to revert to. Previously we would just shrug and do nothing if that happened, which only works if the value you want to revert to is whatever is currently in `style`. That's no longer the case, because `revert` should skip over any layer styles that have been applied since the previous origin. (cherry picked from commit bea47a25545adfb96d83a16a3e4f4435bae05e39)
Configuration menu - View commit details
-
Copy full SHA for eb98ccf - Browse repository at this point
Copy the full SHA eb98ccfView commit details -
LibWeb/CSS: Clarify comment about cascading presentational hints
The spec allows us to either treat them as part of the UA origin, or as its own origin before author styles. This second behaviour turns out to be what we are currently doing, which is nice! Funnily enough this was clarified in the spec barely a month after this original comment was written. :^) (cherry picked from commit dcf55dd4924e5369d75a3533af2b869033a0ebfd)
Configuration menu - View commit details
-
Copy full SHA for b427f1b - Browse repository at this point
Copy the full SHA b427f1bView commit details -
LibWeb/Fetch: Handle edge cases in 'get, decode, and split'
See: - whatwg/fetch#1769 - whatwg/fetch@3153e5e (cherry picked from commit 84351dfa51dc8bd0046c3a9ec3e574c58fe9f790)
Configuration menu - View commit details
-
Copy full SHA for 30e6442 - Browse repository at this point
Copy the full SHA 30e6442View commit details -
LibJS: Don't infinite loop on unknown console.log formatting specifiers
(cherry picked from commit ef9208047dc8770f6263b483d7a442df703bc42b)
Configuration menu - View commit details
-
Copy full SHA for 5bc61b6 - Browse repository at this point
Copy the full SHA 5bc61b6View commit details -
LibWeb: Fire error event when script has an execution error
We now use the "report an exception" AO when a script has an execution error. This has mostly replaced the older "report the exception" AO in various specifications. Using this newer AO ensures that `window.onerror` is invoked when a script has an execution error. (cherry picked from commit 579a289d3db849657987c3310e7b1d71d290b566)
Configuration menu - View commit details
-
Copy full SHA for f89aa4f - Browse repository at this point
Copy the full SHA f89aa4fView commit details -
Base: Navigate DOM tree with arrows
(cherry picked from commit 9d82e8112493575f78f66b1a0dc65ae0e791e70b)
Configuration menu - View commit details
-
Copy full SHA for 8188edd - Browse repository at this point
Copy the full SHA 8188eddView commit details -
LibWeb: Use substring matching for content filters
(cherry picked from commit 2e5edcf27e7d2a212043a7ac1b906217b357b964)
Configuration menu - View commit details
-
Copy full SHA for ebe0797 - Browse repository at this point
Copy the full SHA ebe0797View commit details -
LibWeb: Always blockify the root element
This is what the spec tells us to do: The root element’s display type is always blockified, and its principal box always establishes an independent formatting context. Additionally, a display of contents computes to block on the root element. Spec link: https://drafts.csswg.org/css-display/#root Fixes SerenityOS#1562 (cherry picked from commit f1be662f683155705f851bcf440fe30d0e606a87)
Configuration menu - View commit details
-
Copy full SHA for 0eca32b - Browse repository at this point
Copy the full SHA 0eca32bView commit details -
LibWebSocket: Don't allow a connection to be discarded more than once
(cherry picked from commit 6095aa3cc5a38367a57c3d734129017104498904)
Configuration menu - View commit details
-
Copy full SHA for 8b75b85 - Browse repository at this point
Copy the full SHA 8b75b85View commit details -
LibWeb/WebSocket: Allow sending binary blob data over a websocket
(cherry picked from commit 4ccc52e921a5b17c6f6ec67dec7c0dff46ac7884)
Configuration menu - View commit details
-
Copy full SHA for c2c5eb8 - Browse repository at this point
Copy the full SHA c2c5eb8View commit details -
LibWeb: Forbid reentrancy of style-layout-repaint in EventLoop::process
Fixes crashing on https://playbiolab.com/ in VERIFY(page.client().is_ready_to_paint()) caused by attempting to start the next repaint before the ongoing repaint is done. (cherry picked from commit f341af1d7265eee880355f10ef5d479c9ebceaf2)
Configuration menu - View commit details
-
Copy full SHA for 319f25d - Browse repository at this point
Copy the full SHA 319f25dView commit details -
LibWeb/HTML: Re-order promise resolution to match spec
Applies changes in whatwg/html#10658 and also whichever previous change split the step for firing the navigateerror into two parts. (cherry picked from commit ec15f8fa626e5b0faf5b3e420080e944ab31ff11)
Configuration menu - View commit details
-
Copy full SHA for 473bac0 - Browse repository at this point
Copy the full SHA 473bac0View commit details -
LibWeb: Deduplicate attributes when emitting start and end tags
The HTML tokenizer specification says that we're supposed to do this when leaving the Attribute name or when emitting the token, as appropriate. Hopefully 'as appropriate' can mean only when emitting the token, as that's the easiest place to insert this logic without complicating the tokenizer any more. (cherry picked from commit 7aa0165fe75bb94b79bc847484c7913d249ce263)
Configuration menu - View commit details
-
Copy full SHA for 73161fc - Browse repository at this point
Copy the full SHA 73161fcView commit details -
UI/Qt: Do not create signal notifiers until after an event loop exists
We are currently creating a signal socket and socket notifier before the Qt event loop itself has been created. Thus, when we receive a signal, we are not actually notified when we write that signal number to the signal socket. This was also the source of the following error message being displayed on every launch of the browser: QSocketNotifier: Can only be used with threads started with QThread (cherry picked from commit 3393a7477103cb2dc2fe970e3559abb34b3a0ce8)
Configuration menu - View commit details
-
Copy full SHA for 7119d93 - Browse repository at this point
Copy the full SHA 7119d93View commit details -
LibWeb/MimeSniff: Update the MIME type sniffing algo to meet specs
The spec moved/added the xml and html checks to the beginning and removed sniffing resource feeds. (cherry picked from commit b8a5e18a016dc32ba065417a4d6d32bbc03f101d)
Configuration menu - View commit details
-
Copy full SHA for 2cc7dcb - Browse repository at this point
Copy the full SHA 2cc7dcbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 95a99f5 - Browse repository at this point
Copy the full SHA 95a99f5View commit details