Bug 11879

Summary: Patterns on fill/stroke of text doesn't work
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: SVGAssignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Initial patch
oliver: review-
Updated patch oliver: review+

Description Nikolas Zimmermann 2006-12-19 12:06:49 PST
A subtle bug in SVGPatternElement and two wrong calls in SVGPaintServerPatternCg, currently prevent that to work. Attaching patch soon.
Comment 1 Nikolas Zimmermann 2006-12-19 12:10:03 PST
Created attachment 11918 [details]
Initial patch

Here's a screenshot showing pattern on stroke/fill of text:
http://www.flickr.com/photos/43532360@N00/327436697/
Comment 2 Oliver Hunt 2006-12-19 12:16:50 PST
Comment on attachment 11918 [details]
Initial patch

In

-    if (!m_paintServer || !m_paintServer->activeClient() || m_ignoreAttributeChanges)
+    if (ownerDocument()->parsing() || !attached() || !m_paintServer || m_ignoreAttributeChanges)

Move the pure bool checks to the beginning of the condition
Comment 3 Nikolas Zimmermann 2006-12-19 12:23:07 PST
Created attachment 11919 [details]
Updated patch

Fix Oliver's issue.
Comment 4 Oliver Hunt 2006-12-19 12:26:41 PST
Comment on attachment 11919 [details]
Updated patch

Fix indentation of + if (isPaintingText()) 

then it's landable

-        if (isPaintingText()) {
-            const_cast<RenderObject*>(object)->style()->setColor(Color());
+ 
+       if (isPaintingText()) 
             context->setTextDrawingMode(cTextFill);
-        }
     }
Comment 5 Nikolas Zimmermann 2006-12-19 12:31:13 PST
Landed in r18322.