Bug 14631 - <use> doesn't deep-expand <symbol> elements.
Summary: <use> doesn't deep-expand <symbol> elements.
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nikolas Zimmermann
Depends on:
Reported: 2007-07-16 06:39 PDT by Nikolas Zimmermann
Modified: 2007-07-16 12:19 PDT (History)
0 users

See Also:

Initial patch (32.89 KB, patch)
2007-07-16 06:42 PDT, Nikolas Zimmermann
rwlbuis: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolas Zimmermann 2007-07-16 06:39:53 PDT
As the summary says, <use> on <g> containing <symbol> leads to an ASSERT.
Need deep-expanding for <symbol>, just like done for <use>. Patch coming.
Comment 1 Nikolas Zimmermann 2007-07-16 06:42:21 PDT
Created attachment 15530 [details]
Initial patch
Comment 2 Rob Buis 2007-07-16 11:53:50 PDT
Comment on attachment 15530 [details]
Initial patch

>--- WebCore/ChangeLog	(revision 24303)
>+++ WebCore/ChangeLog	(working copy)
>+        Added testcase: svg/custom/use-on-g-containing-foreignObject-and-image.svg (testcase for treasure_map.svg)
>+                        svg/custom/use-on-disallowed-foreign-object-5.svg (<use> on <symbol> containg <foreignObject>)
>+                        svg/custom/use-on-disallowed-foreign-object-6.svg (<use> on <g> containing <svg> containing <foreignObject>)
>+                        svg/custom/use-on-disallowed-foreign-object-7.svg (<use> on <g> containing <symbol> containing <foreignObject>)
>+                        svg/custom/use-scripting-changes-to-nonexistant-href.svg

I wouldn't add the testcases here, but that is a taste thing I suppose.

>Index: LayoutTests/svg/custom/use-on-g-containing-foreignObject-and-image.svg
>--- LayoutTests/svg/custom/use-on-g-containing-foreignObject-and-image.svg	(revision 0)
>+++ LayoutTests/svg/custom/use-on-g-containing-foreignObject-and-image.svg	(revision 0)
>@@ -0,0 +1,14 @@
>+<?xml version="1.0"?>
>+<svg xmlns="http://www.w3.org/2000/svg"
>+     xmlns:xlink="http://www.w3.org/1999/xlink">
>+    <g id="container">
>+        <foreignObject x="10" y="10" width="580" height="380" requiredExtensions="foobar"/>
>+        <image xlink:href="resources/green-checker.png" width="75" height="75" />
>+    </g>
>+<use x="25" y="25" xlink:href="#container"/>

I do not understand why you don't add a testcase like this but using <switch> instead of <g>. AFAICS switch has some unique effect, in that it can effectively
render the foreignObject in <use> valid, since the <switch> can decide to rule out the foreignObject, which the above <g> doesn't do.
If we can work that one out (over irc maybe), then I'll r+ it.
Comment 3 Rob Buis 2007-07-16 12:14:19 PDT
Comment on attachment 15530 [details]
Initial patch

I made some false assumptions about switch and valid elements.
The use-on-g-containing-foreignObject-and-image.svg is fine, except the requiredExtensions is confusing. r=me
Comment 4 Nikolas Zimmermann 2007-07-16 12:19:49 PDT
Landed in r24320.