[Webkit-unassigned] [Bug 54347] New: Angled -webkit-linear-gradient with hard edges doesn't fit to pixel grid consistently
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Feb 12 17:00:44 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=54347
Summary: Angled -webkit-linear-gradient with hard edges doesn't
fit to pixel grid consistently
Product: WebKit
Version: 528+ (Nightly build)
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: CSS
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: eevee.webkit at veekun.com
Created an attachment (id=82246)
--> (https://bugs.webkit.org/attachment.cgi?id=82246&action=review)
testcase
See attached testcase, which uses -webkit-linear-gradient and background-size to draw diagonal stripes of various sizes along a square background. There are two similar problems here, which I assume have the same root cause.
1. When using "top left" as the anchor for the gradient, current Chromium builds sometimes draw one or two pixels the wrong color at the left edge of each gradient box, resulting in a jarring effect like this:
#####
####-
###--
##---
-----
2. When using "-45deg", the effect is worse; at virtually any background-size, bands of the gradient fluctuate in width by a pixel or two, resulting in an odd studded appearance. It's so bad that with a background-size of 2px, this /diagonal/ gradient renders as a pattern of /vertical/ lines.
The spec doesn't legislate precisely how to render gradients, but current Gecko draws smooth diagonal lines at any size and zoom level, which seems more correct (or at least more useful).
Both problems occur as long as two color stops collide within a pixel, even if they don't have exactly the same length. If they're at least a pixel apart, the rendering is perfect.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list