Closed Bug 1856640 Opened 2 years ago Closed 2 years ago

Investigate WPT container-queries/font-relative-units.html intermittents

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: dshin, Assigned: dshin)

References

Details

(Keywords: perf-alert)

Attachments

(1 file)

Currently annotated as known intermittent failures.

Discovered during Bug 1310170. On the opt build, there's a pretty good chance that all of them will fail, but sometimes they pass.

Severity: -- → S3
See Also: → 1842040
Summary: Investigate WPT font-relative-units.html intermittents → Investigate WPT container-queries/font-relative-units.html intermittents
See Also: → 1879175

(Running into this while implementing bug 1856640)
For the case where every tests fail, during the first styling, Gecko_GetQueryContainerSize returns early with no primary frame, so the container ends up with a size container with unknown width & height.
During getComputedStyle(..).color we don't particularly flush style, so we fail the test.
Second styling happens after the test fails, so subsequent getComputedStyle(..).color shows the intended green color.

(Corrected sequence of events)

  1. Stylesheet for Ahem font starts loading @import url("/fonts/ahem.css");.
  2. Stylesheet completes loading, PresShell starts initializing
  3. Layout starts, calling down to nsCSSFrameConstructor::ConstructDocElementFrame
  4. Styling happens
  5. Since no primary frame is constructed, all queries fail
  6. Frames are constructed
  7. Reflow is triggered, through InsertAnonymousContentInContainer - note that it's a frame flush, not a layout flush.
  8. Container query happens - it has a frame, but the width of the container is 0, so the container query condition fails, again.
  9. Test happens and fails
  10. Restyle happens at refresh driver tick, with an interruptible layout flush.
  11. Container condition query succeeds
Assignee: nobody → dshin
Status: NEW → ASSIGNED
Pushed by dshin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8dcd15392aae Ensure layout flush for as-of-yet reflowed frames when querying computed style of elements potentially matching container query. r=firefox-style-system-reviewers,emilio

Backed out for causing build bustages with HasUnreflowedContainerQueryAncestor()

Flags: needinfo?(dshin)
Pushed by dshin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e78502740130 Ensure layout flush for as-of-yet reflowed frames when querying computed style of elements potentially matching container query. r=firefox-style-system-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
Flags: needinfo?(dshin)

(In reply to Cristian Tuns from comment #6)

Backed out for causing build bustages with HasUnreflowedContainerQueryAncestor()

== Change summary for alert #41670 (as of Tue, 05 Mar 2024 11:01:32 GMT) ==

Regressions:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
15% imgur loadtime windows10-64-shippable-qr cold fission webrender 1,969.94 -> 2,273.90 Before/After
3% imgur LastVisualChange windows10-64-shippable-qr cold fission webrender 7,470.24 -> 7,663.06 Before/After

Improvements:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
7% microsoft FirstVisualChange windows10-64-shippable-qr fission warm webrender 177.98 -> 166.13
6% microsoft ContentfulSpeedIndex windows10-64-shippable-qr fission warm webrender 178.61 -> 167.42
6% microsoft PerceptualSpeedIndex windows10-64-shippable-qr fission warm webrender 186.38 -> 174.73
3% imgur loadtime windows10-64-shippable-qr fission warm webrender 485.05 -> 472.37
2% imgur fcp windows10-64-shippable-qr fission warm webrender 425.82 -> 416.03

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=41670

Perf impact is evaluated on the backout build, so not sure how valid that impact is?
Either way, I've taken a look at the graph for the two regressing tests, and I don't think I see any step-wise increase around this change landed & stuck.

See Also: 1879175
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: