Bug 20973

Summary: [Qt] SVG patterns are missing
Product: WebKit Reporter: Dirk Schulze <krit>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal Keywords: Qt
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
SVGPattern
darin: review+
SVGPattern eric: review+

Dirk Schulze
Reported 2008-09-21 11:33:16 PDT
Qt lacks of SVG pattern support.
Attachments
SVGPattern (4.02 KB, patch)
2008-09-21 11:37 PDT, Dirk Schulze
darin: review+
SVGPattern (3.98 KB, patch)
2008-09-22 08:37 PDT, Dirk Schulze
eric: review+
Dirk Schulze
Comment 1 2008-09-21 11:37:48 PDT
Created attachment 23629 [details] SVGPattern This patch adds svg pattern support. Only texts are not supported (like on gradients).
Darin Adler
Comment 2 2008-09-21 13:44:05 PDT
Comment on attachment 23629 [details] SVGPattern + PassRefPtr<Pattern> pattern; + pattern = Pattern::create(tile()->image(), true, true); This is an inefficient idiom. It's more efficient to initialize on the same line the variable is defined on. But also the local variable should be RefPtr, not PassRefPtr. See <http://webkit.org/coding/RefPtr.html> for guidelines. + QBrush brush(pattern.get()->createPlatformPattern(affine)); No need for the call to get() here. You can just use the -> operator normally with smart pointers. r=me as-is, but I suggest making those two refinements.
Dirk Schulze
Comment 3 2008-09-22 08:37:04 PDT
Created attachment 23651 [details] SVGPattern Forgot to add QPainter and changed PassRefPtr to RefPtr.
Eric Seidel (no email)
Comment 4 2008-09-22 13:25:34 PDT
Comment on attachment 23651 [details] SVGPattern r=me
Holger Freyther
Comment 5 2008-09-27 15:51:34 PDT
Landed as r37006.
Note You need to log in before you can comment on or make changes to this bug.