Bug 26061

Summary: [SKIA] Crash when filling an empty pattern
Product: WebKit Reporter: Dean McNamee <deanm>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, skylined
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
patch
eric: review+
Patch with indention fixed none

Dean McNamee
Reported 2009-05-28 06:08:25 PDT
Skia-specific crash, where we assume that the bitmap for a pattern is valid. In reality it can return NULL. For example: createPattern(new Image, "repeat") Original Chromium bug: http://code.google.com/p/chromium/issues/detail?id=10881
Attachments
patch (3.31 KB, patch)
2009-05-28 06:10 PDT, Dean McNamee
eric: review+
Patch with indention fixed (3.37 KB, patch)
2009-06-10 05:54 PDT, Dean McNamee
no flags
Dean McNamee
Comment 1 2009-05-28 06:10:57 PDT
Eric Seidel (no email)
Comment 2 2009-06-04 09:05:16 PDT
Comment on attachment 30735 [details] patch The patch looks fine. I would have used a named constant for the color. I'm surprised that skia doesn't have a "transparent" constant that you can return instead of having to manually construct a color. Color::transparent is identical, and is guaranteed to be the right format due to COMPILE_ASSERT checks in ColorSkia.cpp. Tab indent should be 4 spaces, not 2. Those are both nits someone could fix when landing.
Dean McNamee
Comment 3 2009-06-10 05:54:27 PDT
Created attachment 31129 [details] Patch with indention fixed Fixed the indention line. I don't think making a constant (since Skia doesn't already have one) is worthwhile, it's pretty clear from the comment that I'm creating a transparent color. I don't like using Color in place of SkColor, even though I realize they have the same layout.
Brent Fulgham
Comment 4 2009-06-10 11:05:29 PDT
Please don't remove "Reviewed by (OOPS)" comment created by prepare-ChangeLog. Confirmed p-1.txt and p-2.txt differed only by spacing per Eric's comment and landed. Landed in @r44575.
Note You need to log in before you can comment on or make changes to this bug.