discrepancy in width of painted background

NEW
Unassigned

Status

()

5 years ago
5 years ago

People

(Reporter: jfkthame, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

5 years ago
Created attachment 763684 [details]
testcase for Mac OS (unlikely to show the issue on other platforms)

While investigating test failures triggered by changing default fonts on Android (see bug 877203), I found an odd discrepancy in the rendering of layout/reftests/text/pre-line-1-ref.html with certain fonts/sizes. In a testcase like

<style>
 body {
  font-family:Helvetica;
  font-size:24.8px;
 }
 span { background:red; }
 .float { float:left; background:orange; }
 .outer { overflow:auto; margin:1em; }
</style>

<body>
 <div class="outer"><div class="float"><span>My name is<br>Fred.</span></div></div>
</body>

where the floating <div> is expected to be the same width as its enclosed <span>, there is sometimes a discrepancy where the background painted for the <span> projects 1px beyond that of the <div>.

The attached testcase illustrates the issue on OS X. For other platforms, experimentation would be needed to find font/size combinations that trigger the issue; it's quite finicky.
(Reporter)

Comment 1

5 years ago
Created attachment 763686 [details]
rendering of the testcase on a retina Mac

Note the difference in width of the red and orange backgrounds in the second part of the test.
(Reporter)

Comment 2

5 years ago
Created attachment 763687 [details]
rendering of the testcase with hidpi support disabled

This time there is a difference in the background widths in the first part of the test.
You need to log in before you can comment on or make changes to this bug.