Closed Bug 1280288 Opened 8 years ago Closed 8 years ago

Linear-gradient measures its extents incorrectly

Categories

(Core :: Layout, defect)

50 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1291528

People

(Reporter: sean, Unassigned)

Details

(Keywords: regression, Whiteboard: DUPEME?)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36

Steps to reproduce:

It appears that linear-gradient background fills measure the extents of the box incorrectly when the box size is measured in ems.

I have attached a test case, and I have included screen shots.  A copy of the test case can be found on JSFiddle:  https://jsfiddle.net/seanofw/epa57r55/

In my tests, this is reproducible at least in Firefox from v39 through v47 (the current version).  I am running on Windows 7 64-bit, fully patched.  As you can see from the screen shots, this continues to be incorrect even with hardware acceleration disabled in Firefox, and is also incorrect in Firefox's Safe Mode.  I use a vanilla Firefox install, with no extensions/add-ons of any kind.


Actual results:

In some cases, the bottom row of pixels in a box is unfilled by the background.  How much is left open or filled appears to vary based on the dimensions of the box.


Expected results:

The entire extent of the box should be filled by the background.  This matches the behavior seen in both Chrome and IE for the same test case, and the behavior one would expect from the CSS spec.
Attached file Test case
Attached image ff47.jpg
I can reproduce it only when changing the zoom level (HWA on/off).
Component: Untriaged → Layout
Product: Firefox → Core
Old issue, FF29 has the bug, maybe duplicate.
Whiteboard: DUPEME?
(In reply to Loic from comment #3)
> Old issue, FF29 has the bug, maybe duplicate.

I didn't see anything in Bugzilla about it after a bit of searching, which is why I filed a new bug report.

And I don't have to change the zoom level to reproduce it on any of my machines; it works at most levels of zoom, although interestingly, if I zoom above about 150%, it goes away.  I wonder if Windows' native zoom level has any influence over this, since you needed to zoom to see it.

The fact that this appears and disappears depending on both zoom level and on content makes this smell a lot like a rounding error somewhere, like somebody coded (int)(x + 0.5) when they meant ceil(x), or accidentally crammed a double into an int.

That said, I'm not familiar enough with the Firefox codebase to find/fix the issue, but I can at least reproduce it reliably:  This bug has now been demonstrated on multiple computers at work, and on my computer at home, and on multiple versions of Firefox, so it's definitely real.
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is a regression between FF28 and FF29, also confirming on Linux platform.


Mozregression:
 7:07.31 INFO: Narrowed nightly regression window from [2014-01-30, 2014-02-01] (2 days) to [2014-01-30, 2014-01-31] (1 days) (~0 steps left)
 7:07.31 INFO: Got as far as we can go bisecting nightlies...
 7:07.31 INFO: Last good revision: 73eefb421e2a (2014-01-30)
 7:07.31 INFO: First bad revision: 735a648bca0d (2014-01-31)
 7:07.31 INFO: Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=73eefb421e2a&tochange=735a648bca0d

I could not get further in mozilla-inbound but this is when Bug 700926 landed (Unify CSS image-value rendering) and there are several patches there that seem related to the calculation of background-image-source gradients. This was a patch by Roc but he is not longer working for Mozilla. Nicolas, would you know who to ping for that old regression to get attention?
Flags: needinfo?(nical.bugzilla)
Keywords: regression
Version: 47 Branch → 50 Branch
(In reply to Pascal Chevrel:pascalc from comment #5)
> Nicolas, would you know who to ping for that old regression to get attention?

Markus, probably.
Flags: needinfo?(nical.bugzilla) → needinfo?(mstange)
Edwin, maybe this is the bug in the "old path" you're seeing in the reftest for bug 1291528?
Flags: needinfo?(mstange) → needinfo?(edwin)
This should be fixed by bug 1274624 and bug 1291528 -- I can reproduce on release, but not on my local patch queue.
Fixed in Nightly 51 (have requested uplift to 50).
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(edwin)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: