RESOLVED FIXED 35479
SVG fallback color doesn't work for bogus gradients.
https://bugs.webkit.org/show_bug.cgi?id=35479
Summary SVG fallback color doesn't work for bogus gradients.
Dirk Schulze
Reported 2010-02-27 09:46:33 PST
fallback color doesn't work for bogus gradients.
Attachments
Patch (24.26 KB, patch)
2010-02-27 11:49 PST, Dirk Schulze
no flags
Dirk Schulze
Comment 1 2010-02-27 11:49:05 PST
WebKit Review Bot
Comment 2 2010-02-27 11:54:16 PST
Attachment 49685 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/svg/graphics/SVGPaintServer.cpp:129: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dirk Schulze
Comment 3 2010-02-27 11:59:08 PST
(In reply to comment #2) > Attachment 49685 [details] did not pass style-queue: > > Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 > WebCore/svg/graphics/SVGPaintServer.cpp:129: Tests for true/false, > null/non-null, and zero/non-zero should all be done without equality > comparisons. [readability/comparison_to_zero] [5] > Total errors found: 1 in 9 files > > > If any of these errors are false positives, please file a bug against > check-webkit-style. I check if the size is zero, negative values are allowed. I had problems with this rule multiple times now, can't we get rid of it?
David Levin
Comment 4 2010-03-01 10:29:07 PST
(In reply to comment #3) > (In reply to comment #2) > > Attachment 49685 [details] [details] did not pass style-queue: > > > > Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 > > WebCore/svg/graphics/SVGPaintServer.cpp:129: Tests for true/false, > > null/non-null, and zero/non-zero should all be done without equality > > comparisons. [readability/comparison_to_zero] [5] > > Total errors found: 1 in 9 files > > > > > > If any of these errors are false positives, please file a bug against > > check-webkit-style. > > I check if the size is zero, negative values are allowed. I had problems with > this rule multiple times now, can't we get rid of it? Instead of item->objectBoundingBox().width() != 0 why can't it just be item->objectBoundingBox().width() ?
Dirk Schulze
Comment 5 2010-03-01 11:13:05 PST
(In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #2) > > > Attachment 49685 [details] [details] [details] did not pass style-queue: > > > > > > Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 > > > WebCore/svg/graphics/SVGPaintServer.cpp:129: Tests for true/false, > > > null/non-null, and zero/non-zero should all be done without equality > > > comparisons. [readability/comparison_to_zero] [5] > > > Total errors found: 1 in 9 files > > > > > > > > > If any of these errors are false positives, please file a bug against > > > check-webkit-style. > > > > I check if the size is zero, negative values are allowed. I had problems with > > this rule multiple times now, can't we get rid of it? > > Instead of > item->objectBoundingBox().width() != 0 > why can't it just be > item->objectBoundingBox().width() > ? Even if we give a warning for negative values (eg. negative with or height on a rect=, we still render this objects. If I make item->objectBoundingBox().width(), all negative values would cause a stroke of a path with black, insteaf of a gradient. This isn't correct in my opinion. That's why it has to be != 0
Eric Seidel (no email)
Comment 6 2010-03-05 15:09:05 PST
Comment on attachment 49685 [details] Patch Your test case woudl be slightly clearer if the expected result was instead a 100x100 green rect (since that's a common test case expectation to mean pass).
Nikolas Zimmermann
Comment 7 2010-03-07 09:48:07 PST
Comment on attachment 49685 [details] Patch r=me, looks fine. The style issue seems to be okay after Dirks explaination. @Eric: We can't use a 100x100 rect, after all Dirk is testing 1d objects.
Dirk Schulze
Comment 8 2010-03-12 12:44:49 PST
Comment on attachment 49685 [details] Patch Clearing flags on attachment: 49685 Committed r55930: <http://trac.webkit.org/changeset/55930>
Dirk Schulze
Comment 9 2010-03-12 12:44:59 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.