Closed Bug 1893059 Opened 6 months ago Closed 6 months ago

[wpt-sync] Sync PR 45855 - script: Emulate 'nearest' for inline axis in scroll to fragment

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 45855 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/45855
Details from upstream follow.

Martin Robinson <mrobinson@igalia.com> wrote:

script: Emulate 'nearest' for inline axis in scroll to fragment

Scrolling to fragment is supposed to be implemented via a call to
scrollIntoView() with the configuration "nearest" for the inline
axis. Servo doesn't have support for scrollIntoView() yet, so emulate
support for that by comparing the target rectangle with the viewport
rectangle.

This also necesitated initializing the current viewport when creating
the Window object, which wasn't done before for some reason.

<!-- Please describe your changes on the following line: -->

Reviewed in servo/servo#32129

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
PASS: 1

Chrome

OK : 1
PASS: 1

Safari

OK : 1
PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f427752c7d50 [wpt PR 45855] - script: Prevent "scroll to fragment" from scrolling offscreen, a=testonly
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
You need to log in before you can comment on or make changes to this bug.