Closed Bug 1997569 Opened 2 months ago Closed 2 months ago

margins/borders/padding may interfere with text-decoration-inset computation

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Points:
1

Tracking

()

RESOLVED FIXED
146 Branch
Tracking Status
firefox146 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [jp-mvp], [wptsync upstream])

Attachments

(5 files)

See attached testcase. All the examples should render with the same decoration lines, matching the first (reference) example, as the "natural" size of the decorations is the same in all cases (just the extent of the text), and they have the same text-decoration-inset applied.

Comment on attachment 9523755 [details]
rendering of the testcase in current Nightly with text-decoration-inset enabled

Observe that the overline is not extended in any of the test cases, and the amount of inset applied to the underline varies.

Status: NEW → ASSIGNED
Points: --- → 1
Whiteboard: [jp-triage] → [jp-mvp]

This makes sense because it is the content area within which the text
is positioned and has the decoration drawn.

Fixes the underline on the first few examples in the testcase (but not
the more complex ones; see following patch).

If there are frames in between the target frame we're rendering and the container
where the decoration was defined, their margin/border/padding effectively reduces
the area within which the decoration is being drawn.

This fixes the rendering of the remaining examples in the testcase so that the
inset is applied consistently in all of them.

Pushed by jkew@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/1b41a53e287f https://hg.mozilla.org/integration/autoland/rev/1d0ab889bdf2 When the decorating frame is an inline, use its content (not border) rect as the basis for text-decoration-inset computation. r=layout-jp-market-reviewers,layout-reviewers,AlaskanEmily https://github.com/mozilla-firefox/firefox/commit/cfc7d6b047ac https://hg.mozilla.org/integration/autoland/rev/2e54ae451e80 Adjust text-decoration-inset computations for margin/border/padding intervening between the decorating frame and the text. r=layout-jp-market-reviewers,layout-reviewers,AlaskanEmily https://github.com/mozilla-firefox/firefox/commit/8328c2006d5e https://hg.mozilla.org/integration/autoland/rev/5bad38d543e2 Add WPT reftest for text-decoration-inset rendering when padding/border/margin are present. r=layout-jp-market-reviewers,AlaskanEmily
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/55813 for changes under testing/web-platform/tests
Whiteboard: [jp-mvp] → [jp-mvp], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 146 Branch
Upstream PR merged by moz-wptsync-bot
QA Whiteboard: [qa-triage-done-c147/b146]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: