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 1.416666 ladybird PRs #25475

Merged
merged 9 commits into from
Nov 25, 2024
Merged

Cherry-pick 1.416666 ladybird PRs #25475

merged 9 commits into from
Nov 25, 2024

Conversation

nico
Copy link
Contributor

@nico nico commented Nov 25, 2024

LadybirdBrowser/ladybird#1434 all but first commit
LadybirdBrowser/ladybird#1644 all but 5th (got reverted) and last two (don't apply yet) commits

We were only looking at the current top-level navigable and its children
when searching for the specified window handle. We need to search *all*
known navigables if the handle belongs to a window not in the current
tree.

(cherry picked from commit 47e9357243c5e561576d03ed8d1c444076847272)
Attributes have a max value length of 1024. So we theoretically need to
support values in the range -${"9".repeat(1023)} to ${"9".repeat(1024)}.
These obviously do not fit in an i64, so we were previously failing to
parse the attribute.

We will now cap the parsed value to the numeric limits of an i64, after
ensuring that the attribute value is indeed a number.

(cherry picked from commit ba1189cd1c47ab0593e0c3d7eee85e7aafc3462d)
We were missing this spec step when parsing the Path attribute.

(cherry picked from commit e74d2b17620b1d68d66d51a13831ee1657154a1c)
This case was missed in commit b5aa8f65b168c668e41ce61c966dae8198e233ed.

(cherry picked from commit 969361abdb73dce664933d0250ab90ed668bc0b6)
We are currently trying to access the current parent and top-level
browsing contexts from the current BC itself. However, if the current BC
is closed, its association to the parent and top-level BCs is lost, and
we are no longer able to handle WebDriver endpoints involving those BCs.

Instead, let's store the parent and top-level BCs separately, and update
them in accordance with the spec.

(cherry picked from commit ab3cfd9bbb3d572d2e1ce4337e112d10ac0e94a3)
This avoids a crash seen in WPT when a click event is fired on a BC that
has been removed from the document.

(cherry picked from commit 95bf6c98779bbb879b19319884389148e8cd2fd2)
(cherry picked from commit 5aa50bff8b2b82c34cfaa09de32f3162d36b2a24)
(cherry picked from commit 84df1bf585de217ccf3399e31708af96c95bb9fe)
This happens when window.close() is invoked immediately upon a window
being opened.

(cherry picked from commit ce11a907263670a326ccb4a9625bfeaa65dac937)
@nico nico requested a review from trflynn89 as a code owner November 25, 2024 01:16
@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Nov 25, 2024
@nico nico merged commit db0a80b into SerenityOS:master Nov 25, 2024
13 checks passed
@nico nico deleted the pr-1434 branch November 25, 2024 02:30
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Nov 25, 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