discrepancy in width of painted background




5 years ago
5 years ago


(Reporter: jfkthame, Unassigned)


Firefox Tracking Flags

(Not tracked)



(3 attachments)



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

 body {
 span { background:red; }
 .float { float:left; background:orange; }
 .outer { overflow:auto; margin:1em; }

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

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.

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.

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.