Closed Bug 1560205 Opened 5 years ago Closed 5 years ago

Fix WPT background-image-first-line.html to specify a line-height

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This WPT test currently fails:
http://w3c-test.org/css/css-backgrounds/background-image-first-line.html
http://w3c-test.org/css/css-backgrounds/reference/background-image-first-line-ref.html

...because the testcase puts the background on a ::first-line selector, and the line-height is left at its default value normal, which for us means ~1.2em which gives the div a height of 120px and the line is offset by 10px.

We should fix the test to avoid this accidental dependency on line-height:normal behavior, by specifying line-height:1 as part of the font declaration in this testcase/reference case.

This matches the recommendation at:
https://web-platform-tests.org/writing-tests/ahem.html
...and it makes this test start passing. Without this change, the default
line-height:normal behavior effectively behaves like line-height:1.2 in
Firefox, which creates some space between the content and the container's top
border, which makes the test fail.

Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1e3f28ee088c Adjust test background-image-first-line.html to specify line-height for Ahem font, for more predictable sizing. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/17469 for changes under testing/web-platform/tests
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: