[Webkit-unassigned] [Bug 146997] [Cairo] SVG path not rendered with all-zero dasharray
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 21 20:16:59 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=146997
Martin Robinson <mrobinson at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #256903|review? |review-
Flags| |
--- Comment #5 from Martin Robinson <mrobinson at webkit.org> ---
Comment on attachment 256903
--> https://bugs.webkit.org/attachment.cgi?id=256903
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=256903&action=review
Nice. Fix. I have a few small nits.
> Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:907
> + // Avoid all-zero patterns that would trigger the CAIRO_STATUS_INVALID_DASH context error state.
> + bool allZero = true;
> + for (auto& dash : dashes) {
> + if (dash) {
> + allZero = false;
> + break;
> + }
I think you could pull this bit out into a helper function that returns a boolean. Something like isDashArrayAllZero.
> Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:911
> + if (allZero)
> + return;
> +
What should the behavior of an all-zero dash array be? Should it disable dashes? If so, perhaps in that case you should call cairo_set_dash with num_dashes=0. Either way, I think you need to adjust the state appropriately.
> LayoutTests/fast/canvas/script-tests/canvas-lineDash.js:107
> +// Verify all-zero dash rendering
Nit: missing period.
> LayoutTests/fast/canvas/script-tests/canvas-lineDash.js:110
> +ctx.lineWidth = 4; // To make the test immune to plaform anti-aliasing discrepancies
Ditto.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150722/a901b704/attachment-0001.html>
More information about the webkit-unassigned
mailing list