Closed Bug 1734781 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 30973 - Don't always unlock DisplayLocks in CanContainRangeEndPoint

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Joey Arhar <jarhar@chromium.org> wrote:

Don't always unlock DisplayLocks in CanContainRangeEndPoint

SelectionModifier::Modify updates the lifecycle to PrePaintClean in
order to get paint information it needs. Within this function,
HTMLMeterElement::CanContainRangeEndpoint may be called, which means
that we can't unlock DisplayLocks because that would dirty style and hit
DCHECKs with lifecycle updates since we are already at PrePaintClean.

Ideally we would try to unlock DisplayLocks before the lifecycle update
to PrePaintClean, but in this case where the selection range is being
extended to include other nodes, it doesn't really make sense - we don't
know which node(s) we want to extend to and unlock until after the
update to PrePaintClean, but at that point its too late to unlock
DisplayLocks for that node...

Fixed: 1251369
Change-Id: I25baafb85419deb399042f4c30c0089b56f4b241
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3184901
Commit-Queue: Yoshifumi Inoue \<yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue \<yosin@chromium.org>
Reviewed-by: vmpstr \<vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#929599}

Component: web-platform-tests → Layout
Product: Testing → Core

CI Results

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

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

PASS: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/47cfb9c6159a
[wpt PR 30973] - Don't always unlock DisplayLocks in CanContainRangeEndPoint, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.