[Webkit-unassigned] [Bug 38845] Canvas color property getters should serialize them according to spec
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 18 14:59:53 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=38845
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #56334|review?, commit-queue? |review-, commit-queue-
Flag| |
--- Comment #27 from Darin Adler <darin at apple.com> 2010-05-18 14:59:50 PST ---
(From update of attachment 56334)
> CanvasStyle::CanvasStyle(PassRefPtr<CanvasGradient> gradient)
> - : m_type(gradient ? Gradient : ColorString)
> + : m_type(gradient ? Gradient : RGBA)
> , m_gradient(gradient)
> {
> }
This will create a style with an uninitialized m_rgba with type RGBA. That's not good. The old code would have a null color string, not an uninitialized color string.
Instead, I suggest we put the null check in the CanvasStyle::create function and return 0 in that case.
Also, I'd like to see test cases for this.
> CanvasStyle::CanvasStyle(PassRefPtr<CanvasPattern> pattern)
> - : m_type(pattern ? ImagePattern : ColorString)
> + : m_type(pattern ? ImagePattern : RGBA)
> , m_pattern(pattern)
> {
> }
Same thing.
Everything else looks fine to me.
--
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