Closed Bug 1860179 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 42649 - Avoid O(n^2) in fragmented background painting.

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Morten Stenshorne <mstensho@chromium.org> wrote:

Avoid O(n^2) in fragmented background painting.

Rewrite OffsetInStitchedFragments() to calculate the offset in O(1) time
complexity instead of O(n) (where n is the number of fragments) - most
of the time: Some searching is still necessary if the node has
overflowing content. The new WPT test is for overflowing content, since
we lacked coverage for it (this test used to pass, and still passes).

For this to work, also set the IsAtBlockEnd flag correctly for break
tokens in repeated content, since the new code calls that function. This
is necessary if repeated content establishes a nested multicol container
on its own.
wpt/css/css-break/table/repeated-section/multicol.tentative.html would
otherwise crash.

The time spent in LocalFrameView::RunPaintLifecyclePhase() with the
performance test included goes down from 1219ms to 46ms.

Bug: 1476817
Change-Id: I94821bac4cedc99c1f5c445bcc3a9c7c293824fc
Reviewed-on: https://chromium-review.googlesource.com/4956634
WPT-Export-Revision: b7bce67574de3ccda8c0d8eacde14ef457e390c7

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

CI Results

Ran 9 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

FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1646d653a957 [wpt PR 42649] - Avoid O(n^2) in fragmented background painting., a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.