Bug 111586

Summary: SVG pattern to pattern reference does not work if first pattern has a child node
Product: WebKit Reporter: Dirk Schulze <krit>
Component: SVGAssignee: Florin Malita <fmalita>
Status: RESOLVED FIXED    
Severity: Normal CC: d-r, fmalita, pdr, schenney, webkit.review.bot, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Not working pattern to pattern reference
none
Patch none

Description Dirk Schulze 2013-03-06 08:52:01 PST
Created attachment 191759 [details]
Not working pattern to pattern reference

The following simple reference of another pattern does not work:

<pattern xlink:href="#pattern2" id="pattern1">
</pattern>

I assume this is because of the newline that creates a TextNode. With this node we do not reference the second pattern anymore. The following does work:

<pattern xlink:href="#pattern2" id="pattern1"></pattern>

Adobe Illustrator exports the first example, why often patterns don't work exported from Illustrator.
Comment 1 Florin Malita 2013-03-06 09:27:46 PST
Created attachment 191766 [details]
Patch
Comment 2 Philip Rogers 2013-03-06 09:52:57 PST
Comment on attachment 191766 [details]
Patch

This change is very reasonable.

Do you mind checking that the ~20 other instances of hasChildNodes() do not have the same problem?
Comment 3 Florin Malita 2013-03-06 10:36:05 PST
(In reply to comment #2)
> (From update of attachment 191766 [details])
> This change is very reasonable.
> 
> Do you mind checking that the ~20 other instances of hasChildNodes() do not have the same problem?

The remaining users look good.
Comment 4 WebKit Review Bot 2013-03-06 10:53:14 PST
Comment on attachment 191766 [details]
Patch

Clearing flags on attachment: 191766

Committed r144948: <http://trac.webkit.org/changeset/144948>
Comment 5 WebKit Review Bot 2013-03-06 10:53:18 PST
All reviewed patches have been landed.  Closing bug.