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

RESOLVED FIXED in Firefox 69

Status

()

defect
P3
normal
RESOLVED FIXED
Last month
26 days ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

(Blocks 1 bug)

unspecified
mozilla69
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox69 fixed)

Details

Attachments

(1 attachment)

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: Last month
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
Upstream PR merged
You need to log in before you can comment on or make changes to this bug.