Closed Bug 1033375 Opened 10 years ago Closed 9 years ago

Jagged borders on triangles made using borders in css

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1185636
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: nical, Assigned: lsalzman)

References

Details

Attachments

(4 files, 2 obsolete files)

Test case: http://css-tricks.com/snippets/css/css-triangle/

I can reproduce this on linux (nightly and stable).
The border of the triangles is jagged while it should look like a proper triangle (see attachment). Looks good in chrome.
I have seen this issue in other websites out there but this one seems like the most straightforward test case.
I feel like this might be a regression
This sounds familiar..... ah yes... is this the same as bug 805393 or bug 965966, maybe?
Or perhaps not; those bugs sounds more like they're just about antialiasing (or lack thereof), whereas here there are distinct periodic glitches.
Attached image Arrow in Chrome
I'm not sure if this is a related issue but I see similar issues with the downward arrow in the YouTube menu. In Chrome, it looks fine while not so in Firefox. Attaching screenshots.
Attached image Arrow in Nightly
This is how it looks in Nightly.
This seems to have been fixed somehow. Will close if someone can confirm this being fixed.
Never mind, I was confused. I didn't remember this was an issue on Linux. It was working for me on Windows :P
Not working on Windows if hardware acceleration is enabled.
Assignee: nobody → lsalzman
Apparently this is down to how Cairo backends that rely on the pixman fallback for gradients work. If this fallback gets used, then you get the pixel drop-outs observed.

The CSS border rendering code in the triangle border test case was basically doing that - linear gradient with 2 stops set with offset 0.5.

This patch works around this by noticing in the Cairo draw target is such a gradient was requesting, and nudging the offsets to occupy half a pixel to more or less anti-alias the gradient
Attachment #8625021 - Flags: review?(nical.bugzilla)
Attachment #8625021 - Flags: review?(nical.bugzilla) → review+
Added some comments to document how the fix works and point back at the bug for posterity's sake (otherwise changed no code in patch)
Attachment #8625021 - Attachment is obsolete: true
Attachment #8625554 - Flags: review+
Oops, some reftest failures on zero length gradients. Working on fix...
Keywords: checkin-needed
Status: NEW → ASSIGNED
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/9e8d2b0dd0ce
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Depends on: 1183506
Depends on: 1185636
Intentionally reverted patch as part of bug 1185636, due to the regression noticed in bug 1183506. Once the new border rendering in bug 1185636 lands, this will be addressed.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: