[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
eric at webkit.org
eric at webkit.org
Thu Oct 29 20:48:26 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 5dc5d9bba6d0de14682bd5b4aff3f58ce136ec9e
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 20 03:19:22 2009 +0000
2009-10-19 Robin Qiu <robin.qiu at torchmobile.com.cn>
Reviewed by Nikolas Zimmermann.
Add a layout test for nested SVG <use> element which has a child.
https://bugs.webkit.org/show_bug.cgi?id=26117
* svg/custom/use-on-use-with-child-expected.txt: Added.
* svg/custom/use-on-use-with-child.svg: Added.
2009-10-19 Robin Qiu <robin.qiu at torchmobile.com.cn>
Reviewed by Nikolas Zimmermann.
Fixed a bug on nested SVG <use> elements.
https://bugs.webkit.org/show_bug.cgi?id=26117
When a <use> element refer to another <use> element which has
child/children, the instance tree built for this <use> element
is incorrect (more nodes than expected).
Test: svg/dom/use-on-use-with-child.svg
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::buildInstanceTree):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7569130..96c4cee 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2009-10-19 Robin Qiu <robin.qiu at torchmobile.com.cn>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Add a layout test for nested SVG <use> element which has a child.
+ https://bugs.webkit.org/show_bug.cgi?id=26117
+
+ * svg/custom/use-on-use-with-child-expected.txt: Added.
+ * svg/custom/use-on-use-with-child.svg: Added.
+
2009-10-19 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Adam Barth.
diff --git a/LayoutTests/svg/custom/use-on-use-with-child-expected.txt b/LayoutTests/svg/custom/use-on-use-with-child-expected.txt
new file mode 100644
index 0000000..ee7ec66
--- /dev/null
+++ b/LayoutTests/svg/custom/use-on-use-with-child-expected.txt
@@ -0,0 +1,6 @@
+The instance tree of use element zoomplus:
+
+ id = loupePlus this = [object SVGElementInstance] correspondingElement = [object SVGGElement]
+ id = useRim this = [object SVGElementInstance] correspondingElement = [object SVGUseElement]
+ id = rim this = [object SVGElementInstance] correspondingElement = [object SVGCircleElement]
+
diff --git a/LayoutTests/svg/custom/use-on-use-with-child.svg b/LayoutTests/svg/custom/use-on-use-with-child.svg
new file mode 100644
index 0000000..9c2b0cb
--- /dev/null
+++ b/LayoutTests/svg/custom/use-on-use-with-child.svg
@@ -0,0 +1,51 @@
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <title id="viewer_title">Mouse Over the Red Dot And Wait For the Crash</title>
+ <defs>
+ <circle id="rim" cx="0" cy="0" r="70"/>
+ <g id="loupePlus">
+ <use id="useRim" xlink:href="#rim" fill="#e33c31">
+ <set />
+ </use>
+ </g>
+ </defs>
+
+ <use id="zoomplus" xlink:href="#loupePlus" x="300" y="300" >
+ </use>
+ <foreignObject><pre id="console" xmlns="http://www.w3.org/1999/xhtml"/></foreignObject>
+ <script>
+ function makeCrash(){
+ if (window.eventSender) {
+ eventSender.dragMode = false;
+ eventSender.mouseMoveTo(300, 300);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ }
+ }
+ // If you like, you can make a crash.
+ // makeCrash();
+
+ var console = document.getElementById("console");
+ function println(string)
+ {
+ console.textContent += string + '\n';
+ }
+
+ function printInstanceTree( obj, indent )
+ {
+ indent += " ";
+ println(indent + "id = " + obj.correspondingElement.id + " this = " + obj + " correspondingElement = " + obj.correspondingElement);
+ for (var m = obj.firstChild; m != null; m = m.nextSibling ) {
+ printInstanceTree(m, indent);
+ }
+ }
+ var useobj = document.getElementById("zoomplus").instanceRoot;
+ println("The instance tree of use element zoomplus:\n");
+ printInstanceTree(useobj,"");
+
+ if (window.layoutTestController){
+ layoutTestController.dumpAsText();
+ }
+
+ </script>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ecca95e..e67ae4e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-10-19 Robin Qiu <robin.qiu at torchmobile.com.cn>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Fixed a bug on nested SVG <use> elements.
+ https://bugs.webkit.org/show_bug.cgi?id=26117
+ When a <use> element refer to another <use> element which has
+ child/children, the instance tree built for this <use> element
+ is incorrect (more nodes than expected).
+
+ Test: svg/dom/use-on-use-with-child.svg
+
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::buildInstanceTree):
+
2009-10-19 Oliver Hunt <oliver at apple.com>
Small changes to fully invalidate and update the JavaScriptCallFrame.
diff --git a/WebCore/svg/SVGUseElement.cpp b/WebCore/svg/SVGUseElement.cpp
index c8b8f9c..42517bd 100644
--- a/WebCore/svg/SVGUseElement.cpp
+++ b/WebCore/svg/SVGUseElement.cpp
@@ -484,13 +484,7 @@ void SVGUseElement::buildInstanceTree(SVGElement* target, SVGElementInstance* ta
targetInstance->appendChild(instancePtr.get());
// Enter recursion, appending new instance tree nodes to the "instance" object.
- if (element->hasChildNodes())
- buildInstanceTree(element, instancePtr.get(), foundProblem);
-
- // 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.
- if (element->hasTagName(SVGNames::useTag))
- handleDeepUseReferencing(static_cast<SVGUseElement*>(element), instancePtr.get(), foundProblem);
+ buildInstanceTree(element, instancePtr.get(), foundProblem);
}
// Spec: If the referenced object is itself a 'use', or if there are 'use' subelements within the referenced
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list