Bug 111586 - SVG pattern to pattern reference does not work if first pattern has a child node
Summary: SVG pattern to pattern reference does not work if first pattern has a child node
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Florin Malita
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-06 08:52 PST by Dirk Schulze
Modified: 2013-03-06 10:53 PST (History)
6 users (show)

See Also:


Attachments
Not working pattern to pattern reference (399 bytes, image/svg+xml)
2013-03-06 08:52 PST, Dirk Schulze
no flags Details
Patch (4.19 KB, patch)
2013-03-06 09:27 PST, Florin Malita
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.