Make SVGUseElement work without creating any SVGElementInstance objects
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Feb 2015 23:22:24 +0000 (23:22 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Feb 2015 23:22:24 +0000 (23:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141374

Reviewed by Sam Weinig.

Source/WebCore:

* dom/ElementIterator.h: Changed the * and -> operators to be const.
There is no need for the iterator itself to be modified just to dereference it.

* dom/TypedElementDescendantIterator.h: Added DoubleTypedElementDescendantIterator.
This allows callers to call descendantsOfType on two elements, as long as the caller
can guarantee that both have the same number of descendants of that type. It's handy
for walking a tree of cloned elements to set up something between each original and
its clone. In the future we might instead change the cloning machinery so it can do
this work as we clone, and if so, we could consider deleting this.

* svg/SVGElement.cpp:
(WebCore::SVGElement::correspondingElement): Made this const.
(WebCore::SVGElement::invalidateInstances): Got rid of the rule that said "this can
only be done for an element in a document", since it's useful to do this on an element
that has just been removed from a document. Removed the "updateStyleIfNeeded" call
here now that the other changes make it no longer needed. Removed an unimportant
assertion that we only invalidate use elements that are in a document; that's not
a necessary restriction. Streamlined the logic a bit.

* svg/SVGElement.h: Made correspondingElement const.

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::insertedInto): Removed an assertion about
m_targetElementInstance since that's gone now.
(WebCore::SVGUseElement::svgAttributeChanged): Changed code that transfers
size attributes to the shadow tree to use shadowTreeTargetClone instead of
m_targetElementInstance.
(WebCore::SVGUseElement::clearResourceReferences): Removed code to detach
m_targetElementInstance, and also the call to removeAllTargetReferencesForElement,
because we no longer use those.
(WebCore::SVGUseElement::buildPendingResource): Moved the code to build the
shadow tree in here and deleted the buildShadowAndInstanceTree function.
Also changed logic so that we use a pending resource any time the target is not
a valid one. That helps us correctly handle cases where we initially have an
invalid target, but later get a value one
(WebCore::SVGUseElement::buildShadowAndInstanceTree): Deleted. The code here
was greatly simplified and moved into buildPendingResource.
(WebCore::SVGUseElement::buildInstanceTree): Deleted.
(WebCore::SVGUseElement::hasCycleUseReferencing): Deleted. Cycles are now
detected by the new isValidTarget function and so there's no need for a
separate explicit check for a cycle.
(WebCore::associateClonesWithOriginals): Added. Helper that makes
functions that build the shadow tree simpler and easier to read.
(WebCore::associateReplacementCloneWithOriginal): Added. Helper to
make associateReplacementClonesWithOriginals simple.
(WebCore::associateReplacementClonesWithOriginals): Added. Helper that
makes functions that build the shadow tree simpler and easier to read.
(WebCore::SVGUseElement::buildShadowTree): Call associateClonesWithOriginals
since associateInstancesWithShadowTreeElements no longer does this.
(WebCore::SVGUseElement::isValidTarget): Added. Covers all the different
reasons a target might not be valid: type of element, reference cycles, and
also "not in document" (refactored in here; not sure when that can happen
in practice, might be possible to remove it later).
(WebCore::SVGUseElement::expandUseElementsInShadowTree): Add checks for
documents that are still loading; this used to be checked when building the
instance tree. Added calls to associateReplacementClonesWithOriginals and
associateClonesWithOriginals; that used to be done by later in the
associateInstancesWithShadowTreeElements function. Use isValidTarget so
we handle cycles as well as invalid target types.
(WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Added a call to
associateReplacementClonesWithOriginals, since we can no longer do that in
associateInstancesWithShadowTreeElements.
(WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): Deleted.
(WebCore::SVGUseElement::instanceForShadowTreeElement): Deleted.
(WebCore::SVGUseElement::invalidateDependentShadowTrees): Removed a comment
that simply restated the name of the function.

* svg/SVGUseElement.h: Removed instanceForShadowTreeElement,
buildShadowAndInstanceTree, detachInstance, buildInstanceTree,
hasCycleUseReferencing, associateInstancesWithShadowTreeElements,
instanceForShadowTreeElement, and m_targetElementInstance. Added isValidTarget.

LayoutTests:

Results changed on some tests that expected the old "remove all content if a cycle is detected"
behavior from the <use> element. The new behavior is to inhibit cycles, but render everything
else, which is much easier to implement correctly and also makes logical sense. Changed all
those tests to be reference tests, which makes sense since they are focusing on what gets
rendered in these complex cases, and the expected results are a lot easier to understand in
SVG form than they were in txt/png form. This also means we can remove a lot of platform-specific
results since reference tests aren't sensitive to small platform differences in rendering.

* platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png: Removed.
* platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png: Removed.
* platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png: Removed.
* platform/efl/svg/hixie/error/017-expected.png: Removed.
* platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png: Removed.
* platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png: Removed.
* platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png: Removed.
* platform/gtk/svg/custom/use-on-disallowed-foreign-object-3-expected.png: Removed.
* platform/gtk/svg/custom/use-on-disallowed-foreign-object-3-expected.txt: Removed.
* platform/gtk/svg/custom/use-recursion-1-expected.png: Removed.
* platform/gtk/svg/custom/use-recursion-1-expected.txt: Removed.
* platform/gtk/svg/custom/use-recursion-2-expected.png: Removed.
* platform/gtk/svg/custom/use-recursion-2-expected.txt: Removed.
* platform/gtk/svg/custom/use-recursion-3-expected.png: Removed.
* platform/gtk/svg/custom/use-recursion-3-expected.txt: Removed.
* platform/gtk/svg/custom/use-recursion-4-expected.png: Removed.
* platform/gtk/svg/custom/use-recursion-4-expected.txt: Removed.
* platform/gtk/svg/hixie/error/017-expected.png: Removed.
* platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt: Removed.
* platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt: Removed.
* platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt: Removed.
* platform/ios-sim-deprecated/svg/custom/use-on-disallowed-foreign-object-3-expected.txt: Removed.
* platform/ios-sim-deprecated/svg/custom/use-recursion-1-expected.txt: Removed.
* platform/ios-sim-deprecated/svg/custom/use-recursion-2-expected.txt: Removed.
* platform/ios-sim-deprecated/svg/custom/use-recursion-3-expected.txt: Removed.
* platform/ios-sim-deprecated/svg/custom/use-recursion-4-expected.txt: Removed.
* platform/ios-sim-deprecated/svg/hixie/error/017-expected.txt: Removed.
* platform/ios-simulator/svg/custom/use-on-disallowed-foreign-object-3-expected.txt: Removed.
* platform/ios-simulator/svg/custom/use-recursion-1-expected.txt: Removed.
* platform/ios-simulator/svg/custom/use-recursion-2-expected.txt: Removed.
* platform/ios-simulator/svg/custom/use-recursion-3-expected.txt: Removed.
* platform/ios-simulator/svg/custom/use-recursion-4-expected.txt: Removed.
* platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt: Removed.
* platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt: Removed.
* platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt: Removed.
* platform/mac-mountainlion/svg/custom/use-on-disallowed-foreign-object-3-expected.txt: Removed.
* platform/mac-mountainlion/svg/custom/use-recursion-1-expected.txt: Removed.
* platform/mac-mountainlion/svg/custom/use-recursion-2-expected.txt: Removed.
* platform/mac-mountainlion/svg/custom/use-recursion-3-expected.txt: Removed.
* platform/mac-mountainlion/svg/custom/use-recursion-4-expected.txt: Removed.
* platform/mac-mountainlion/svg/hixie/error/017-expected.txt: Removed.
* platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png: Removed.
* platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt: Removed.
* platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png: Removed.
* platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt: Removed.
* platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png: Removed.
* platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt: Removed.
* platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.png: Removed.
* platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt: Removed.
* platform/mac/svg/custom/use-recursion-1-expected.png: Removed.
* platform/mac/svg/custom/use-recursion-1-expected.txt: Removed.
* platform/mac/svg/custom/use-recursion-2-expected.png: Removed.
* platform/mac/svg/custom/use-recursion-2-expected.txt: Removed.
* platform/mac/svg/custom/use-recursion-3-expected.png: Removed.
* platform/mac/svg/custom/use-recursion-3-expected.txt: Removed.
* platform/mac/svg/custom/use-recursion-4-expected.png: Removed.
* platform/mac/svg/custom/use-recursion-4-expected.txt: Removed.
* platform/mac/svg/hixie/error/017-expected.png: Removed.
* platform/mac/svg/hixie/error/017-expected.txt: Removed.

* svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.svg: Added. Made this be a reference test,
and made it expect more of the recursion to work.
* svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt: Removed.
* svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.svg: Added. More of the same.
* svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt: Removed.
* svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.svg: Added. More of the same.
* svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt: Removed.
* svg/custom/use-on-disallowed-foreign-object-3-expected.svg: Added. More of the same.
* svg/custom/use-recursion-1-expected.svg: Added. More of the same.
* svg/custom/use-recursion-2-expected.svg: Added. More of the same.
* svg/custom/use-recursion-3-expected.svg: Added. More of the same.
* svg/custom/use-recursion-4-expected.svg: Added. More of the same.
* svg/hixie/error/017-expected.txt: Removed.
* svg/hixie/error/017-expected.xml: Added. More of the same.

* svg/in-html/defs-after-use.html: Updated incorrect bug number in this test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179807 268f45cc-cd09-0410-ab3c-d52691b4dbfc

81 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png [deleted file]
LayoutTests/platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png [deleted file]
LayoutTests/platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png [deleted file]
LayoutTests/platform/efl/svg/hixie/error/017-expected.png [deleted file]
LayoutTests/platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png [deleted file]
LayoutTests/platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png [deleted file]
LayoutTests/platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png [deleted file]
LayoutTests/platform/gtk/svg/custom/use-on-disallowed-foreign-object-3-expected.png [deleted file]
LayoutTests/platform/gtk/svg/custom/use-on-disallowed-foreign-object-3-expected.txt [deleted file]
LayoutTests/platform/gtk/svg/custom/use-recursion-1-expected.png [deleted file]
LayoutTests/platform/gtk/svg/custom/use-recursion-1-expected.txt [deleted file]
LayoutTests/platform/gtk/svg/custom/use-recursion-2-expected.png [deleted file]
LayoutTests/platform/gtk/svg/custom/use-recursion-2-expected.txt [deleted file]
LayoutTests/platform/gtk/svg/custom/use-recursion-3-expected.png [deleted file]
LayoutTests/platform/gtk/svg/custom/use-recursion-3-expected.txt [deleted file]
LayoutTests/platform/gtk/svg/custom/use-recursion-4-expected.png [deleted file]
LayoutTests/platform/gtk/svg/custom/use-recursion-4-expected.txt [deleted file]
LayoutTests/platform/gtk/svg/hixie/error/017-expected.png [deleted file]
LayoutTests/platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt [deleted file]
LayoutTests/platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt [deleted file]
LayoutTests/platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt [deleted file]
LayoutTests/platform/ios-sim-deprecated/svg/custom/use-on-disallowed-foreign-object-3-expected.txt [deleted file]
LayoutTests/platform/ios-sim-deprecated/svg/custom/use-recursion-1-expected.txt [deleted file]
LayoutTests/platform/ios-sim-deprecated/svg/custom/use-recursion-2-expected.txt [deleted file]
LayoutTests/platform/ios-sim-deprecated/svg/custom/use-recursion-3-expected.txt [deleted file]
LayoutTests/platform/ios-sim-deprecated/svg/custom/use-recursion-4-expected.txt [deleted file]
LayoutTests/platform/ios-sim-deprecated/svg/hixie/error/017-expected.txt [deleted file]
LayoutTests/platform/ios-simulator/svg/custom/use-on-disallowed-foreign-object-3-expected.txt [deleted file]
LayoutTests/platform/ios-simulator/svg/custom/use-recursion-1-expected.txt [deleted file]
LayoutTests/platform/ios-simulator/svg/custom/use-recursion-2-expected.txt [deleted file]
LayoutTests/platform/ios-simulator/svg/custom/use-recursion-3-expected.txt [deleted file]
LayoutTests/platform/ios-simulator/svg/custom/use-recursion-4-expected.txt [deleted file]
LayoutTests/platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt [deleted file]
LayoutTests/platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt [deleted file]
LayoutTests/platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt [deleted file]
LayoutTests/platform/mac-mountainlion/svg/custom/use-on-disallowed-foreign-object-3-expected.txt [deleted file]
LayoutTests/platform/mac-mountainlion/svg/custom/use-recursion-1-expected.txt [deleted file]
LayoutTests/platform/mac-mountainlion/svg/custom/use-recursion-2-expected.txt [deleted file]
LayoutTests/platform/mac-mountainlion/svg/custom/use-recursion-3-expected.txt [deleted file]
LayoutTests/platform/mac-mountainlion/svg/custom/use-recursion-4-expected.txt [deleted file]
LayoutTests/platform/mac-mountainlion/svg/hixie/error/017-expected.txt [deleted file]
LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png [deleted file]
LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt [deleted file]
LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png [deleted file]
LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt [deleted file]
LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png [deleted file]
LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt [deleted file]
LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.png [deleted file]
LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt [deleted file]
LayoutTests/platform/mac/svg/custom/use-recursion-1-expected.png [deleted file]
LayoutTests/platform/mac/svg/custom/use-recursion-1-expected.txt [deleted file]
LayoutTests/platform/mac/svg/custom/use-recursion-2-expected.png [deleted file]
LayoutTests/platform/mac/svg/custom/use-recursion-2-expected.txt [deleted file]
LayoutTests/platform/mac/svg/custom/use-recursion-3-expected.png [deleted file]
LayoutTests/platform/mac/svg/custom/use-recursion-3-expected.txt [deleted file]
LayoutTests/platform/mac/svg/custom/use-recursion-4-expected.png [deleted file]
LayoutTests/platform/mac/svg/custom/use-recursion-4-expected.txt [deleted file]
LayoutTests/platform/mac/svg/hixie/error/017-expected.png [deleted file]
LayoutTests/platform/mac/svg/hixie/error/017-expected.txt [deleted file]
LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.svg [new file with mode: 0644]
LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt [deleted file]
LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.svg [new file with mode: 0644]
LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt [deleted file]
LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.svg [new file with mode: 0644]
LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt [deleted file]
LayoutTests/svg/custom/use-on-disallowed-foreign-object-3-expected.svg [new file with mode: 0644]
LayoutTests/svg/custom/use-recursion-1-expected.svg [new file with mode: 0644]
LayoutTests/svg/custom/use-recursion-2-expected.svg [new file with mode: 0644]
LayoutTests/svg/custom/use-recursion-3-expected.svg [new file with mode: 0644]
LayoutTests/svg/custom/use-recursion-4-expected.svg [new file with mode: 0644]
LayoutTests/svg/hixie/error/017-expected.txt [deleted file]
LayoutTests/svg/hixie/error/017-expected.xml [new file with mode: 0644]
LayoutTests/svg/in-html/defs-after-use.html
Source/WebCore/ChangeLog
Source/WebCore/dom/ElementIterator.h
Source/WebCore/dom/TypedElementDescendantIterator.h
Source/WebCore/svg/SVGElement.cpp
Source/WebCore/svg/SVGElement.h
Source/WebCore/svg/SVGUseElement.cpp
Source/WebCore/svg/SVGUseElement.h

index 4618b42..d63304c 100644 (file)
@@ -1,3 +1,95 @@
+2015-02-08  Darin Adler  <darin@apple.com>
+
+        Make SVGUseElement work without creating any SVGElementInstance objects
+        https://bugs.webkit.org/show_bug.cgi?id=141374
+
+        Reviewed by Sam Weinig.
+
+        Results changed on some tests that expected the old "remove all content if a cycle is detected"
+        behavior from the <use> element. The new behavior is to inhibit cycles, but render everything
+        else, which is much easier to implement correctly and also makes logical sense. Changed all
+        those tests to be reference tests, which makes sense since they are focusing on what gets
+        rendered in these complex cases, and the expected results are a lot easier to understand in
+        SVG form than they were in txt/png form. This also means we can remove a lot of platform-specific
+        results since reference tests aren't sensitive to small platform differences in rendering.
+
+        * platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png: Removed.
+        * platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png: Removed.
+        * platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png: Removed.
+        * platform/efl/svg/hixie/error/017-expected.png: Removed.
+        * platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png: Removed.
+        * platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png: Removed.
+        * platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png: Removed.
+        * platform/gtk/svg/custom/use-on-disallowed-foreign-object-3-expected.png: Removed.
+        * platform/gtk/svg/custom/use-on-disallowed-foreign-object-3-expected.txt: Removed.
+        * platform/gtk/svg/custom/use-recursion-1-expected.png: Removed.
+        * platform/gtk/svg/custom/use-recursion-1-expected.txt: Removed.
+        * platform/gtk/svg/custom/use-recursion-2-expected.png: Removed.
+        * platform/gtk/svg/custom/use-recursion-2-expected.txt: Removed.
+        * platform/gtk/svg/custom/use-recursion-3-expected.png: Removed.
+        * platform/gtk/svg/custom/use-recursion-3-expected.txt: Removed.
+        * platform/gtk/svg/custom/use-recursion-4-expected.png: Removed.
+        * platform/gtk/svg/custom/use-recursion-4-expected.txt: Removed.
+        * platform/gtk/svg/hixie/error/017-expected.png: Removed.
+        * platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt: Removed.
+        * platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt: Removed.
+        * platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt: Removed.
+        * platform/ios-sim-deprecated/svg/custom/use-on-disallowed-foreign-object-3-expected.txt: Removed.
+        * platform/ios-sim-deprecated/svg/custom/use-recursion-1-expected.txt: Removed.
+        * platform/ios-sim-deprecated/svg/custom/use-recursion-2-expected.txt: Removed.
+        * platform/ios-sim-deprecated/svg/custom/use-recursion-3-expected.txt: Removed.
+        * platform/ios-sim-deprecated/svg/custom/use-recursion-4-expected.txt: Removed.
+        * platform/ios-sim-deprecated/svg/hixie/error/017-expected.txt: Removed.
+        * platform/ios-simulator/svg/custom/use-on-disallowed-foreign-object-3-expected.txt: Removed.
+        * platform/ios-simulator/svg/custom/use-recursion-1-expected.txt: Removed.
+        * platform/ios-simulator/svg/custom/use-recursion-2-expected.txt: Removed.
+        * platform/ios-simulator/svg/custom/use-recursion-3-expected.txt: Removed.
+        * platform/ios-simulator/svg/custom/use-recursion-4-expected.txt: Removed.
+        * platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt: Removed.
+        * platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt: Removed.
+        * platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt: Removed.
+        * platform/mac-mountainlion/svg/custom/use-on-disallowed-foreign-object-3-expected.txt: Removed.
+        * platform/mac-mountainlion/svg/custom/use-recursion-1-expected.txt: Removed.
+        * platform/mac-mountainlion/svg/custom/use-recursion-2-expected.txt: Removed.
+        * platform/mac-mountainlion/svg/custom/use-recursion-3-expected.txt: Removed.
+        * platform/mac-mountainlion/svg/custom/use-recursion-4-expected.txt: Removed.
+        * platform/mac-mountainlion/svg/hixie/error/017-expected.txt: Removed.
+        * platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png: Removed.
+        * platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt: Removed.
+        * platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png: Removed.
+        * platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt: Removed.
+        * platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png: Removed.
+        * platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt: Removed.
+        * platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.png: Removed.
+        * platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt: Removed.
+        * platform/mac/svg/custom/use-recursion-1-expected.png: Removed.
+        * platform/mac/svg/custom/use-recursion-1-expected.txt: Removed.
+        * platform/mac/svg/custom/use-recursion-2-expected.png: Removed.
+        * platform/mac/svg/custom/use-recursion-2-expected.txt: Removed.
+        * platform/mac/svg/custom/use-recursion-3-expected.png: Removed.
+        * platform/mac/svg/custom/use-recursion-3-expected.txt: Removed.
+        * platform/mac/svg/custom/use-recursion-4-expected.png: Removed.
+        * platform/mac/svg/custom/use-recursion-4-expected.txt: Removed.
+        * platform/mac/svg/hixie/error/017-expected.png: Removed.
+        * platform/mac/svg/hixie/error/017-expected.txt: Removed.
+
+        * svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.svg: Added. Made this be a reference test,
+        and made it expect more of the recursion to work.
+        * svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt: Removed.
+        * svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.svg: Added. More of the same.
+        * svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt: Removed.
+        * svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.svg: Added. More of the same.
+        * svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt: Removed.
+        * svg/custom/use-on-disallowed-foreign-object-3-expected.svg: Added. More of the same.
+        * svg/custom/use-recursion-1-expected.svg: Added. More of the same.
+        * svg/custom/use-recursion-2-expected.svg: Added. More of the same.
+        * svg/custom/use-recursion-3-expected.svg: Added. More of the same.
+        * svg/custom/use-recursion-4-expected.svg: Added. More of the same.
+        * svg/hixie/error/017-expected.txt: Removed.
+        * svg/hixie/error/017-expected.xml: Added. More of the same.
+
+        * svg/in-html/defs-after-use.html: Updated incorrect bug number in this test.
+
 2015-02-08  David Kilzer  <ddkilzer@apple.com>
 
         Skip fast/parser/document-open-in-unload.html on all WK2 platforms
diff --git a/LayoutTests/platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png b/LayoutTests/platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png
deleted file mode 100644 (file)
index d77b989..0000000
Binary files a/LayoutTests/platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png b/LayoutTests/platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png
deleted file mode 100644 (file)
index b165ef2..0000000
Binary files a/LayoutTests/platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png b/LayoutTests/platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png
deleted file mode 100644 (file)
index 6d91a5d..0000000
Binary files a/LayoutTests/platform/efl/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/efl/svg/hixie/error/017-expected.png b/LayoutTests/platform/efl/svg/hixie/error/017-expected.png
deleted file mode 100644 (file)
index 8bed2cc..0000000
Binary files a/LayoutTests/platform/efl/svg/hixie/error/017-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png b/LayoutTests/platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png
deleted file mode 100644 (file)
index 253efc6..0000000
Binary files a/LayoutTests/platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png b/LayoutTests/platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png
deleted file mode 100644 (file)
index b01241b..0000000
Binary files a/LayoutTests/platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png b/LayoutTests/platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png
deleted file mode 100644 (file)
index ae246c7..0000000
Binary files a/LayoutTests/platform/gtk/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/gtk/svg/custom/use-on-disallowed-foreign-object-3-expected.png b/LayoutTests/platform/gtk/svg/custom/use-on-disallowed-foreign-object-3-expected.png
deleted file mode 100644 (file)
index a1b6ba5..0000000
Binary files a/LayoutTests/platform/gtk/svg/custom/use-on-disallowed-foreign-object-3-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/gtk/svg/custom/use-on-disallowed-foreign-object-3-expected.txt b/LayoutTests/platform/gtk/svg/custom/use-on-disallowed-foreign-object-3-expected.txt
deleted file mode 100644 (file)
index 7e96458..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (54,54) size 746x546
-    RenderSVGForeignObject {foreignObject} at (10,10) size 580x380
-      RenderBlock {xhtml:div} at (0,0) size 580x17
-        RenderText {#text} at (0,0) size 244x17
-          text run at (0,0) width 244: "You should only see this string ONCE"
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-35.86)}]
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-35.86)}]
diff --git a/LayoutTests/platform/gtk/svg/custom/use-recursion-1-expected.png b/LayoutTests/platform/gtk/svg/custom/use-recursion-1-expected.png
deleted file mode 100644 (file)
index f77a336..0000000
Binary files a/LayoutTests/platform/gtk/svg/custom/use-recursion-1-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/gtk/svg/custom/use-recursion-1-expected.txt b/LayoutTests/platform/gtk/svg/custom/use-recursion-1-expected.txt
deleted file mode 100644 (file)
index bdcd04a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 282x36
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 141x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 141x18
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.00: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/gtk/svg/custom/use-recursion-2-expected.png b/LayoutTests/platform/gtk/svg/custom/use-recursion-2-expected.png
deleted file mode 100644 (file)
index f77a336..0000000
Binary files a/LayoutTests/platform/gtk/svg/custom/use-recursion-2-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/gtk/svg/custom/use-recursion-2-expected.txt b/LayoutTests/platform/gtk/svg/custom/use-recursion-2-expected.txt
deleted file mode 100644 (file)
index fa1ae2d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 282x36
-    RenderSVGText {text} at (10,45) size 141x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 141x18
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.00: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/gtk/svg/custom/use-recursion-3-expected.png b/LayoutTests/platform/gtk/svg/custom/use-recursion-3-expected.png
deleted file mode 100644 (file)
index f77a336..0000000
Binary files a/LayoutTests/platform/gtk/svg/custom/use-recursion-3-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/gtk/svg/custom/use-recursion-3-expected.txt b/LayoutTests/platform/gtk/svg/custom/use-recursion-3-expected.txt
deleted file mode 100644 (file)
index bdcd04a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 282x36
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 141x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 141x18
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.00: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/gtk/svg/custom/use-recursion-4-expected.png b/LayoutTests/platform/gtk/svg/custom/use-recursion-4-expected.png
deleted file mode 100644 (file)
index f77a336..0000000
Binary files a/LayoutTests/platform/gtk/svg/custom/use-recursion-4-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/gtk/svg/custom/use-recursion-4-expected.txt b/LayoutTests/platform/gtk/svg/custom/use-recursion-4-expected.txt
deleted file mode 100644 (file)
index 2c4851e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 282x36
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 141x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 141x18
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.00: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/gtk/svg/hixie/error/017-expected.png b/LayoutTests/platform/gtk/svg/hixie/error/017-expected.png
deleted file mode 100644 (file)
index ce89a33..0000000
Binary files a/LayoutTests/platform/gtk/svg/hixie/error/017-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt b/LayoutTests/platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt
deleted file mode 100644 (file)
index fdd380f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-    RenderSVGContainer {g} at (150,25) size 500x452
-      RenderSVGContainer {g} at (150,25) size 34x34
-        RenderSVGEllipse {circle} at (150,25) size 34x34 [fill={[type=SOLID] [color=#FF7F00]}] [cx=100.00] [cy=25.00] [r=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-      RenderSVGContainer {g} at (616,25) size 34x34
-        RenderSVGEllipse {circle} at (616,25) size 34x34 [fill={[type=SOLID] [color=#FFFF00]}] [cx=380.00] [cy=25.00] [r=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-      RenderSVGText {text} at (99,257) size 282x29 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 282x29
-          chunk 1 (middle anchor) text run 1 at (99.26,280.00) startOffset 0 endOffset 28 width 281.47: "This text should be visible."
-    RenderSVGContainer {g} at (16,516) size 385x64
-      RenderSVGText {text} at (10,310) size 231x38 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 231x38
-          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 230.19: "$Revision: 1.5 $"
-    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt b/LayoutTests/platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt
deleted file mode 100644 (file)
index 7cb0ee5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-    RenderSVGContainer {g} at (150,25) size 502x452
-      RenderSVGContainer {g} at (150,25) size 502x77
-        RenderSVGEllipse {circle} at (150,25) size 34x34 [fill={[type=SOLID] [color=#FF7F00]}] [cx=100.00] [cy=25.00] [r=10.00]
-        RenderSVGContainer {use} at (615,65) size 37x37 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-          RenderSVGContainer {g} at (615,65) size 37x37
-            RenderSVGContainer {g} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-            RenderSVGEllipse {circle} at (615,65) size 37x37 [stroke={[type=SOLID] [color=#808080] [stroke width=2.00] [line cap=ROUND] [dash array={4.00}]}] [fill={[type=SOLID] [color=#FFFF00]}] [cx=380.00] [cy=25.00] [r=10.00]
-      RenderSVGText {text} at (99,257) size 282x29 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 282x29
-          chunk 1 (middle anchor) text run 1 at (99.26,280.00) startOffset 0 endOffset 28 width 281.47: "This text should be visible."
-    RenderSVGContainer {g} at (16,516) size 385x64
-      RenderSVGText {text} at (10,310) size 231x38 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 231x38
-          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 230.19: "$Revision: 1.5 $"
-    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt b/LayoutTests/platform/ios-sim-deprecated/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt
deleted file mode 100644 (file)
index 651cabe..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-    RenderSVGContainer {g} at (148,25) size 502x452
-      RenderSVGContainer {g} at (148,25) size 502x77
-        RenderSVGContainer {use} at (148,65) size 37x37 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-          RenderSVGContainer {g} at (148,65) size 37x37
-            RenderSVGEllipse {circle} at (148,65) size 37x37 [stroke={[type=SOLID] [color=#808080] [stroke width=2.00] [line cap=ROUND] [dash array={4.00}]}] [fill={[type=SOLID] [color=#FF7F00]}] [cx=100.00] [cy=25.00] [r=10.00]
-            RenderSVGContainer {g} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-        RenderSVGEllipse {circle} at (616,25) size 34x34 [fill={[type=SOLID] [color=#FFFF00]}] [cx=380.00] [cy=25.00] [r=10.00]
-      RenderSVGText {text} at (99,257) size 282x29 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 282x29
-          chunk 1 (middle anchor) text run 1 at (99.26,280.00) startOffset 0 endOffset 28 width 281.47: "This text should be visible."
-    RenderSVGContainer {g} at (16,516) size 385x64
-      RenderSVGText {text} at (10,310) size 231x38 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 231x38
-          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 230.19: "$Revision: 1.5 $"
-    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/ios-sim-deprecated/svg/custom/use-on-disallowed-foreign-object-3-expected.txt b/LayoutTests/platform/ios-sim-deprecated/svg/custom/use-on-disallowed-foreign-object-3-expected.txt
deleted file mode 100644 (file)
index 9a69ff6..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (54,54) size 746x546
-    RenderSVGForeignObject {foreignObject} at (10,10) size 580x380
-      RenderBlock {xhtml:div} at (0,0) size 580x20
-        RenderText {#text} at (0,0) size 247x19
-          text run at (0,0) width 247: "You should only see this string ONCE"
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-35.86)}]
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-35.86)}]
diff --git a/LayoutTests/platform/ios-sim-deprecated/svg/custom/use-recursion-1-expected.txt b/LayoutTests/platform/ios-sim-deprecated/svg/custom/use-recursion-1-expected.txt
deleted file mode 100644 (file)
index 4da5edc..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 283x36
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 142x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 142x18
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.32: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/ios-sim-deprecated/svg/custom/use-recursion-2-expected.txt b/LayoutTests/platform/ios-sim-deprecated/svg/custom/use-recursion-2-expected.txt
deleted file mode 100644 (file)
index eb206d8..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 283x36
-    RenderSVGText {text} at (10,45) size 142x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 142x18
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.32: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/ios-sim-deprecated/svg/custom/use-recursion-3-expected.txt b/LayoutTests/platform/ios-sim-deprecated/svg/custom/use-recursion-3-expected.txt
deleted file mode 100644 (file)
index 4da5edc..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 283x36
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 142x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 142x18
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.32: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/ios-sim-deprecated/svg/custom/use-recursion-4-expected.txt b/LayoutTests/platform/ios-sim-deprecated/svg/custom/use-recursion-4-expected.txt
deleted file mode 100644 (file)
index 544482f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 283x36
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 142x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 142x18
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.32: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/ios-sim-deprecated/svg/hixie/error/017-expected.txt b/LayoutTests/platform/ios-sim-deprecated/svg/hixie/error/017-expected.txt
deleted file mode 100644 (file)
index 2ca7e96..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 475x303
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGContainer {g} at (0,0) size 0x0
-      RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (20,41) size 445x223 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 445x222
-        chunk 1 text run 1 at (20.00,220.00) startOffset 0 endOffset 4 width 444.43: "FAIL"
-    RenderSVGEllipse {circle} at (0,0) size 303x303 [stroke={[type=SOLID] [color=#000000] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [cx=100.00] [cy=100.00] [r=200.00]
-    RenderSVGText {text} at (20,41) size 445x223 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 445x222
-        chunk 1 text run 1 at (20.00,220.00) startOffset 0 endOffset 4 width 444.43: "FAIL"
diff --git a/LayoutTests/platform/ios-simulator/svg/custom/use-on-disallowed-foreign-object-3-expected.txt b/LayoutTests/platform/ios-simulator/svg/custom/use-on-disallowed-foreign-object-3-expected.txt
deleted file mode 100644 (file)
index 9a69ff6..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (54,54) size 746x546
-    RenderSVGForeignObject {foreignObject} at (10,10) size 580x380
-      RenderBlock {xhtml:div} at (0,0) size 580x20
-        RenderText {#text} at (0,0) size 247x19
-          text run at (0,0) width 247: "You should only see this string ONCE"
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-35.86)}]
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-35.86)}]
diff --git a/LayoutTests/platform/ios-simulator/svg/custom/use-recursion-1-expected.txt b/LayoutTests/platform/ios-simulator/svg/custom/use-recursion-1-expected.txt
deleted file mode 100644 (file)
index 4da5edc..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 283x36
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 142x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 142x18
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.32: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/ios-simulator/svg/custom/use-recursion-2-expected.txt b/LayoutTests/platform/ios-simulator/svg/custom/use-recursion-2-expected.txt
deleted file mode 100644 (file)
index eb206d8..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 283x36
-    RenderSVGText {text} at (10,45) size 142x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 142x18
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.32: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/ios-simulator/svg/custom/use-recursion-3-expected.txt b/LayoutTests/platform/ios-simulator/svg/custom/use-recursion-3-expected.txt
deleted file mode 100644 (file)
index 4da5edc..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 283x36
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 142x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 142x18
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.32: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/ios-simulator/svg/custom/use-recursion-4-expected.txt b/LayoutTests/platform/ios-simulator/svg/custom/use-recursion-4-expected.txt
deleted file mode 100644 (file)
index 544482f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 283x36
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 142x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 142x18
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.32: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt b/LayoutTests/platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt
deleted file mode 100644 (file)
index adc1bd3..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-    RenderSVGContainer {g} at (150,25) size 500x451
-      RenderSVGContainer {g} at (150,25) size 34x34
-        RenderSVGEllipse {circle} at (150,25) size 34x34 [fill={[type=SOLID] [color=#FF7F00]}] [cx=100.00] [cy=25.00] [r=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-      RenderSVGContainer {g} at (616,25) size 34x34
-        RenderSVGEllipse {circle} at (616,25) size 34x34 [fill={[type=SOLID] [color=#FFFF00]}] [cx=380.00] [cy=25.00] [r=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-      RenderSVGText {text} at (100,257) size 280x29 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 280x28
-          chunk 1 (middle anchor) text run 1 at (100.20,280.00) startOffset 0 endOffset 28 width 279.60: "This text should be visible."
-    RenderSVGContainer {g} at (16,517) size 380x62
-      RenderSVGText {text} at (10,310) size 228x38 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 228x37
-          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 227.40: "$Revision: 1.5 $"
-    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt b/LayoutTests/platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt
deleted file mode 100644 (file)
index 2c64899..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-    RenderSVGContainer {g} at (150,25) size 502x451
-      RenderSVGContainer {g} at (150,25) size 502x77
-        RenderSVGEllipse {circle} at (150,25) size 34x34 [fill={[type=SOLID] [color=#FF7F00]}] [cx=100.00] [cy=25.00] [r=10.00]
-        RenderSVGContainer {use} at (615,65) size 37x37 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-          RenderSVGContainer {g} at (615,65) size 37x37
-            RenderSVGContainer {g} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-            RenderSVGEllipse {circle} at (615,65) size 37x37 [stroke={[type=SOLID] [color=#808080] [stroke width=2.00] [line cap=ROUND] [dash array={4.00}]}] [fill={[type=SOLID] [color=#FFFF00]}] [cx=380.00] [cy=25.00] [r=10.00]
-      RenderSVGText {text} at (100,257) size 280x29 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 280x28
-          chunk 1 (middle anchor) text run 1 at (100.20,280.00) startOffset 0 endOffset 28 width 279.60: "This text should be visible."
-    RenderSVGContainer {g} at (16,517) size 380x62
-      RenderSVGText {text} at (10,310) size 228x38 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 228x37
-          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 227.40: "$Revision: 1.5 $"
-    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt b/LayoutTests/platform/mac-mountainlion/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt
deleted file mode 100644 (file)
index 7784ee5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-    RenderSVGContainer {g} at (148,25) size 502x451
-      RenderSVGContainer {g} at (148,25) size 502x77
-        RenderSVGContainer {use} at (148,65) size 37x37 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-          RenderSVGContainer {g} at (148,65) size 37x37
-            RenderSVGEllipse {circle} at (148,65) size 37x37 [stroke={[type=SOLID] [color=#808080] [stroke width=2.00] [line cap=ROUND] [dash array={4.00}]}] [fill={[type=SOLID] [color=#FF7F00]}] [cx=100.00] [cy=25.00] [r=10.00]
-            RenderSVGContainer {g} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-        RenderSVGEllipse {circle} at (616,25) size 34x34 [fill={[type=SOLID] [color=#FFFF00]}] [cx=380.00] [cy=25.00] [r=10.00]
-      RenderSVGText {text} at (100,257) size 280x29 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 280x28
-          chunk 1 (middle anchor) text run 1 at (100.20,280.00) startOffset 0 endOffset 28 width 279.60: "This text should be visible."
-    RenderSVGContainer {g} at (16,517) size 380x62
-      RenderSVGText {text} at (10,310) size 228x38 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 228x37
-          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 227.40: "$Revision: 1.5 $"
-    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac-mountainlion/svg/custom/use-on-disallowed-foreign-object-3-expected.txt b/LayoutTests/platform/mac-mountainlion/svg/custom/use-on-disallowed-foreign-object-3-expected.txt
deleted file mode 100644 (file)
index 95017c7..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (54,54) size 746x546
-    RenderSVGForeignObject {foreignObject} at (10,10) size 580x380
-      RenderBlock {xhtml:div} at (0,0) size 580x18
-        RenderText {#text} at (0,0) size 244x18
-          text run at (0,0) width 244: "You should only see this string ONCE"
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-35.86)}]
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-35.86)}]
diff --git a/LayoutTests/platform/mac-mountainlion/svg/custom/use-recursion-1-expected.txt b/LayoutTests/platform/mac-mountainlion/svg/custom/use-recursion-1-expected.txt
deleted file mode 100644 (file)
index 152350d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 282x37
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 141x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 141x19
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.00: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/mac-mountainlion/svg/custom/use-recursion-2-expected.txt b/LayoutTests/platform/mac-mountainlion/svg/custom/use-recursion-2-expected.txt
deleted file mode 100644 (file)
index 52dfb8b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 282x37
-    RenderSVGText {text} at (10,45) size 141x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 141x19
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.00: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/mac-mountainlion/svg/custom/use-recursion-3-expected.txt b/LayoutTests/platform/mac-mountainlion/svg/custom/use-recursion-3-expected.txt
deleted file mode 100644 (file)
index 152350d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 282x37
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 141x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 141x19
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.00: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/mac-mountainlion/svg/custom/use-recursion-4-expected.txt b/LayoutTests/platform/mac-mountainlion/svg/custom/use-recursion-4-expected.txt
deleted file mode 100644 (file)
index e9da6da..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 282x37
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 141x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 141x19
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.00: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/mac-mountainlion/svg/hixie/error/017-expected.txt b/LayoutTests/platform/mac-mountainlion/svg/hixie/error/017-expected.txt
deleted file mode 100644 (file)
index 4ec48b6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 474x303
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGContainer {g} at (0,0) size 0x0
-      RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (20,40) size 444x230 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 444x230
-        chunk 1 text run 1 at (20.00,220.00) startOffset 0 endOffset 4 width 444.00: "FAIL"
-    RenderSVGEllipse {circle} at (0,0) size 303x303 [stroke={[type=SOLID] [color=#000000] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [cx=100.00] [cy=100.00] [r=200.00]
-    RenderSVGText {text} at (20,40) size 444x230 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 444x230
-        chunk 1 text run 1 at (20.00,220.00) startOffset 0 endOffset 4 width 444.00: "FAIL"
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png
deleted file mode 100644 (file)
index 58bc0df..0000000
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt
deleted file mode 100644 (file)
index 48630bb..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-    RenderSVGContainer {g} at (150,25) size 500x451
-      RenderSVGContainer {g} at (150,25) size 34x34
-        RenderSVGEllipse {circle} at (150,25) size 34x34 [fill={[type=SOLID] [color=#FF7F00]}] [cx=100.00] [cy=25.00] [r=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-      RenderSVGContainer {g} at (616,25) size 34x34
-        RenderSVGEllipse {circle} at (616,25) size 34x34 [fill={[type=SOLID] [color=#FFFF00]}] [cx=380.00] [cy=25.00] [r=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-      RenderSVGText {text} at (99,257) size 282x29 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 282x28
-          chunk 1 (middle anchor) text run 1 at (99.26,280.00) startOffset 0 endOffset 28 width 281.47: "This text should be visible."
-    RenderSVGContainer {g} at (16,517) size 381x62
-      RenderSVGText {text} at (10,310) size 229x38 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 229x37
-          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 228.03: "$Revision: 1.5 $"
-    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png
deleted file mode 100644 (file)
index c1adfb8..0000000
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt
deleted file mode 100644 (file)
index 8f0189d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-    RenderSVGContainer {g} at (150,25) size 502x451
-      RenderSVGContainer {g} at (150,25) size 502x77
-        RenderSVGEllipse {circle} at (150,25) size 34x34 [fill={[type=SOLID] [color=#FF7F00]}] [cx=100.00] [cy=25.00] [r=10.00]
-        RenderSVGContainer {use} at (615,65) size 37x37 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-          RenderSVGContainer {g} at (615,65) size 37x37
-            RenderSVGContainer {g} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-            RenderSVGEllipse {circle} at (615,65) size 37x37 [stroke={[type=SOLID] [color=#808080] [stroke width=2.00] [line cap=ROUND] [dash array={4.00}]}] [fill={[type=SOLID] [color=#FFFF00]}] [cx=380.00] [cy=25.00] [r=10.00]
-      RenderSVGText {text} at (99,257) size 282x29 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 282x28
-          chunk 1 (middle anchor) text run 1 at (99.26,280.00) startOffset 0 endOffset 28 width 281.47: "This text should be visible."
-    RenderSVGContainer {g} at (16,517) size 381x62
-      RenderSVGText {text} at (10,310) size 229x38 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 229x37
-          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 228.03: "$Revision: 1.5 $"
-    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png
deleted file mode 100644 (file)
index 00aeb4d..0000000
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt
deleted file mode 100644 (file)
index 0437062..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-    RenderSVGContainer {g} at (148,25) size 502x451
-      RenderSVGContainer {g} at (148,25) size 502x77
-        RenderSVGContainer {use} at (148,65) size 37x37 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-          RenderSVGContainer {g} at (148,65) size 37x37
-            RenderSVGEllipse {circle} at (148,65) size 37x37 [stroke={[type=SOLID] [color=#808080] [stroke width=2.00] [line cap=ROUND] [dash array={4.00}]}] [fill={[type=SOLID] [color=#FF7F00]}] [cx=100.00] [cy=25.00] [r=10.00]
-            RenderSVGContainer {g} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-        RenderSVGEllipse {circle} at (616,25) size 34x34 [fill={[type=SOLID] [color=#FFFF00]}] [cx=380.00] [cy=25.00] [r=10.00]
-      RenderSVGText {text} at (99,257) size 282x29 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 282x28
-          chunk 1 (middle anchor) text run 1 at (99.26,280.00) startOffset 0 endOffset 28 width 281.47: "This text should be visible."
-    RenderSVGContainer {g} at (16,517) size 381x62
-      RenderSVGText {text} at (10,310) size 229x38 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 229x37
-          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 228.03: "$Revision: 1.5 $"
-    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.png b/LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.png
deleted file mode 100644 (file)
index fa0825b..0000000
Binary files a/LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt b/LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt
deleted file mode 100644 (file)
index 9cf37dc..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (54,54) size 746x546
-    RenderSVGForeignObject {foreignObject} at (10,10) size 580x380
-      RenderBlock {xhtml:div} at (0,0) size 580x18
-        RenderText {#text} at (0,0) size 245x18
-          text run at (0,0) width 245: "You should only see this string ONCE"
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-35.86)}]
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-35.86)}]
diff --git a/LayoutTests/platform/mac/svg/custom/use-recursion-1-expected.png b/LayoutTests/platform/mac/svg/custom/use-recursion-1-expected.png
deleted file mode 100644 (file)
index 672610f..0000000
Binary files a/LayoutTests/platform/mac/svg/custom/use-recursion-1-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/svg/custom/use-recursion-1-expected.txt b/LayoutTests/platform/mac/svg/custom/use-recursion-1-expected.txt
deleted file mode 100644 (file)
index 863c812..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 283x37
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 142x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 142x19
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.32: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/mac/svg/custom/use-recursion-2-expected.png b/LayoutTests/platform/mac/svg/custom/use-recursion-2-expected.png
deleted file mode 100644 (file)
index 672610f..0000000
Binary files a/LayoutTests/platform/mac/svg/custom/use-recursion-2-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/svg/custom/use-recursion-2-expected.txt b/LayoutTests/platform/mac/svg/custom/use-recursion-2-expected.txt
deleted file mode 100644 (file)
index f43312f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 283x37
-    RenderSVGText {text} at (10,45) size 142x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 142x19
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.32: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/mac/svg/custom/use-recursion-3-expected.png b/LayoutTests/platform/mac/svg/custom/use-recursion-3-expected.png
deleted file mode 100644 (file)
index 672610f..0000000
Binary files a/LayoutTests/platform/mac/svg/custom/use-recursion-3-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/svg/custom/use-recursion-3-expected.txt b/LayoutTests/platform/mac/svg/custom/use-recursion-3-expected.txt
deleted file mode 100644 (file)
index 863c812..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 283x37
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 142x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 142x19
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.32: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/mac/svg/custom/use-recursion-4-expected.png b/LayoutTests/platform/mac/svg/custom/use-recursion-4-expected.png
deleted file mode 100644 (file)
index 672610f..0000000
Binary files a/LayoutTests/platform/mac/svg/custom/use-recursion-4-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/svg/custom/use-recursion-4-expected.txt b/LayoutTests/platform/mac/svg/custom/use-recursion-4-expected.txt
deleted file mode 100644 (file)
index 2b062a5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (20,91) size 283x37
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 125x25
-        RenderSVGRect {rect} at (0,0) size 125x25 [stroke={[type=SOLID] [color=#000080] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=60.00] [height=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (10,45) size 142x19 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 142x19
-        chunk 1 text run 1 at (10.00,60.00) startOffset 0 endOffset 22 width 141.32: "This should not crash."
-    RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(25.00,25.00)}]
diff --git a/LayoutTests/platform/mac/svg/hixie/error/017-expected.png b/LayoutTests/platform/mac/svg/hixie/error/017-expected.png
deleted file mode 100644 (file)
index f701880..0000000
Binary files a/LayoutTests/platform/mac/svg/hixie/error/017-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/svg/hixie/error/017-expected.txt b/LayoutTests/platform/mac/svg/hixie/error/017-expected.txt
deleted file mode 100644 (file)
index b5b5ff5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 475x303
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGContainer {g} at (0,0) size 0x0
-      RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (20,40) size 445x230 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 445x230
-        chunk 1 text run 1 at (20.00,220.00) startOffset 0 endOffset 4 width 444.43: "FAIL"
-    RenderSVGEllipse {circle} at (0,0) size 303x303 [stroke={[type=SOLID] [color=#000000] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [cx=100.00] [cy=100.00] [r=200.00]
-    RenderSVGText {text} at (20,40) size 445x230 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 445x230
-        chunk 1 text run 1 at (20.00,220.00) startOffset 0 endOffset 4 width 444.43: "FAIL"
diff --git a/LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.svg b/LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.svg
new file mode 100644 (file)
index 0000000..b539a14
--- /dev/null
@@ -0,0 +1,11 @@
+<svg viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg">
+  <circle cx="100" cy="25" r="10" fill="#FF7F00"/>
+  <circle cx="100" cy="50" r="10" fill="#FF7F00" stroke="gray" stroke-width="2" stroke-dasharray="4" stroke-linecap="round"/>
+  <circle cx="100" cy="75" r="10" fill="#FF7F00" stroke="gray" stroke-width="2" stroke-dasharray="4" stroke-linecap="round"/>
+  <circle cx="380" cy="25" r="10" fill="yellow"/>
+  <circle cx="380" cy="50" r="10" fill="yellow" stroke="gray" stroke-width="2" stroke-dasharray="4" stroke-linecap="round"/>
+  <circle cx="380" cy="75" r="10" fill="yellow" stroke="gray" stroke-width="2" stroke-dasharray="4" stroke-linecap="round"/>
+  <text x="240" y="280" text-anchor="middle" fill="green" font-family="sans-serif" font-size="24">This text should be visible.</text>
+  <text x="10" y="340" font-family="sans-serif" font-size="32">$Revision: 1.5 $</text>
+  <rect x="1" y="1" width="478" height="358" fill="none" stroke="black"/>
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt b/LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t-expected.txt
deleted file mode 100644 (file)
index 096b998..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-    RenderSVGContainer {g} at (150,25) size 500x450
-      RenderSVGContainer {g} at (150,25) size 34x34
-        RenderSVGEllipse {circle} at (150,25) size 34x34 [fill={[type=SOLID] [color=#FF7F00]}] [cx=100.00] [cy=25.00] [r=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-      RenderSVGContainer {g} at (616,25) size 34x34
-        RenderSVGEllipse {circle} at (616,25) size 34x34 [fill={[type=SOLID] [color=#FFFF00]}] [cx=380.00] [cy=25.00] [r=10.00]
-        RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-      RenderSVGText {text} at (100,258) size 280x27 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 280x27
-          chunk 1 (middle anchor) text run 1 at (100.20,280.00) startOffset 0 endOffset 28 width 279.60: "This text should be visible."
-    RenderSVGContainer {g} at (16,518) size 380x60
-      RenderSVGText {text} at (10,311) size 228x36 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 228x36
-          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 227.40: "$Revision: 1.5 $"
-    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.svg b/LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.svg
new file mode 100644 (file)
index 0000000..ac18c41
--- /dev/null
@@ -0,0 +1,7 @@
+<svg viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg">
+  <circle cx="100" cy="25" r="10" fill="#FF7F00"/>
+  <circle cx="380" cy="50" r="10" fill="yellow" stroke="gray" stroke-width="2" stroke-dasharray="4" stroke-linecap="round"/>
+  <text x="240" y="280" text-anchor="middle" fill="green" font-family="sans-serif" font-size="24">This text should be visible.</text>
+  <text x="10" y="340" font-family="sans-serif" font-size="32">$Revision: 1.5 $</text>
+  <rect x="1" y="1" width="478" height="358" fill="none" stroke="black"/>
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt b/LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t-expected.txt
deleted file mode 100644 (file)
index 6c377a6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-    RenderSVGContainer {g} at (150,25) size 502x450
-      RenderSVGContainer {g} at (150,25) size 502x77
-        RenderSVGEllipse {circle} at (150,25) size 34x34 [fill={[type=SOLID] [color=#FF7F00]}] [cx=100.00] [cy=25.00] [r=10.00]
-        RenderSVGContainer {use} at (615,65) size 37x37 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-          RenderSVGContainer {g} at (615,65) size 37x37
-            RenderSVGContainer {g} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-            RenderSVGEllipse {circle} at (615,65) size 37x37 [stroke={[type=SOLID] [color=#808080] [stroke width=2.00] [line cap=ROUND] [dash array={4.00}]}] [fill={[type=SOLID] [color=#FFFF00]}] [cx=380.00] [cy=25.00] [r=10.00]
-      RenderSVGText {text} at (100,258) size 280x27 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 280x27
-          chunk 1 (middle anchor) text run 1 at (100.20,280.00) startOffset 0 endOffset 28 width 279.60: "This text should be visible."
-    RenderSVGContainer {g} at (16,518) size 380x60
-      RenderSVGText {text} at (10,311) size 228x36 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 228x36
-          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 227.40: "$Revision: 1.5 $"
-    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.svg b/LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.svg
new file mode 100644 (file)
index 0000000..7aaeafd
--- /dev/null
@@ -0,0 +1,7 @@
+<svg viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg">
+  <circle cx="380" cy="25" r="10" fill="yellow"/>
+  <circle cx="100" cy="50" r="10" fill="#FF7F00" stroke="gray" stroke-width="2" stroke-dasharray="4" stroke-linecap="round"/>
+  <text x="240" y="280" text-anchor="middle" fill="green" font-family="sans-serif" font-size="24">This text should be visible.</text>
+  <text x="10" y="340" font-family="sans-serif" font-size="32">$Revision: 1.5 $</text>
+  <rect x="1" y="1" width="478" height="358" fill="none" stroke="black"/>
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt b/LayoutTests/svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t-expected.txt
deleted file mode 100644 (file)
index 433379f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 800x600
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-    RenderSVGContainer {g} at (148,25) size 502x450
-      RenderSVGContainer {g} at (148,25) size 502x77
-        RenderSVGContainer {use} at (148,65) size 37x37 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-          RenderSVGContainer {g} at (148,65) size 37x37
-            RenderSVGEllipse {circle} at (148,65) size 37x37 [stroke={[type=SOLID] [color=#808080] [stroke width=2.00] [line cap=ROUND] [dash array={4.00}]}] [fill={[type=SOLID] [color=#FF7F00]}] [cx=100.00] [cy=25.00] [r=10.00]
-            RenderSVGContainer {g} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,25.00)}]
-        RenderSVGEllipse {circle} at (616,25) size 34x34 [fill={[type=SOLID] [color=#FFFF00]}] [cx=380.00] [cy=25.00] [r=10.00]
-      RenderSVGText {text} at (100,258) size 280x27 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 280x27
-          chunk 1 (middle anchor) text run 1 at (100.20,280.00) startOffset 0 endOffset 28 width 279.60: "This text should be visible."
-    RenderSVGContainer {g} at (16,518) size 380x60
-      RenderSVGText {text} at (10,311) size 228x36 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 228x36
-          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 227.40: "$Revision: 1.5 $"
-    RenderSVGRect {rect} at (0,0) size 800x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/svg/custom/use-on-disallowed-foreign-object-3-expected.svg b/LayoutTests/svg/custom/use-on-disallowed-foreign-object-3-expected.svg
new file mode 100644 (file)
index 0000000..449ae19
--- /dev/null
@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xhtml="http://www.w3.org/1999/xhtml">
+<foreignObject x="10" y="10" width="580" height="380" transform="scale(5) skewY(5) skewX(5)">
+<xhtml:div>You should only see this string ONCE</xhtml:div>
+</foreignObject>
+</svg>
diff --git a/LayoutTests/svg/custom/use-recursion-1-expected.svg b/LayoutTests/svg/custom/use-recursion-1-expected.svg
new file mode 100644 (file)
index 0000000..97394f7
--- /dev/null
@@ -0,0 +1,4 @@
+<svg viewBox="0 0 400 300" xmlns="http://www.w3.org/2000/svg">
+<text x="10" y="60">This should not crash.</text>
+<rect x="25" y="25" stroke-width="5px" fill="red" stroke="navy" width="60" height="10"/>
+</svg>
diff --git a/LayoutTests/svg/custom/use-recursion-2-expected.svg b/LayoutTests/svg/custom/use-recursion-2-expected.svg
new file mode 100644 (file)
index 0000000..554cec5
--- /dev/null
@@ -0,0 +1,4 @@
+<svg viewBox="0 0 400 300" xmlns="http://www.w3.org/2000/svg">
+<text x="10" y="60">This should not crash.</text>
+</svg>
+
diff --git a/LayoutTests/svg/custom/use-recursion-3-expected.svg b/LayoutTests/svg/custom/use-recursion-3-expected.svg
new file mode 100644 (file)
index 0000000..97394f7
--- /dev/null
@@ -0,0 +1,4 @@
+<svg viewBox="0 0 400 300" xmlns="http://www.w3.org/2000/svg">
+<text x="10" y="60">This should not crash.</text>
+<rect x="25" y="25" stroke-width="5px" fill="red" stroke="navy" width="60" height="10"/>
+</svg>
diff --git a/LayoutTests/svg/custom/use-recursion-4-expected.svg b/LayoutTests/svg/custom/use-recursion-4-expected.svg
new file mode 100644 (file)
index 0000000..97394f7
--- /dev/null
@@ -0,0 +1,4 @@
+<svg viewBox="0 0 400 300" xmlns="http://www.w3.org/2000/svg">
+<text x="10" y="60">This should not crash.</text>
+<rect x="25" y="25" stroke-width="5px" fill="red" stroke="navy" width="60" height="10"/>
+</svg>
diff --git a/LayoutTests/svg/hixie/error/017-expected.txt b/LayoutTests/svg/hixie/error/017-expected.txt
deleted file mode 100644 (file)
index f6444e1..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,0) size 474x303
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-      RenderSVGContainer {g} at (0,0) size 0x0
-        RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGContainer {g} at (0,0) size 0x0
-      RenderSVGContainer {use} at (0,0) size 0x0
-    RenderSVGText {text} at (20,42) size 444x221 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 444x221
-        chunk 1 text run 1 at (20.00,220.00) startOffset 0 endOffset 4 width 444.00: "FAIL"
-    RenderSVGEllipse {circle} at (0,0) size 303x303 [stroke={[type=SOLID] [color=#000000] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FF0000]}] [cx=100.00] [cy=100.00] [r=200.00]
-    RenderSVGText {text} at (20,42) size 444x221 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 444x221
-        chunk 1 text run 1 at (20.00,220.00) startOffset 0 endOffset 4 width 444.00: "FAIL"
diff --git a/LayoutTests/svg/hixie/error/017-expected.xml b/LayoutTests/svg/hixie/error/017-expected.xml
new file mode 100644 (file)
index 0000000..a1428e7
--- /dev/null
@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <text x="20" y="220" font-size="200" stroke="black" stroke-width="10" fill="white">FAIL</text>
+ <circle cx="100" cy="100" r="200" stroke="black" stroke-width="5" fill="red"/>
+ <text x="20" y="220" font-size="200" fill="white">FAIL</text>
+</svg>
index 7ecceca..b313661 100644 (file)
@@ -5,7 +5,7 @@
     tree of the <use> element should update the corresponding shadow render
     tree as well.
     
-    https://bugs.webkit.org/show_bug.cgi?id=139469
+    https://bugs.webkit.org/show_bug.cgi?id=139451
 -->
 <html>
 <body>
index a7859dc..ff0f6f2 100644 (file)
@@ -1,3 +1,82 @@
+2015-02-08  Darin Adler  <darin@apple.com>
+
+        Make SVGUseElement work without creating any SVGElementInstance objects
+        https://bugs.webkit.org/show_bug.cgi?id=141374
+
+        Reviewed by Sam Weinig.
+
+        * dom/ElementIterator.h: Changed the * and -> operators to be const.
+        There is no need for the iterator itself to be modified just to dereference it.
+
+        * dom/TypedElementDescendantIterator.h: Added DoubleTypedElementDescendantIterator.
+        This allows callers to call descendantsOfType on two elements, as long as the caller
+        can guarantee that both have the same number of descendants of that type. It's handy
+        for walking a tree of cloned elements to set up something between each original and
+        its clone. In the future we might instead change the cloning machinery so it can do
+        this work as we clone, and if so, we could consider deleting this.
+
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::correspondingElement): Made this const.
+        (WebCore::SVGElement::invalidateInstances): Got rid of the rule that said "this can
+        only be done for an element in a document", since it's useful to do this on an element
+        that has just been removed from a document. Removed the "updateStyleIfNeeded" call
+        here now that the other changes make it no longer needed. Removed an unimportant
+        assertion that we only invalidate use elements that are in a document; that's not
+        a necessary restriction. Streamlined the logic a bit.
+
+        * svg/SVGElement.h: Made correspondingElement const.
+
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::insertedInto): Removed an assertion about
+        m_targetElementInstance since that's gone now.
+        (WebCore::SVGUseElement::svgAttributeChanged): Changed code that transfers
+        size attributes to the shadow tree to use shadowTreeTargetClone instead of
+        m_targetElementInstance.
+        (WebCore::SVGUseElement::clearResourceReferences): Removed code to detach
+        m_targetElementInstance, and also the call to removeAllTargetReferencesForElement,
+        because we no longer use those.
+        (WebCore::SVGUseElement::buildPendingResource): Moved the code to build the
+        shadow tree in here and deleted the buildShadowAndInstanceTree function.
+        Also changed logic so that we use a pending resource any time the target is not
+        a valid one. That helps us correctly handle cases where we initially have an
+        invalid target, but later get a value one
+        (WebCore::SVGUseElement::buildShadowAndInstanceTree): Deleted. The code here
+        was greatly simplified and moved into buildPendingResource.
+        (WebCore::SVGUseElement::buildInstanceTree): Deleted.
+        (WebCore::SVGUseElement::hasCycleUseReferencing): Deleted. Cycles are now
+        detected by the new isValidTarget function and so there's no need for a
+        separate explicit check for a cycle.
+        (WebCore::associateClonesWithOriginals): Added. Helper that makes
+        functions that build the shadow tree simpler and easier to read.
+        (WebCore::associateReplacementCloneWithOriginal): Added. Helper to
+        make associateReplacementClonesWithOriginals simple.
+        (WebCore::associateReplacementClonesWithOriginals): Added. Helper that
+        makes functions that build the shadow tree simpler and easier to read.
+        (WebCore::SVGUseElement::buildShadowTree): Call associateClonesWithOriginals
+        since associateInstancesWithShadowTreeElements no longer does this.
+        (WebCore::SVGUseElement::isValidTarget): Added. Covers all the different
+        reasons a target might not be valid: type of element, reference cycles, and
+        also "not in document" (refactored in here; not sure when that can happen
+        in practice, might be possible to remove it later).
+        (WebCore::SVGUseElement::expandUseElementsInShadowTree): Add checks for
+        documents that are still loading; this used to be checked when building the
+        instance tree. Added calls to associateReplacementClonesWithOriginals and
+        associateClonesWithOriginals; that used to be done by later in the
+        associateInstancesWithShadowTreeElements function. Use isValidTarget so
+        we handle cycles as well as invalid target types.
+        (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Added a call to
+        associateReplacementClonesWithOriginals, since we can no longer do that in
+        associateInstancesWithShadowTreeElements.
+        (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): Deleted.
+        (WebCore::SVGUseElement::instanceForShadowTreeElement): Deleted.
+        (WebCore::SVGUseElement::invalidateDependentShadowTrees): Removed a comment
+        that simply restated the name of the function.
+
+        * svg/SVGUseElement.h: Removed instanceForShadowTreeElement,
+        buildShadowAndInstanceTree, detachInstance, buildInstanceTree,
+        hasCycleUseReferencing, associateInstancesWithShadowTreeElements,
+        instanceForShadowTreeElement, and m_targetElementInstance. Added isValidTarget.
+
 2015-02-08  Chris Dumez  <cdumez@apple.com>
 
         [WK2] Add logging to validate the network cache efficacy (Part 1)
index 4ca4a60..8bfd38b 100644 (file)
@@ -40,8 +40,8 @@ public:
     ElementIterator(const ContainerNode* root);
     ElementIterator(const ContainerNode* root, ElementType* current);
 
-    ElementType& operator*();
-    ElementType* operator->();
+    ElementType& operator*() const;
+    ElementType* operator->() const;
 
     bool operator==(const ElementIterator& other) const;
     bool operator!=(const ElementIterator& other) const;
@@ -211,7 +211,7 @@ inline ElementIterator<ElementType>& ElementIterator<ElementType>::traverseAnces
 }
 
 template <typename ElementType>
-inline ElementType& ElementIterator<ElementType>::operator*()
+inline ElementType& ElementIterator<ElementType>::operator*() const
 {
     ASSERT(m_current);
     ASSERT(!m_assertions.domTreeHasMutated());
@@ -219,7 +219,7 @@ inline ElementType& ElementIterator<ElementType>::operator*()
 }
 
 template <typename ElementType>
-inline ElementType* ElementIterator<ElementType>::operator->()
+inline ElementType* ElementIterator<ElementType>::operator->() const
 {
     ASSERT(m_current);
     ASSERT(!m_assertions.domTreeHasMutated());
index 0e2251e..5e6a6a8 100644 (file)
@@ -30,6 +30,8 @@
 
 namespace WebCore {
 
+template<typename ElementType> class DoubleTypedElementDescendantIterator;
+
 template <typename ElementType>
 class TypedElementDescendantIterator : public ElementIterator<ElementType> {
 public:
@@ -78,9 +80,41 @@ private:
     const ContainerNode& m_root;
 };
 
+template<typename ElementType> class DoubleTypedElementDescendantIteratorAdapter {
+public:
+    typedef TypedElementDescendantIteratorAdapter<ElementType> SingleAdapter;
+    typedef DoubleTypedElementDescendantIterator<ElementType> Iterator;
+
+    DoubleTypedElementDescendantIteratorAdapter(SingleAdapter&&, SingleAdapter&&);
+    Iterator begin();
+    Iterator end();
+
+private:
+    std::pair<SingleAdapter, SingleAdapter> m_pair;
+};
+
+template<typename ElementType> class DoubleTypedElementDescendantIterator {
+public:
+    typedef TypedElementDescendantIterator<ElementType> SingleIterator;
+    typedef std::pair<ElementType&, ElementType&> ReferenceProxy;
+
+    DoubleTypedElementDescendantIterator(SingleIterator&&, SingleIterator&&);
+    ReferenceProxy operator*() const;
+    bool operator==(const DoubleTypedElementDescendantIterator&) const;
+    bool operator!=(const DoubleTypedElementDescendantIterator&) const;
+    DoubleTypedElementDescendantIterator& operator++();
+
+private:
+    std::pair<SingleIterator, SingleIterator> m_pair;
+};
+
 template <typename ElementType> TypedElementDescendantIteratorAdapter<ElementType> descendantsOfType(ContainerNode&);
 template <typename ElementType> TypedElementDescendantConstIteratorAdapter<ElementType> descendantsOfType(const ContainerNode&);
 
+// This must only be used when both sets of descendants are known to be the same length.
+// If they are different lengths, this will stop when the shorter one reaches the end, but also an assertion will fail.
+template<typename ElementType> DoubleTypedElementDescendantIteratorAdapter<ElementType> descendantsOfType(ContainerNode& firstRoot, ContainerNode& secondRoot);
+
 // TypedElementDescendantIterator
 
 template <typename ElementType>
@@ -220,6 +254,53 @@ inline const ElementType* TypedElementDescendantConstIteratorAdapter<ElementType
     return Traversal<ElementType>::lastWithin(m_root);
 }
 
+// DoubleTypedElementDescendantIteratorAdapter
+
+template<typename ElementType> inline DoubleTypedElementDescendantIteratorAdapter<ElementType>::DoubleTypedElementDescendantIteratorAdapter(SingleAdapter&& first, SingleAdapter&& second)
+    : m_pair(WTF::move(first), WTF::move(second))
+{
+}
+
+template<typename ElementType> inline auto DoubleTypedElementDescendantIteratorAdapter<ElementType>::begin() -> Iterator
+{
+    return { m_pair.first.begin(), m_pair.second.begin() };
+}
+
+template<typename ElementType> inline auto DoubleTypedElementDescendantIteratorAdapter<ElementType>::end() -> Iterator
+{
+    return { m_pair.first.end(), m_pair.second.end() };
+}
+
+// DoubleTypedElementDescendantIterator
+
+template<typename ElementType> inline DoubleTypedElementDescendantIterator<ElementType>::DoubleTypedElementDescendantIterator(SingleIterator&& first, SingleIterator&& second)
+    : m_pair(WTF::move(first), WTF::move(second))
+{
+}
+
+template<typename ElementType> inline auto DoubleTypedElementDescendantIterator<ElementType>::operator*() const -> ReferenceProxy
+{
+    return { *m_pair.first, *m_pair.second };
+}
+
+template<typename ElementType> inline bool DoubleTypedElementDescendantIterator<ElementType>::operator==(const DoubleTypedElementDescendantIterator& other) const
+{
+    ASSERT((m_pair.first == other.m_pair.first) == (m_pair.second == other.m_pair.second));
+    return m_pair.first == other.m_pair.first || m_pair.second == other.m_pair.second;
+}
+
+template<typename ElementType> inline bool DoubleTypedElementDescendantIterator<ElementType>::operator!=(const DoubleTypedElementDescendantIterator& other) const
+{
+    return !(*this == other);
+}
+
+template<typename ElementType> inline DoubleTypedElementDescendantIterator<ElementType>& DoubleTypedElementDescendantIterator<ElementType>::operator++()
+{
+    ++m_pair.first;
+    ++m_pair.second;
+    return *this;
+}
+
 // Standalone functions
 
 template <typename ElementType>
@@ -234,6 +315,11 @@ inline TypedElementDescendantConstIteratorAdapter<ElementType> descendantsOfType
     return TypedElementDescendantConstIteratorAdapter<ElementType>(root);
 }
 
+template<typename ElementType> inline DoubleTypedElementDescendantIteratorAdapter<ElementType> descendantsOfType(ContainerNode& firstRoot, ContainerNode& secondRoot)
+{
+    return { descendantsOfType<ElementType>(firstRoot), descendantsOfType<ElementType>(secondRoot) };
+}
+
 }
 
 #endif
index 8ce83eb..ec1b193 100644 (file)
@@ -475,7 +475,7 @@ void SVGElement::cursorImageValueRemoved()
     m_svgRareData->setCursorImageValue(0);
 }
 
-SVGElement* SVGElement::correspondingElement()
+SVGElement* SVGElement::correspondingElement() const
 {
     ASSERT(!m_svgRareData || !m_svgRareData->correspondingElement() || correspondingUseElement());
     return m_svgRareData ? m_svgRareData->correspondingElement() : nullptr;
@@ -1207,28 +1207,16 @@ void SVGElement::accessKeyAction(bool sendMouseEvents)
 
 void SVGElement::invalidateInstances()
 {
-    if (!inDocument())
-        return;
-
     if (instanceUpdatesBlocked())
         return;
 
     auto& instances = this->instances();
-    if (instances.isEmpty())
-        return;
-
-    // Mark all use elements referencing 'element' for rebuilding
-    do {
+    while (!instances.isEmpty()) {
         SVGElement* instance = *instances.begin();
-        if (SVGUseElement* element = instance->correspondingUseElement()) {
-            ASSERT(element->inDocument());
-            element->invalidateShadowTree();
-        }
+        if (SVGUseElement* useElement = instance->correspondingUseElement())
+            useElement->invalidateShadowTree();
         instance->setCorrespondingElement(nullptr);
     } while (!instances.isEmpty());
-
-    // FIXME: Why is this needed?
-    document().updateStyleIfNeeded();
 }
 
 }
index f730649..0171e79 100644 (file)
@@ -113,7 +113,7 @@ public:
     void setCursorImageValue(CSSCursorImageValue*);
     void cursorImageValueRemoved();
 
-    SVGElement* correspondingElement();
+    SVGElement* correspondingElement() const;
     SVGUseElement* correspondingUseElement() const;
 
     void setCorrespondingElement(SVGElement*);
index c7b2f31..b3a0cef 100644 (file)
@@ -157,7 +157,6 @@ Node::InsertionNotificationRequest SVGUseElement::insertedInto(ContainerNode& ro
     SVGGraphicsElement::insertedInto(rootParent);
     if (!rootParent.inDocument())
         return InsertionDone;
-    ASSERT(!m_targetElementInstance || !isWellFormedDocument(document()));
     ASSERT(!hasPendingResources() || !isWellFormedDocument(document()));
     SVGExternalResourcesRequired::insertedIntoDocument(this);
     if (!m_wasInsertedByParser)
@@ -227,11 +226,10 @@ void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName)
 
     if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr) {
         updateRelativeLengthsInformation();
-        if (m_targetElementInstance) {
+        if (SVGElement* shadowTreeTargetClone = this->shadowTreeTargetClone()) {
             // FIXME: It's unnecessarily inefficient to do this work any time we change "x" or "y".
             // FIXME: It's unnecessarily inefficient to update both width and height each time either is changed.
-            ASSERT(m_targetElementInstance->shadowTreeElement());
-            transferSizeAttributesToShadowTreeTargetClone(*m_targetElementInstance->shadowTreeElement());
+            transferSizeAttributesToShadowTreeTargetClone(*shadowTreeTargetClone);
         }
         if (auto* renderer = this->renderer())
             RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
@@ -313,23 +311,17 @@ static bool isDisallowedElement(const Element& element)
 
 void SVGUseElement::clearResourceReferences()
 {
-    // FIXME: We should try to optimize this, to at least allow partial reclones.
+    // FIXME: It's expensive to re-clone the entire tree every time. We should find a more efficient way to handle this.
     if (ShadowRoot* root = userAgentShadowRoot())
         root->removeChildren();
-
-    if (m_targetElementInstance) {
-        m_targetElementInstance->detach();
-        m_targetElementInstance = 0;
-    }
-
     m_needsShadowTreeRecreation = false;
-
-    document().accessSVGExtensions().removeAllTargetReferencesForElement(this);
 }
 
 void SVGUseElement::buildPendingResource()
 {
-    if (!referencedDocument() || isInShadowTree())
+    if (isInShadowTree())
+        return;
+    if (!referencedDocument())
         return;
     clearResourceReferences();
     if (!inDocument())
@@ -337,25 +329,31 @@ void SVGUseElement::buildPendingResource()
 
     String id;
     Element* target = SVGURIReference::targetElementFromIRIString(href(), document(), &id, externalDocument());
-    if (!target || !target->inDocument()) {
-        // If we can't find the target of an external element, just give up.
-        // We can't observe if the target somewhen enters the external document, nor should we do it.
-        if (externalDocument())
-            return;
-        if (id.isEmpty())
+    if (!isValidTarget(target)) {
+        if (externalDocument()) {
+            // We can't find the target in an external document, so just give up and don't try to do it again.
+            // We should not attempt to observe if an element with ID shows up in the external document later.
             return;
-
+        }
         referencedDocument()->accessSVGExtensions().addPendingResource(id, this);
-        ASSERT(hasPendingResources());
         return;
     }
 
-    if (target->isSVGElement()) {
-        buildShadowAndInstanceTree(downcast<SVGElement>(*target));
-        invalidateDependentShadowTrees();
-    }
+    buildShadowTree(downcast<SVGElement>(*target));
+    expandUseElementsInShadowTree();
+    expandSymbolElementsInShadowTree();
+    transferSizeAttributesToShadowTreeTargetClone(*shadowTreeTargetClone());
+    transferEventListenersToShadowTree();
+    updateRelativeLengthsInformation();
 
+    // When we invalidate the other shadow trees, it's important that we don't
+    // follow any cycles and invalidate ourselves. To avoid that, we temporarily
+    // set m_needsShadowTreeRecreation to true so invalidateShadowTree will
+    // quickly return and do nothing.
     ASSERT(!m_needsShadowTreeRecreation);
+    m_needsShadowTreeRecreation = true;
+    invalidateDependentShadowTrees();
+    m_needsShadowTreeRecreation = false;
 }
 
 SVGElement* SVGUseElement::shadowTreeTargetClone() const
@@ -366,65 +364,6 @@ SVGElement* SVGUseElement::shadowTreeTargetClone() const
     return downcast<SVGElement>(root->firstChild());
 }
 
-void SVGUseElement::buildShadowAndInstanceTree(SVGElement& target)
-{
-    ASSERT(!m_targetElementInstance);
-
-    // Do not build the shadow/instance tree for <use> elements living in a shadow tree.
-    // The will be expanded soon anyway - see expandUseElementsInShadowTree().
-    if (isInShadowTree())
-        return;
-
-    // Do not allow self-referencing.
-    if (&target == this)
-        return;
-
-    // Build instance tree.
-    // Spec: If the 'use' element references a simple graphics element such as a 'rect', then there is only a
-    // single SVGElementInstance object, and the correspondingElement attribute on this SVGElementInstance object
-    // is the SVGRectElement that corresponds to the referenced 'rect' element.
-    m_targetElementInstance = SVGElementInstance::create(this, this, &target);
-
-    // Eventually enter recursion to build SVGElementInstance objects for the sub-tree children
-    bool foundProblem = false;
-    buildInstanceTree(&target, m_targetElementInstance.get(), foundProblem, false);
-
-    if (instanceTreeIsLoading(m_targetElementInstance.get()))
-        return;
-
-    // SVG specification does not say a word about <use> and cycles. My view on this is: just ignore it!
-    // Non-appearing <use> content is easier to debug, then half-appearing content.
-    if (foundProblem) {
-        clearResourceReferences();
-        return;
-    }
-
-    // Assure instance tree building was successful.
-    ASSERT(m_targetElementInstance);
-    ASSERT(!m_targetElementInstance->shadowTreeElement());
-    ASSERT(m_targetElementInstance->correspondingUseElement() == this);
-    ASSERT(m_targetElementInstance->directUseElement() == this);
-    ASSERT(m_targetElementInstance->correspondingElement() == &target);
-
-    if (isDisallowedElement(target)) {
-        clearResourceReferences();
-        return;
-    }
-
-    buildShadowTree(target);
-    expandUseElementsInShadowTree();
-    expandSymbolElementsInShadowTree();
-
-    ASSERT(shadowTreeTargetClone());
-    SVGElement& shadowTreeTargetClone = *this->shadowTreeTargetClone();
-    associateInstancesWithShadowTreeElements(&shadowTreeTargetClone, m_targetElementInstance.get());
-
-    transferSizeAttributesToShadowTreeTargetClone(shadowTreeTargetClone);
-
-    transferEventListenersToShadowTree();
-    updateRelativeLengthsInformation();
-}
-
 RenderPtr<RenderElement> SVGUseElement::createElementRenderer(Ref<RenderStyle>&& style)
 {
     return createRenderer<RenderSVGTransformableContainer>(*this, WTF::move(style));
@@ -470,91 +409,6 @@ RenderElement* SVGUseElement::rendererClipChild() const
     return element->renderer();
 }
 
-void SVGUseElement::buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstance, bool& foundProblem, bool foundUse)
-{
-    ASSERT(target);
-    ASSERT(targetInstance);
-
-    // Spec: If the referenced object is itself a 'use', or if there are 'use' subelements within the referenced
-    // object, the instance tree will contain recursive expansion of the indirect references to form a complete tree.
-    bool targetHasUseTag = target->hasTagName(SVGNames::useTag);
-    SVGElement* newTarget = nullptr;
-    if (targetHasUseTag) {
-        foundProblem = hasCycleUseReferencing(downcast<SVGUseElement>(target), targetInstance, newTarget);
-        if (foundProblem)
-            return;
-
-        // We only need to track first degree <use> dependencies. Indirect references are handled
-        // as the invalidation bubbles up the dependency chain.
-        if (!foundUse) {
-            document().accessSVGExtensions().addElementReferencingTarget(this, target);
-            foundUse = true;
-        }
-    } else if (isDisallowedElement(*target)) {
-        foundProblem = true;
-        return;
-    }
-
-    // A general description from the SVG spec, describing what buildInstanceTree() actually does.
-    //
-    // Spec: If the 'use' element references a 'g' which contains two 'rect' elements, then the instance tree
-    // contains three SVGElementInstance objects, a root SVGElementInstance object whose correspondingElement
-    // is the SVGGElement object for the 'g', and then two child SVGElementInstance objects, each of which has
-    // its correspondingElement that is an SVGRectElement object.
-
-    for (auto& element : childrenOfType<SVGElement>(*target)) {
-        // Skip any non-svg nodes or any disallowed element.
-        if (isDisallowedElement(element))
-            continue;
-
-        // Create SVGElementInstance object, for both container/non-container nodes.
-        RefPtr<SVGElementInstance> instance = SVGElementInstance::create(this, 0, &element);
-        SVGElementInstance* instancePtr = instance.get();
-        targetInstance->appendChild(instance.release());
-
-        // Enter recursion, appending new instance tree nodes to the "instance" object.
-        buildInstanceTree(&element, instancePtr, foundProblem, foundUse);
-        if (foundProblem)
-            return;
-    }
-
-    if (!targetHasUseTag || !newTarget)
-        return;
-
-    RefPtr<SVGElementInstance> newInstance = SVGElementInstance::create(this, downcast<SVGUseElement>(target), newTarget);
-    SVGElementInstance* newInstancePtr = newInstance.get();
-    targetInstance->appendChild(newInstance.release());
-    buildInstanceTree(newTarget, newInstancePtr, foundProblem, foundUse);
-}
-
-bool SVGUseElement::hasCycleUseReferencing(SVGUseElement* use, SVGElementInstance* targetInstance, SVGElement*& newTarget)
-{
-    ASSERT(referencedDocument());
-    Element* targetElement = SVGURIReference::targetElementFromIRIString(use->href(), *referencedDocument());
-    newTarget = nullptr;
-    if (targetElement && targetElement->isSVGElement())
-        newTarget = downcast<SVGElement>(targetElement);
-
-    if (!newTarget)
-        return false;
-
-    // Shortcut for self-references
-    if (newTarget == this)
-        return true;
-
-    AtomicString targetId = newTarget->getIdAttribute();
-    SVGElementInstance* instance = targetInstance->parentNode();
-    while (instance) {
-        SVGElement* element = instance->correspondingElement();
-
-        if (element->hasID() && element->getIdAttribute() == targetId && &element->document() == &newTarget->document())
-            return true;
-
-        instance = instance->parentNode();
-    }
-    return false;
-}
-
 static void removeDisallowedElementsFromSubtree(SVGElement& subtree)
 {
     // Remove disallowed elements after the fact rather than not cloning them in the first place.
@@ -580,19 +434,73 @@ static void removeDisallowedElementsFromSubtree(SVGElement& subtree)
         element->parentNode()->removeChild(element);
 }
 
+static void associateClonesWithOriginals(SVGElement& clone, SVGElement& original)
+{
+    // This assertion checks that we don't call this with the arguments backwards.
+    // The clone is new and so it's not installed in a parent yet.
+    ASSERT(!clone.parentNode());
+
+    // The loop below works because we are associating these clones immediately, before
+    // doing transformations like removing disallowed elements or expanding elements.
+    clone.setCorrespondingElement(&original);
+    for (auto pair : descendantsOfType<SVGElement>(clone, original))
+        pair.first.setCorrespondingElement(&pair.second);
+}
+
+static void associateReplacementCloneWithOriginal(SVGElement& replacementClone, SVGElement& originalClone)
+{
+    SVGElement* correspondingElement = originalClone.correspondingElement();
+    ASSERT(correspondingElement);
+    originalClone.setCorrespondingElement(nullptr);
+    replacementClone.setCorrespondingElement(correspondingElement);
+}
+
+static void associateReplacementClonesWithOriginals(SVGElement& replacementClone, SVGElement& originalClone)
+{
+    // This assertion checks that we don't call this with the arguments backwards.
+    // The replacement clone is new and so it's not installed in a parent yet.
+    ASSERT(!replacementClone.parentNode());
+
+    // The loop below works because we are associating these clones immediately, before
+    // doing transformations like removing disallowed elements or expanding elements.
+    associateReplacementCloneWithOriginal(replacementClone, originalClone);
+    for (auto pair : descendantsOfType<SVGElement>(replacementClone, originalClone))
+        associateReplacementCloneWithOriginal(pair.first, pair.second);
+}
+
 void SVGUseElement::buildShadowTree(SVGElement& target)
 {
     Ref<SVGElement> clonedTarget = static_pointer_cast<SVGElement>(target.cloneElementWithChildren(document())).releaseNonNull();
+    associateClonesWithOriginals(clonedTarget.get(), target);
     removeDisallowedElementsFromSubtree(clonedTarget.get());
     ensureUserAgentShadowRoot().appendChild(WTF::move(clonedTarget));
 }
 
+bool SVGUseElement::isValidTarget(Element* target) const
+{
+    if (!is<SVGElement>(target))
+        return false;
+    if (!target->inDocument())
+        return false;
+    SVGElement& castedTarget = downcast<SVGElement>(*target);
+    if (&castedTarget == this)
+        return false;
+    if (isDisallowedElement(castedTarget))
+        return false;
+    // Reject any target that would create a cycle.
+    for (auto& ancestor : lineageOfType<SVGElement>(*this)) {
+        if (ancestor.correspondingElement() == &castedTarget)
+            return false;
+    }
+    return true;
+}
+
 void SVGUseElement::expandUseElementsInShadowTree()
 {
-    // Why expand the <use> elements in the shadow tree here, and not just
-    // do this directly in buildShadowTree, as we encounter each <use> element?
-    // Because we might miss expanding some elements if we did it then. If a <symbol>
-    // contained <use> elements, we'd miss those.
+    // FIXME: Combine this with buildShadowTree.
+
+    if (cachedDocumentIsStillLoading())
+        return;
 
     auto descendants = descendantsOfType<SVGUseElement>(*userAgentShadowRoot());
     auto end = descendants.end();
@@ -600,7 +508,8 @@ void SVGUseElement::expandUseElementsInShadowTree()
         Ref<SVGUseElement> original = *it;
         it = end; // Efficiently quiets assertions due to the outstanding iterator.
 
-        ASSERT(!original->cachedDocumentIsStillLoading());
+        if (original->cachedDocumentIsStillLoading())
+            return;
 
         // Spec: In the generated content, the 'use' will be replaced by 'g', where all attributes from the
         // 'use' element except for x, y, width, height and xlink:href are transferred to the generated 'g' element.
@@ -610,19 +519,16 @@ void SVGUseElement::expandUseElementsInShadowTree()
         // different document?
         ASSERT(referencedDocument());
         auto replacement = SVGGElement::create(SVGNames::gTag, *referencedDocument());
-
         original->transferAttributesToShadowTreeReplacement(replacement.get());
         original->cloneChildNodes(replacement.ptr());
+        associateReplacementClonesWithOriginals(replacement.get(), original.get());
 
         RefPtr<SVGElement> clonedTarget;
         Element* targetCandidate = SVGURIReference::targetElementFromIRIString(original->href(), *referencedDocument());
-        if (is<SVGElement>(targetCandidate) && !isDisallowedElement(downcast<SVGElement>(*targetCandidate))) {
+        if (original->isValidTarget(targetCandidate)) {
             SVGElement& originalTarget = downcast<SVGElement>(*targetCandidate);
             clonedTarget = static_pointer_cast<SVGElement>(originalTarget.cloneElementWithChildren(document()));
-            // Set the corresponding element here so transferSizeAttributesToShadowTreeTargetClone
-            // can use it. It will be set again later in associateInstancesWithShadowTreeElements,
-            // but it does no harm to set it twice.
-            clonedTarget->setCorrespondingElement(&originalTarget);
+            associateClonesWithOriginals(*clonedTarget, originalTarget);
             replacement->appendChild(clonedTarget);
         }
 
@@ -663,6 +569,8 @@ void SVGUseElement::expandSymbolElementsInShadowTree()
         auto replacement = SVGSVGElement::create(SVGNames::svgTag, *referencedDocument());
         replacement->cloneDataFromElement(original);
         original.cloneChildNodes(replacement.ptr());
+        associateReplacementClonesWithOriginals(replacement.get(), original);
+
         removeDisallowedElementsFromSubtree(replacement.get());
 
         // Replace <symbol> with the <svg> element we created.
@@ -683,75 +591,6 @@ void SVGUseElement::transferEventListenersToShadowTree()
     }
 }
 
-void SVGUseElement::associateInstancesWithShadowTreeElements(Node* target, SVGElementInstance* targetInstance)
-{
-    if (!target || !targetInstance)
-        return;
-
-    SVGElement* originalElement = targetInstance->correspondingElement();
-
-    if (originalElement->hasTagName(SVGNames::useTag)) {
-        // <use> gets replaced by <g>
-        ASSERT(target->nodeName() == SVGNames::gTag);
-    } else if (originalElement->hasTagName(SVGNames::symbolTag)) {
-        // <symbol> gets replaced by <svg>
-        ASSERT(target->nodeName() == SVGNames::svgTag);
-    } else
-        ASSERT(target->nodeName() == originalElement->nodeName());
-
-    SVGElement* element = nullptr;
-    if (target->isSVGElement())
-        element = downcast<SVGElement>(target);
-
-    ASSERT(!targetInstance->shadowTreeElement());
-    targetInstance->setShadowTreeElement(element);
-    element->setCorrespondingElement(originalElement);
-
-    Node* node = target->firstChild();
-    for (SVGElementInstance* instance = targetInstance->firstChild(); node && instance; instance = instance->nextSibling()) {
-        // Skip any non-svg elements in shadow tree
-        while (node && !node->isSVGElement())
-           node = node->nextSibling();
-
-        if (!node)
-            break;
-
-        associateInstancesWithShadowTreeElements(node, instance);
-        node = node->nextSibling();
-    }
-}
-
-SVGElementInstance* SVGUseElement::instanceForShadowTreeElement(Node* element) const
-{
-    if (!m_targetElementInstance) {
-        ASSERT(!inDocument());
-        return 0;
-    }
-
-    return instanceForShadowTreeElement(element, m_targetElementInstance.get());
-}
-
-SVGElementInstance* SVGUseElement::instanceForShadowTreeElement(Node* element, SVGElementInstance* instance) const
-{
-    ASSERT(element);
-    ASSERT(instance);
-
-    // We're dispatching a mutation event during shadow tree construction
-    // this instance hasn't yet been associated to a shadowTree element.
-    if (!instance->shadowTreeElement())
-        return 0;
-
-    if (element == instance->shadowTreeElement())
-        return instance;
-
-    for (SVGElementInstance* current = instance->firstChild(); current; current = current->nextSibling()) {
-        if (SVGElementInstance* search = instanceForShadowTreeElement(element, current))
-            return search;
-    }
-
-    return 0;
-}
-
 void SVGUseElement::invalidateShadowTree()
 {
     if (m_needsShadowTreeRecreation)
@@ -763,7 +602,6 @@ void SVGUseElement::invalidateShadowTree()
 
 void SVGUseElement::invalidateDependentShadowTrees()
 {
-    // Recursively invalidate dependent <use> shadow trees
     for (auto* instance : instances()) {
         if (SVGUseElement* element = instance->correspondingUseElement()) {
             ASSERT(element->inDocument());
index 75e7f38..2716279 100644 (file)
@@ -34,7 +34,6 @@
 namespace WebCore {
 
 class CachedSVGDocument;
-class SVGElementInstance;
 class SVGGElement;
 
 class SVGUseElement final : public SVGGraphicsElement,
@@ -45,7 +44,6 @@ public:
     static Ref<SVGUseElement> create(const QualifiedName&, Document&, bool wasInsertedByParser);
     virtual ~SVGUseElement();
 
-    SVGElementInstance* instanceForShadowTreeElement(Node*) const;
     void invalidateShadowTree();
     void invalidateDependentShadowTrees();
 
@@ -73,18 +71,12 @@ private:
     virtual void toClipPath(Path&) override;
 
     void clearResourceReferences();
-    void buildShadowAndInstanceTree(SVGElement& target);
-    void detachInstance();
 
     virtual bool haveLoadedRequiredResources() override { return SVGExternalResourcesRequired::haveLoadedRequiredResources(); }
 
     virtual void finishParsingChildren() override;
     virtual bool selfHasRelativeLengths() const override;
 
-    // Instance tree handling
-    void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstance, bool& foundCycle, bool foundUse);
-    bool hasCycleUseReferencing(SVGUseElement*, SVGElementInstance* targetInstance, SVGElement*& newTarget);
-
     // Shadow tree handling.
     void buildShadowTree(SVGElement& target);
     void expandUseElementsInShadowTree();
@@ -93,10 +85,7 @@ private:
     void transferEventListenersToShadowTree();
     void transferAttributesToShadowTreeReplacement(SVGGElement&) const;
     void transferSizeAttributesToShadowTreeTargetClone(SVGElement&) const;
-
-    // "Tree connector" 
-    void associateInstancesWithShadowTreeElements(Node* target, SVGElementInstance* targetInstance);
-    SVGElementInstance* instanceForShadowTreeElement(Node* element, SVGElementInstance* instance) const;
+    bool isValidTarget(Element*) const;
 
     BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGUseElement)
         DECLARE_ANIMATED_LENGTH(X, x)
@@ -123,7 +112,6 @@ private:
     bool m_wasInsertedByParser;
     bool m_haveFiredLoadEvent;
     bool m_needsShadowTreeRecreation;
-    RefPtr<SVGElementInstance> m_targetElementInstance;
     CachedResourceHandle<CachedSVGDocument> m_cachedDocument;
     Timer m_svgLoadEventTimer;
 };