Closed Bug 1846853 Opened 1 year ago Closed 1 year ago

Negative outline-offset is not clamped as spec

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: canadahonk, Assigned: canadahonk)

References

Details

(Keywords: perf-alert)

Attachments

(2 files)

As per https://www.w3.org/TR/css-ui-4/#outline-offset (last paragraph):

Negative values must cause the outline to shrink into the border box. Both the height and the width of the outside of the shape drawn by the outline should not become smaller than twice the computed value of the outline-width property to make sure that an outline can be rendered even with large negative values. User agents should apply this constraint independently in each dimension. If the outline is drawn as multiple disconnected shapes, this constraint applies to each shape separately.

Currently Chromium does this but we do not (/ it's bugged?); too small a outline-offset value causes the outline to not be shown.

A negative outline-offset value should be clamped per spec as to stop it
from becoming invisible with large negative values.

Spec ref: https://www.w3.org/TR/css-ui-4/#outline-offset

WIP. Todo:

  • Write WPT reftest
Assignee: nobody → oj
Status: NEW → ASSIGNED
Severity: -- → S3
Priority: -- → P3
Attachment #9347273 - Attachment description: WIP: Bug 1846853 - Clamp negative outline-offset per spec → Bug 1846853 - Clamp negative outline-offset per spec
Pushed by oj@oojmed.com: https://hg.mozilla.org/integration/autoland/rev/959c2f0abc19 Clamp negative outline-offset per spec r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41591 for changes under testing/web-platform/tests
Upstream PR was closed without merging

Updated WPT expectations and removed that old (16 years) layout reftest, will wait for rereview before pushing again.

Flags: needinfo?(oj)
Pushed by oj@oojmed.com: https://hg.mozilla.org/integration/autoland/rev/337531b04603 Clamp negative outline-offset per spec r=emilio

Backed out for causing reftests failures.

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: REFTEST TEST-UNEXPECTED-FAIL | layout/reftests/bugs/424236-9.html == layout/reftests/bugs/424236-9-ref.html | image comparison, max difference: 255, number of differing pixels: 13
Flags: needinfo?(oj)
Upstream PR was closed without merging
Pushed by oj@oojmed.com: https://hg.mozilla.org/integration/autoland/rev/5678a26be6d4 Clamp negative outline-offset per spec r=emilio

Another old reftest was bugged, fixed and repushed.

Flags: needinfo?(oj)
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
Upstream PR merged by moz-wptsync-bot

Fairly skeptic this change is the culprit. Positive cnn speed improvements were noticed in try runs for bug 1849720. Could that be the case?

Flags: needinfo?(aesanu)

Hi :emilio. The push you reference has some fails (builds probably). Can we have the push you seen cnn speed improvements, please?

Flags: needinfo?(aesanu) → needinfo?(emilio)

Sure, here

Flags: needinfo?(emilio) → needinfo?(aionescu)

Thanks!

Flags: needinfo?(aionescu)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: