Assigning a gradient like this background-image: -webkit-linear-gradient(270deg, #CCCCCC 50%, #999999 50%); leads to a strange result in cases the width of the div using that style rule is odd. Giving the same div an even width, everything looks like it should. Just check out the attached HTML file to see the difference. I have seen it in chrome on OSX and Linux so I guess its not OS dependent.
Did you forget to attach the file?
Created attachment 92291 [details] Test-Case Seems like I forgot it. Sorry, here it is.
Created attachment 93460 [details] Patch The code in CSSGradientValue.cpp, function endPointsFromAngle, was missing the case when the angle is 270. The patch adds the computation for this case too. The layout test creates linear gradients with angles = {0, 90, 180, 270, -90, -180, -270}.
Comment on attachment 93460 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=93460&action=review The code change looks good but I'd like to see the test tweaked. > LayoutTests/fast/gradients/css3-linear-right-angle-gradients.html:6 > +<title> > + Test that computation of right angle (90, 180, 270) linear gradients is done properly. > +</title> This should be a dumpAsText(true) test. Also, it would be better if the divs were squares (inline-block to make them line up), and don't use red if red is expected in the test result.
Created attachment 93621 [details] Patch2 Thanks for the review. 1. I have added the dumpAsText, i missed it completely in the first place. 2. I decided to keep the divs in the original, long shape instead of making them squares. This way, the problem with the gradient is highlighted better. 3. I changed the colors from green-red to write-black, thanks for the suggestion. Regards,
Comment on attachment 93621 [details] Patch2 View in context: https://bugs.webkit.org/attachment.cgi?id=93621&action=review > LayoutTests/fast/gradients/css3-linear-right-angle-gradients.html:6 > +<!DOCTYPE html> > +<html> > +<head> > +<title> > + Test that computation of right angle (90, 180, 270) linear gradients is done properly. > +</title> Please make the output look similar to that of css3-repeating-radial-gradients.html, with no text, and larger boxes.
Created attachment 93742 [details] Patch3 The third version of the patch. I have reworked the layout test.
Comment on attachment 93742 [details] Patch3 Clearing flags on attachment: 93742 Committed r86826: <http://trac.webkit.org/changeset/86826>
All reviewed patches have been landed. Closing bug.
Thanks for fixing it. Just checked it with the current webkit and it works. (Don't know if I'm allowed to set the status to verified so I better keep it the way it is)