Reviewed by Oliver.
authorzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Apr 2008 12:55:03 +0000 (12:55 +0000)
committerzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Apr 2008 12:55:03 +0000 (12:55 +0000)
Fixes: http://bugs.webkit.org/show_bug.cgi?id=17779 (SVG 1.1 Errata demands "SVG JavaScript Liveness" support)

SVG Errata states: "All SVG DOM objects that directly correspond to an
attribute, e.g. the SVGAnimatedLength 'ry' in an SVGRectElement, are live. This
means that any changes made to the attribute are immediately reflected in the
corresponding SVG DOM object." (see linked URL on bug report)

Until now only XML -> SVG DOM changes took affect, aka. changing the 'rx' attribute of a <rect>
element resuted in changes when accessing 'rx' through SVG DOM (rx.baseVal.value).

Add a new synchronization layer to handle SVG DOM -> XML changes.

Added Test: svg/custom/svg-xml-dom-sync.html

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

242 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac-leopard/svg/W3C-SVG-1.1/fonts-glyph-04-t-expected.checksum
LayoutTests/platform/mac-leopard/svg/W3C-SVG-1.1/fonts-glyph-04-t-expected.png
LayoutTests/platform/mac-leopard/svg/W3C-SVG-1.1/text-text-06-t-expected.checksum
LayoutTests/platform/mac-leopard/svg/W3C-SVG-1.1/text-text-06-t-expected.png
LayoutTests/platform/mac-leopard/svg/custom/marker-getPropertyValue-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac-leopard/svg/custom/marker-getPropertyValue-expected.png [new file with mode: 0644]
LayoutTests/platform/mac-leopard/svg/custom/svg-xml-dom-sync-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac-leopard/svg/custom/svg-xml-dom-sync-expected.png [new file with mode: 0644]
LayoutTests/platform/mac-leopard/svg/custom/text-xy-updates-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac-leopard/svg/custom/text-xy-updates-expected.png [new file with mode: 0644]
LayoutTests/platform/mac-leopard/svg/dom/altGlyph-dom-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac-leopard/svg/dom/altGlyph-dom-expected.png [new file with mode: 0644]
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-cx-attr-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-cx-attr-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-cy-attr-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-cy-attr-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-rx-attr-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-rx-attr-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-ry-attr-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-ry-attr-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-cx-prop-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-cx-prop-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-cy-prop-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-cy-prop-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-rx-prop-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-rx-prop-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-ry-prop-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-ry-prop-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-dom-width-attr-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-dom-width-attr-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-svgdom-height-prop-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-svgdom-height-prop-expected.png
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-svgdom-width-prop-expected.checksum
LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-svgdom-width-prop-expected.png
LayoutTests/platform/mac-leopard/svg/text/kerning-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac-leopard/svg/text/kerning-expected.png [new file with mode: 0644]
LayoutTests/platform/mac-leopard/svg/text/multichar-glyph-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac-leopard/svg/text/multichar-glyph-expected.png [new file with mode: 0644]
LayoutTests/platform/mac-leopard/svg/text/text-text-06-t-expected.checksum
LayoutTests/platform/mac-leopard/svg/text/text-text-06-t-expected.png
LayoutTests/svg/custom/resources/svg-xml-dom-sync.js [new file with mode: 0644]
LayoutTests/svg/custom/svg-xml-dom-sync-expected.txt [new file with mode: 0644]
LayoutTests/svg/custom/svg-xml-dom-sync.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGAElement-dom-href-attr.html
LayoutTests/svg/dynamic-updates/SVGAElement-dom-target-attr.html
LayoutTests/svg/dynamic-updates/SVGAElement-svgdom-href-prop.html
LayoutTests/svg/dynamic-updates/SVGAElement-svgdom-target-prop.html
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.txt
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cx-attr.html
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.txt
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-cy-attr.html
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.txt
LayoutTests/svg/dynamic-updates/SVGCircleElement-dom-r-attr.html
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.txt
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop.html
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.txt
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop.html
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.txt
LayoutTests/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop.html
LayoutTests/svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html
LayoutTests/svg/dynamic-updates/SVGClipPathElement-svgdom-clipPathUnits-prop.html
LayoutTests/svg/dynamic-updates/SVGEllipseElement-dom-cx-attr-expected.txt
LayoutTests/svg/dynamic-updates/SVGEllipseElement-dom-cx-attr.html
LayoutTests/svg/dynamic-updates/SVGEllipseElement-dom-cy-attr-expected.txt
LayoutTests/svg/dynamic-updates/SVGEllipseElement-dom-cy-attr.html
LayoutTests/svg/dynamic-updates/SVGEllipseElement-dom-rx-attr-expected.txt
LayoutTests/svg/dynamic-updates/SVGEllipseElement-dom-rx-attr.html
LayoutTests/svg/dynamic-updates/SVGEllipseElement-dom-ry-attr-expected.txt
LayoutTests/svg/dynamic-updates/SVGEllipseElement-dom-ry-attr.html
LayoutTests/svg/dynamic-updates/SVGEllipseElement-svgdom-cx-prop-expected.txt
LayoutTests/svg/dynamic-updates/SVGEllipseElement-svgdom-cx-prop.html
LayoutTests/svg/dynamic-updates/SVGEllipseElement-svgdom-cy-prop-expected.txt
LayoutTests/svg/dynamic-updates/SVGEllipseElement-svgdom-cy-prop.html
LayoutTests/svg/dynamic-updates/SVGEllipseElement-svgdom-rx-prop-expected.txt
LayoutTests/svg/dynamic-updates/SVGEllipseElement-svgdom-rx-prop.html
LayoutTests/svg/dynamic-updates/SVGEllipseElement-svgdom-ry-prop-expected.txt
LayoutTests/svg/dynamic-updates/SVGEllipseElement-svgdom-ry-prop.html
LayoutTests/svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr-expected.txt
LayoutTests/svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr.html
LayoutTests/svg/dynamic-updates/SVGForeignObjectElement-dom-width-attr-expected.txt
LayoutTests/svg/dynamic-updates/SVGForeignObjectElement-dom-width-attr.html
LayoutTests/svg/dynamic-updates/SVGForeignObjectElement-dom-x-attr.html
LayoutTests/svg/dynamic-updates/SVGForeignObjectElement-dom-y-attr.html
LayoutTests/svg/dynamic-updates/SVGForeignObjectElement-svgdom-height-prop-expected.txt
LayoutTests/svg/dynamic-updates/SVGForeignObjectElement-svgdom-height-prop.html
LayoutTests/svg/dynamic-updates/SVGForeignObjectElement-svgdom-width-prop-expected.txt
LayoutTests/svg/dynamic-updates/SVGForeignObjectElement-svgdom-width-prop.html
LayoutTests/svg/dynamic-updates/SVGForeignObjectElement-svgdom-x-prop.html
LayoutTests/svg/dynamic-updates/SVGForeignObjectElement-svgdom-y-prop.html
LayoutTests/svg/dynamic-updates/resources/SVGAElement-dom-href-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGAElement-dom-target-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGAElement-svgdom-href-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGAElement-svgdom-target-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-dom-cx-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-dom-cy-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-dom-r-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-svgdom-cx-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-svgdom-cy-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGCircleElement-svgdom-r-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGClipPathElement-dom-clipPathUnits-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGClipPathElement-svgdom-clipPathUnits-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGEllipseElement-dom-cx-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGEllipseElement-dom-cy-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGEllipseElement-dom-rx-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGEllipseElement-dom-ry-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGEllipseElement-svgdom-cx-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGEllipseElement-svgdom-cy-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGEllipseElement-svgdom-rx-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGEllipseElement-svgdom-ry-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGForeignObjectElement-dom-height-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGForeignObjectElement-dom-width-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGForeignObjectElement-dom-x-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGForeignObjectElement-dom-y-attr.js
LayoutTests/svg/dynamic-updates/resources/SVGForeignObjectElement-svgdom-height-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGForeignObjectElement-svgdom-width-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGForeignObjectElement-svgdom-x-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGForeignObjectElement-svgdom-y-prop.js
LayoutTests/svg/dynamic-updates/resources/SVGTestCase.js
LayoutTests/svg/dynamic-updates/resources/TEMPLATE.html
WebCore/ChangeLog
WebCore/dom/Element.h
WebCore/dom/NamedAttrMap.h
WebCore/rendering/SVGRootInlineBox.cpp
WebCore/svg/SVGAElement.h
WebCore/svg/SVGAltGlyphElement.h
WebCore/svg/SVGAnimateColorElement.h
WebCore/svg/SVGAnimateElement.h
WebCore/svg/SVGAnimateMotionElement.h
WebCore/svg/SVGAnimateTransformElement.h
WebCore/svg/SVGAnimatedTemplate.h
WebCore/svg/SVGAnimationElement.h
WebCore/svg/SVGCircleElement.h
WebCore/svg/SVGClipPathElement.h
WebCore/svg/SVGComponentTransferFunctionElement.cpp
WebCore/svg/SVGComponentTransferFunctionElement.h
WebCore/svg/SVGCursorElement.cpp
WebCore/svg/SVGCursorElement.h
WebCore/svg/SVGDefsElement.h
WebCore/svg/SVGElement.cpp
WebCore/svg/SVGElement.h
WebCore/svg/SVGEllipseElement.cpp
WebCore/svg/SVGEllipseElement.h
WebCore/svg/SVGExternalResourcesRequired.h
WebCore/svg/SVGFEBlendElement.h
WebCore/svg/SVGFEColorMatrixElement.cpp
WebCore/svg/SVGFEColorMatrixElement.h
WebCore/svg/SVGFEComponentTransferElement.h
WebCore/svg/SVGFECompositeElement.h
WebCore/svg/SVGFEDiffuseLightingElement.h
WebCore/svg/SVGFEDisplacementMapElement.h
WebCore/svg/SVGFEFloodElement.h
WebCore/svg/SVGFEGaussianBlurElement.h
WebCore/svg/SVGFEImageElement.cpp
WebCore/svg/SVGFEImageElement.h
WebCore/svg/SVGFELightElement.h
WebCore/svg/SVGFEMergeElement.h
WebCore/svg/SVGFEMergeNodeElement.h
WebCore/svg/SVGFEOffsetElement.h
WebCore/svg/SVGFESpecularLightingElement.h
WebCore/svg/SVGFETileElement.h
WebCore/svg/SVGFETurbulenceElement.h
WebCore/svg/SVGFilterElement.cpp
WebCore/svg/SVGFilterElement.h
WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
WebCore/svg/SVGFitToViewBox.cpp
WebCore/svg/SVGFitToViewBox.h
WebCore/svg/SVGFontElement.h
WebCore/svg/SVGForeignObjectElement.cpp
WebCore/svg/SVGForeignObjectElement.h
WebCore/svg/SVGGElement.h
WebCore/svg/SVGGradientElement.cpp
WebCore/svg/SVGGradientElement.h
WebCore/svg/SVGImageElement.cpp
WebCore/svg/SVGImageElement.h
WebCore/svg/SVGLength.cpp
WebCore/svg/SVGLength.h
WebCore/svg/SVGLengthList.cpp
WebCore/svg/SVGLengthList.h
WebCore/svg/SVGLineElement.cpp
WebCore/svg/SVGLineElement.h
WebCore/svg/SVGLinearGradientElement.cpp
WebCore/svg/SVGLinearGradientElement.h
WebCore/svg/SVGMPathElement.h
WebCore/svg/SVGMarkerElement.cpp
WebCore/svg/SVGMarkerElement.h
WebCore/svg/SVGMaskElement.cpp
WebCore/svg/SVGMaskElement.h
WebCore/svg/SVGNumberList.cpp
WebCore/svg/SVGNumberList.h
WebCore/svg/SVGPathElement.h
WebCore/svg/SVGPatternElement.cpp
WebCore/svg/SVGPatternElement.h
WebCore/svg/SVGPolyElement.h
WebCore/svg/SVGPreserveAspectRatio.cpp
WebCore/svg/SVGPreserveAspectRatio.h
WebCore/svg/SVGRadialGradientElement.cpp
WebCore/svg/SVGRadialGradientElement.h
WebCore/svg/SVGRectElement.cpp
WebCore/svg/SVGRectElement.h
WebCore/svg/SVGSVGElement.cpp
WebCore/svg/SVGSVGElement.h
WebCore/svg/SVGScriptElement.h
WebCore/svg/SVGSetElement.h
WebCore/svg/SVGStyledElement.h
WebCore/svg/SVGStyledTransformableElement.cpp
WebCore/svg/SVGStyledTransformableElement.h
WebCore/svg/SVGSwitchElement.h
WebCore/svg/SVGSymbolElement.h
WebCore/svg/SVGTRefElement.h
WebCore/svg/SVGTSpanElement.h
WebCore/svg/SVGTextContentElement.cpp
WebCore/svg/SVGTextContentElement.h
WebCore/svg/SVGTextElement.cpp
WebCore/svg/SVGTextElement.h
WebCore/svg/SVGTextPathElement.cpp
WebCore/svg/SVGTextPathElement.h
WebCore/svg/SVGTextPositioningElement.cpp
WebCore/svg/SVGTextPositioningElement.h
WebCore/svg/SVGTransformList.cpp
WebCore/svg/SVGTransformList.h
WebCore/svg/SVGURIReference.h
WebCore/svg/SVGUseElement.cpp
WebCore/svg/SVGUseElement.h
WebCore/svg/SVGViewElement.h
WebCore/svg/SVGViewSpec.cpp
WebCore/svg/SVGViewSpec.h

index 6ecdb1d..0e29ffc 100644 (file)
@@ -1,3 +1,146 @@
+2008-04-02  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed by Oliver.
+
+        Fix all existing tests in svg/dynamic-updates to actually reflect repainting changes, by
+        removing the timing dependency. Instead model them like frame-getSVGDocument.html by
+        not including the <script src="js-test-post.js"> element within the TEMPLATE.html but
+        by dynamically injecting it, if the test actually finished.
+
+        * platform/mac-leopard/svg/W3C-SVG-1.1/fonts-glyph-04-t-expected.checksum:
+        * platform/mac-leopard/svg/W3C-SVG-1.1/fonts-glyph-04-t-expected.png:
+        * platform/mac-leopard/svg/W3C-SVG-1.1/text-text-06-t-expected.checksum:
+        * platform/mac-leopard/svg/W3C-SVG-1.1/text-text-06-t-expected.png:
+        * platform/mac-leopard/svg/custom/marker-getPropertyValue-expected.checksum: Added.
+        * platform/mac-leopard/svg/custom/marker-getPropertyValue-expected.png: Added.
+        * platform/mac-leopard/svg/custom/svg-xml-dom-sync-expected.checksum: Added.
+        * platform/mac-leopard/svg/custom/svg-xml-dom-sync-expected.png: Added.
+        * platform/mac-leopard/svg/custom/text-xy-updates-expected.checksum: Added.
+        * platform/mac-leopard/svg/custom/text-xy-updates-expected.png: Added.
+        * platform/mac-leopard/svg/dom/altGlyph-dom-expected.checksum: Added.
+        * platform/mac-leopard/svg/dom/altGlyph-dom-expected.png: Added.
+        * platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-cx-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-cx-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-cy-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-cy-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-rx-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-rx-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-ry-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-ry-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-cx-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-cx-prop-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-cy-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-cy-prop-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-rx-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-rx-prop-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-ry-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-ry-prop-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-dom-width-attr-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-dom-width-attr-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-svgdom-height-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-svgdom-height-prop-expected.png:
+        * platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-svgdom-width-prop-expected.checksum:
+        * platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-svgdom-width-prop-expected.png:
+        * platform/mac-leopard/svg/text/kerning-expected.checksum: Added.
+        * platform/mac-leopard/svg/text/kerning-expected.png: Added.
+        * platform/mac-leopard/svg/text/multichar-glyph-expected.checksum: Added.
+        * platform/mac-leopard/svg/text/multichar-glyph-expected.png: Added.
+        * platform/mac-leopard/svg/text/text-text-06-t-expected.checksum:
+        * platform/mac-leopard/svg/text/text-text-06-t-expected.png:
+        * svg/custom/resources/svg-xml-dom-sync.js: Added.
+        * svg/custom/svg-xml-dom-sync-expected.txt: Added.
+        * svg/custom/svg-xml-dom-sync.html: Added.
+        * svg/dynamic-updates/SVGAElement-dom-href-attr.html:
+        * svg/dynamic-updates/SVGAElement-dom-target-attr.html:
+        * svg/dynamic-updates/SVGAElement-svgdom-href-prop.html:
+        * svg/dynamic-updates/SVGAElement-svgdom-target-prop.html:
+        * svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.txt:
+        * svg/dynamic-updates/SVGCircleElement-dom-cx-attr.html:
+        * svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.txt:
+        * svg/dynamic-updates/SVGCircleElement-dom-cy-attr.html:
+        * svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.txt:
+        * svg/dynamic-updates/SVGCircleElement-dom-r-attr.html:
+        * svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.txt:
+        * svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop.html:
+        * svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.txt:
+        * svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop.html:
+        * svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.txt:
+        * svg/dynamic-updates/SVGCircleElement-svgdom-r-prop.html:
+        * svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html:
+        * svg/dynamic-updates/SVGClipPathElement-svgdom-clipPathUnits-prop.html:
+        * svg/dynamic-updates/SVGEllipseElement-dom-cx-attr-expected.txt:
+        * svg/dynamic-updates/SVGEllipseElement-dom-cx-attr.html:
+        * svg/dynamic-updates/SVGEllipseElement-dom-cy-attr-expected.txt:
+        * svg/dynamic-updates/SVGEllipseElement-dom-cy-attr.html:
+        * svg/dynamic-updates/SVGEllipseElement-dom-rx-attr-expected.txt:
+        * svg/dynamic-updates/SVGEllipseElement-dom-rx-attr.html:
+        * svg/dynamic-updates/SVGEllipseElement-dom-ry-attr-expected.txt:
+        * svg/dynamic-updates/SVGEllipseElement-dom-ry-attr.html:
+        * svg/dynamic-updates/SVGEllipseElement-svgdom-cx-prop-expected.txt:
+        * svg/dynamic-updates/SVGEllipseElement-svgdom-cx-prop.html:
+        * svg/dynamic-updates/SVGEllipseElement-svgdom-cy-prop-expected.txt:
+        * svg/dynamic-updates/SVGEllipseElement-svgdom-cy-prop.html:
+        * svg/dynamic-updates/SVGEllipseElement-svgdom-rx-prop-expected.txt:
+        * svg/dynamic-updates/SVGEllipseElement-svgdom-rx-prop.html:
+        * svg/dynamic-updates/SVGEllipseElement-svgdom-ry-prop-expected.txt:
+        * svg/dynamic-updates/SVGEllipseElement-svgdom-ry-prop.html:
+        * svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr-expected.txt:
+        * svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr.html:
+        * svg/dynamic-updates/SVGForeignObjectElement-dom-width-attr-expected.txt:
+        * svg/dynamic-updates/SVGForeignObjectElement-dom-width-attr.html:
+        * svg/dynamic-updates/SVGForeignObjectElement-dom-x-attr.html:
+        * svg/dynamic-updates/SVGForeignObjectElement-dom-y-attr.html:
+        * svg/dynamic-updates/SVGForeignObjectElement-svgdom-height-prop-expected.txt:
+        * svg/dynamic-updates/SVGForeignObjectElement-svgdom-height-prop.html:
+        * svg/dynamic-updates/SVGForeignObjectElement-svgdom-width-prop-expected.txt:
+        * svg/dynamic-updates/SVGForeignObjectElement-svgdom-width-prop.html:
+        * svg/dynamic-updates/SVGForeignObjectElement-svgdom-x-prop.html:
+        * svg/dynamic-updates/SVGForeignObjectElement-svgdom-y-prop.html:
+        * svg/dynamic-updates/resources/SVGAElement-dom-href-attr.js:
+        * svg/dynamic-updates/resources/SVGAElement-dom-target-attr.js:
+        * svg/dynamic-updates/resources/SVGAElement-svgdom-href-prop.js:
+        * svg/dynamic-updates/resources/SVGAElement-svgdom-target-prop.js:
+        * svg/dynamic-updates/resources/SVGCircleElement-dom-cx-attr.js:
+        * svg/dynamic-updates/resources/SVGCircleElement-dom-cy-attr.js:
+        * svg/dynamic-updates/resources/SVGCircleElement-dom-r-attr.js:
+        * svg/dynamic-updates/resources/SVGCircleElement-svgdom-cx-prop.js:
+        * svg/dynamic-updates/resources/SVGCircleElement-svgdom-cy-prop.js:
+        * svg/dynamic-updates/resources/SVGCircleElement-svgdom-r-prop.js:
+        * svg/dynamic-updates/resources/SVGClipPathElement-dom-clipPathUnits-attr.js:
+        * svg/dynamic-updates/resources/SVGClipPathElement-svgdom-clipPathUnits-prop.js:
+        * svg/dynamic-updates/resources/SVGEllipseElement-dom-cx-attr.js:
+        * svg/dynamic-updates/resources/SVGEllipseElement-dom-cy-attr.js:
+        * svg/dynamic-updates/resources/SVGEllipseElement-dom-rx-attr.js:
+        * svg/dynamic-updates/resources/SVGEllipseElement-dom-ry-attr.js:
+        * svg/dynamic-updates/resources/SVGEllipseElement-svgdom-cx-prop.js:
+        * svg/dynamic-updates/resources/SVGEllipseElement-svgdom-cy-prop.js:
+        * svg/dynamic-updates/resources/SVGEllipseElement-svgdom-rx-prop.js:
+        * svg/dynamic-updates/resources/SVGEllipseElement-svgdom-ry-prop.js:
+        * svg/dynamic-updates/resources/SVGForeignObjectElement-dom-height-attr.js:
+        * svg/dynamic-updates/resources/SVGForeignObjectElement-dom-width-attr.js:
+        * svg/dynamic-updates/resources/SVGForeignObjectElement-dom-x-attr.js:
+        * svg/dynamic-updates/resources/SVGForeignObjectElement-dom-y-attr.js:
+        * svg/dynamic-updates/resources/SVGForeignObjectElement-svgdom-height-prop.js:
+        * svg/dynamic-updates/resources/SVGForeignObjectElement-svgdom-width-prop.js:
+        * svg/dynamic-updates/resources/SVGForeignObjectElement-svgdom-x-prop.js:
+        * svg/dynamic-updates/resources/SVGForeignObjectElement-svgdom-y-prop.js:
+        * svg/dynamic-updates/resources/SVGTestCase.js:
+        * svg/dynamic-updates/resources/TEMPLATE.html:
+
 2008-03-25  Eric Seidel  <eric@webkit.org>
 
         Reviewed by darin.
index 2069f27..218c069 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/W3C-SVG-1.1/fonts-glyph-04-t-expected.png and b/LayoutTests/platform/mac-leopard/svg/W3C-SVG-1.1/fonts-glyph-04-t-expected.png differ
index c6d067f..2790114 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/W3C-SVG-1.1/text-text-06-t-expected.png and b/LayoutTests/platform/mac-leopard/svg/W3C-SVG-1.1/text-text-06-t-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/custom/marker-getPropertyValue-expected.checksum b/LayoutTests/platform/mac-leopard/svg/custom/marker-getPropertyValue-expected.checksum
new file mode 100644 (file)
index 0000000..02fb24c
--- /dev/null
@@ -0,0 +1 @@
+5f6832d43af886a4980fcad57bb1fb59
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/custom/marker-getPropertyValue-expected.png b/LayoutTests/platform/mac-leopard/svg/custom/marker-getPropertyValue-expected.png
new file mode 100644 (file)
index 0000000..5930238
Binary files /dev/null and b/LayoutTests/platform/mac-leopard/svg/custom/marker-getPropertyValue-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/custom/svg-xml-dom-sync-expected.checksum b/LayoutTests/platform/mac-leopard/svg/custom/svg-xml-dom-sync-expected.checksum
new file mode 100644 (file)
index 0000000..073b5b2
--- /dev/null
@@ -0,0 +1 @@
+2618d16bf325ac468218c8ffec1fbdc2
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/custom/svg-xml-dom-sync-expected.png b/LayoutTests/platform/mac-leopard/svg/custom/svg-xml-dom-sync-expected.png
new file mode 100644 (file)
index 0000000..1d83518
Binary files /dev/null and b/LayoutTests/platform/mac-leopard/svg/custom/svg-xml-dom-sync-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/custom/text-xy-updates-expected.checksum b/LayoutTests/platform/mac-leopard/svg/custom/text-xy-updates-expected.checksum
new file mode 100644 (file)
index 0000000..7862509
--- /dev/null
@@ -0,0 +1 @@
+25079a7dbd73870e844aeeba5c58600f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/custom/text-xy-updates-expected.png b/LayoutTests/platform/mac-leopard/svg/custom/text-xy-updates-expected.png
new file mode 100644 (file)
index 0000000..2f01e8d
Binary files /dev/null and b/LayoutTests/platform/mac-leopard/svg/custom/text-xy-updates-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/dom/altGlyph-dom-expected.checksum b/LayoutTests/platform/mac-leopard/svg/dom/altGlyph-dom-expected.checksum
new file mode 100644 (file)
index 0000000..0b3cd58
--- /dev/null
@@ -0,0 +1 @@
+d4b14df6e6634e79940fded33c49661c
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/dom/altGlyph-dom-expected.png b/LayoutTests/platform/mac-leopard/svg/dom/altGlyph-dom-expected.png
new file mode 100644 (file)
index 0000000..e33fc4a
Binary files /dev/null and b/LayoutTests/platform/mac-leopard/svg/dom/altGlyph-dom-expected.png differ
index b676046..e27b310 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-cx-attr-expected.png differ
index 4c522e5..420d45b 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-cy-attr-expected.png differ
index 8679bfd..520fa47 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-dom-r-attr-expected.png differ
index 4e46b32..33f1fe2 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-cx-prop-expected.png differ
index 60d5596..3923938 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-cy-prop-expected.png differ
index ed8f58f..8603dbe 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGCircleElement-svgdom-r-prop-expected.png differ
index 1952cba..9cfc76c 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-cx-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-cx-attr-expected.png differ
index fc73bb5..0047559 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-cy-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-cy-attr-expected.png differ
index bdb0d15..9be0398 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-rx-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-rx-attr-expected.png differ
index 89936a7..8b51c47 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-ry-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-dom-ry-attr-expected.png differ
index 235e71b..0367f87 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-cx-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-cx-prop-expected.png differ
index 3ff675a..92a244f 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-cy-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-cy-prop-expected.png differ
index c408943..784a5ce 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-rx-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-rx-prop-expected.png differ
index 5b072c2..b68a6c8 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-ry-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGEllipseElement-svgdom-ry-prop-expected.png differ
index bf1c996..b862622 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr-expected.png differ
index 8e90f05..bf10334 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-dom-width-attr-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-dom-width-attr-expected.png differ
index 3ba4e7b..b3c7b6b 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-svgdom-height-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-svgdom-height-prop-expected.png differ
index 81528f2..7428527 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-svgdom-width-prop-expected.png and b/LayoutTests/platform/mac-leopard/svg/dynamic-updates/SVGForeignObjectElement-svgdom-width-prop-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/text/kerning-expected.checksum b/LayoutTests/platform/mac-leopard/svg/text/kerning-expected.checksum
new file mode 100644 (file)
index 0000000..ca5a4f8
--- /dev/null
@@ -0,0 +1 @@
+eb117cda68116b7a8704766cf0a11571
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/text/kerning-expected.png b/LayoutTests/platform/mac-leopard/svg/text/kerning-expected.png
new file mode 100644 (file)
index 0000000..b8b0665
Binary files /dev/null and b/LayoutTests/platform/mac-leopard/svg/text/kerning-expected.png differ
diff --git a/LayoutTests/platform/mac-leopard/svg/text/multichar-glyph-expected.checksum b/LayoutTests/platform/mac-leopard/svg/text/multichar-glyph-expected.checksum
new file mode 100644 (file)
index 0000000..ee8a696
--- /dev/null
@@ -0,0 +1 @@
+3f70533f64c404e93d20b4931dba290f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac-leopard/svg/text/multichar-glyph-expected.png b/LayoutTests/platform/mac-leopard/svg/text/multichar-glyph-expected.png
new file mode 100644 (file)
index 0000000..b4ea418
Binary files /dev/null and b/LayoutTests/platform/mac-leopard/svg/text/multichar-glyph-expected.png differ
index 9f3a493..1d3fef0 100644 (file)
Binary files a/LayoutTests/platform/mac-leopard/svg/text/text-text-06-t-expected.png and b/LayoutTests/platform/mac-leopard/svg/text/text-text-06-t-expected.png differ
diff --git a/LayoutTests/svg/custom/resources/svg-xml-dom-sync.js b/LayoutTests/svg/custom/resources/svg-xml-dom-sync.js
new file mode 100644 (file)
index 0000000..6c17b35
--- /dev/null
@@ -0,0 +1,21 @@
+description("Tests whether changes to SVG through native objects and the DOM stay in sync.");
+
+var svgDoc = document.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null);
+var rect = svgDoc.createElementNS("http://www.w3.org/2000/svg", "rect");
+rect.setAttribute("x", 100);
+rect.setAttribute("y", 100);
+
+shouldBe("rect.x.baseVal.value", "100");
+shouldBe("rect.getAttribute('x')", "'100'");
+shouldBe("rect.y.baseVal.value", "100");
+shouldBe("rect.getAttribute('y')", "'100'");
+
+rect.x.baseVal.value = 200;
+rect.setAttribute("y", 200);
+
+shouldBe("rect.x.baseVal.value", "200");
+shouldBe("rect.getAttribute('x')", "'200'");
+shouldBe("rect.y.baseVal.value", "200");
+shouldBe("rect.getAttribute('y')", "'200'");
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/custom/svg-xml-dom-sync-expected.txt b/LayoutTests/svg/custom/svg-xml-dom-sync-expected.txt
new file mode 100644 (file)
index 0000000..080f11a
--- /dev/null
@@ -0,0 +1,17 @@
+Tests whether changes to SVG through native objects and the DOM stay in sync.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS rect.x.baseVal.value is 100
+PASS rect.getAttribute('x') is '100'
+PASS rect.y.baseVal.value is 100
+PASS rect.getAttribute('y') is '100'
+PASS rect.x.baseVal.value is 200
+PASS rect.getAttribute('x') is '200'
+PASS rect.y.baseVal.value is 200
+PASS rect.getAttribute('y') is '200'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/custom/svg-xml-dom-sync.html b/LayoutTests/svg/custom/svg-xml-dom-sync.html
new file mode 100644 (file)
index 0000000..97d15e1
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../LayoutTests/fast/js/resources/js-test-style.css">
+<script src="../../../LayoutTests/fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="resources/svg-xml-dom-sync.js"></script> 
+<script src="../../../LayoutTests/fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
index d73bdca..a58a347 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGAElement-dom-href-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 43053cb..1b684ef 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGAElement-dom-target-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 7a37ec3..1fc40ae 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGAElement-svgdom-href-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index cbc6ed9..e029958 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGAElement-svgdom-target-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index f2d0ab9..accb1f6 100644 (file)
@@ -5,7 +5,7 @@ Tests dynamic updates of the 'cx' attribute of the SVGCircleElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS circleElement.getAttribute('cx') is "-150"
+PASS circleElement.getAttribute('cx') is "-50"
 PASS circleElement.getAttribute('cx') is "150"
 PASS successfullyParsed is true
 
index 62717dc..ecaad94 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGCircleElement-dom-cx-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 575fb1e..4c397b2 100644 (file)
@@ -5,7 +5,7 @@ Tests dynamic updates of the 'cy' attribute of the SVGCircleElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS circleElement.getAttribute('cy') is "-150"
+PASS circleElement.getAttribute('cy') is "-50"
 PASS circleElement.getAttribute('cy') is "150"
 PASS successfullyParsed is true
 
index 5cd9a1f..fbd4e34 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGCircleElement-dom-cy-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index df74a60..56d8e40 100644 (file)
@@ -5,7 +5,7 @@ Tests dynamic updates of the 'r' attribute of the SVGCircleElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS circleElement.getAttribute('r') is "0"
+PASS circleElement.getAttribute('r') is "1"
 PASS circleElement.getAttribute('r') is "150"
 PASS successfullyParsed is true
 
index 15a4062..7e4792d 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGCircleElement-dom-r-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 5bbb0b7..2cd0f55 100644 (file)
@@ -5,7 +5,7 @@ Tests dynamic updates of the 'cx' property of the SVGCircleElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS circleElement.cx.baseVal.value is -150
+PASS circleElement.cx.baseVal.value is -50
 PASS circleElement.cx.baseVal.value is 150
 PASS successfullyParsed is true
 
index 571ff7a..d945e8f 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGCircleElement-svgdom-cx-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 9812f49..e6df89e 100644 (file)
@@ -5,7 +5,7 @@ Tests dynamic updates of the 'cy' property of the SVGCircleElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS circleElement.cy.baseVal.value is -150
+PASS circleElement.cy.baseVal.value is -50
 PASS circleElement.cy.baseVal.value is 150
 PASS successfullyParsed is true
 
index aad94b5..3bb047b 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGCircleElement-svgdom-cy-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 9a5ae8b..d2d270b 100644 (file)
@@ -5,7 +5,7 @@ Tests dynamic updates of the 'r' property of the SVGCircleElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS circleElement.r.baseVal.value is 0
+PASS circleElement.r.baseVal.value is 1
 PASS circleElement.r.baseVal.value is 150
 PASS successfullyParsed is true
 
index fb95745..22577e0 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGCircleElement-svgdom-r-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 10d542d..b0c0264 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGClipPathElement-dom-clipPathUnits-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 78a7804..9c92873 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGClipPathElement-svgdom-clipPathUnits-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 034b7bd..3171fc9 100644 (file)
@@ -5,7 +5,7 @@ Tests dynamic updates of the 'cx' attribute of the SVGEllipseElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS ellipseElement.getAttribute('cx') is "-150"
+PASS ellipseElement.getAttribute('cx') is "-50"
 PASS ellipseElement.getAttribute('cx') is "150"
 PASS successfullyParsed is true
 
index 15c5005..b792736 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGEllipseElement-dom-cx-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 9579a99..2665f33 100644 (file)
@@ -5,7 +5,7 @@ Tests dynamic updates of the 'cy' attribute of the SVGEllipseElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS ellipseElement.getAttribute('cy') is "-150"
+PASS ellipseElement.getAttribute('cy') is "-50"
 PASS ellipseElement.getAttribute('cy') is "150"
 PASS successfullyParsed is true
 
index 5f94f9c..bb52fb4 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGEllipseElement-dom-cy-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 00d25ce..d2f7b2e 100644 (file)
@@ -5,8 +5,8 @@ Tests dynamic updates of the 'rx' attribute of the SVGEllipseElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS ellipseElement.getAttribute('rx') is "0"
-PASS ellipseElement.getAttribute('rx') is "100"
+PASS ellipseElement.getAttribute('rx') is "10"
+PASS ellipseElement.getAttribute('rx') is "150"
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 6fcba92..dfae77f 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGEllipseElement-dom-rx-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 4b876b5..2875677 100644 (file)
@@ -5,7 +5,7 @@ Tests dynamic updates of the 'ry' attribute of the SVGEllipseElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS ellipseElement.getAttribute('ry') is "0"
+PASS ellipseElement.getAttribute('ry') is "10"
 PASS ellipseElement.getAttribute('ry') is "150"
 PASS successfullyParsed is true
 
index 584349e..ffd7899 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGEllipseElement-dom-ry-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 54d18e2..48a181d 100644 (file)
@@ -5,7 +5,7 @@ Tests dynamic updates of the 'cx' property of the SVGEllipseElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS ellipseElement.cx.baseVal.value is -150
+PASS ellipseElement.cx.baseVal.value is -50
 PASS ellipseElement.cx.baseVal.value is 150
 PASS successfullyParsed is true
 
index c86e494..fafca03 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGEllipseElement-svgdom-cx-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index fc6c33f..56048c1 100644 (file)
@@ -5,7 +5,7 @@ Tests dynamic updates of the 'cy' property of the SVGEllipseElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS ellipseElement.cy.baseVal.value is -150
+PASS ellipseElement.cy.baseVal.value is -50
 PASS ellipseElement.cy.baseVal.value is 150
 PASS successfullyParsed is true
 
index bc50c47..14d6f07 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGEllipseElement-svgdom-cy-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 7a30df1..06b092b 100644 (file)
@@ -5,8 +5,8 @@ Tests dynamic updates of the 'rx' property of the SVGEllipseElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS ellipseElement.rx.baseVal.value is 0
-PASS ellipseElement.rx.baseVal.value is 100
+PASS ellipseElement.rx.baseVal.value is 10
+PASS ellipseElement.rx.baseVal.value is 150
 PASS successfullyParsed is true
 
 TEST COMPLETE
index be095d3..5b0a9bc 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGEllipseElement-svgdom-rx-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index a85fdd0..a975897 100644 (file)
@@ -5,7 +5,7 @@ Tests dynamic updates of the 'ry' property of the SVGEllipseElement object
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS ellipseElement.ry.baseVal.value is 0
+PASS ellipseElement.ry.baseVal.value is 10
 PASS ellipseElement.ry.baseVal.value is 150
 PASS successfullyParsed is true
 
index 04521de..7b4270f 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGEllipseElement-svgdom-ry-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 881e0af..655bde3 100644 (file)
@@ -6,7 +6,7 @@ Tests dynamic updates of the 'height' attribute of the SVGForeignObjectElement o
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS foreignObjectElement.getAttribute('height') is "0"
+PASS foreignObjectElement.getAttribute('height') is "2"
 PASS foreignObjectElement.getAttribute('height') is "150"
 PASS successfullyParsed is true
 
index 6986373..6aac8ab 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGForeignObjectElement-dom-height-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 37c531c..5036fac 100644 (file)
@@ -6,7 +6,7 @@ Tests dynamic updates of the 'width' attribute of the SVGForeignObjectElement ob
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS foreignObjectElement.getAttribute('width') is "0"
+PASS foreignObjectElement.getAttribute('width') is "2"
 PASS foreignObjectElement.getAttribute('width') is "150"
 PASS successfullyParsed is true
 
index f409cff..789252e 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGForeignObjectElement-dom-width-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index f8b365d..9e32ba6 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGForeignObjectElement-dom-x-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 1216bc7..467053f 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGForeignObjectElement-dom-y-attr.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index db38144..b83eb9f 100644 (file)
@@ -6,7 +6,7 @@ Tests dynamic updates of the 'height' property of the SVGForeignObjectElement ob
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS foreignObjectElement.height.baseVal.value is 0
+PASS foreignObjectElement.height.baseVal.value is 2
 PASS foreignObjectElement.height.baseVal.value is 150
 PASS successfullyParsed is true
 
index 4a352ae..6a931c8 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGForeignObjectElement-svgdom-height-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 34ecbb1..824e264 100644 (file)
@@ -6,7 +6,7 @@ Tests dynamic updates of the 'width' property of the SVGForeignObjectElement obj
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS foreignObjectElement.width.baseVal.value is 0
+PASS foreignObjectElement.width.baseVal.value is 2
 PASS foreignObjectElement.width.baseVal.value is 150
 PASS successfullyParsed is true
 
index 20e7ed6..f48b5e0 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGForeignObjectElement-svgdom-width-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 80d53ae..308cd25 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGForeignObjectElement-svgdom-x-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index e447e35..531f0fe 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="resources/SVGForeignObjectElement-svgdom-y-prop.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 6c631c1..0299920 100644 (file)
@@ -20,8 +20,8 @@ rootSVGElement.appendChild(anchorElement);
 
 function executeTest() {
     anchorElement.setAttributeNS(xlinkNS, "xlink:href", "resources/linkTarget.svg");
+    completeTest();
     triggerUpdate();
 }
 
 executeTest();
-var successfullyParsed = true;
index f6fd78d..6880ee8 100644 (file)
@@ -21,8 +21,8 @@ rootSVGElement.appendChild(anchorElement);
 
 function executeTest() {
     anchorElement.setAttribute("target", "_self");
+    completeTest();
     triggerUpdate();
 }
 
 executeTest();
-var successfullyParsed = true;
index b0886f2..2e46976 100644 (file)
@@ -20,8 +20,8 @@ rootSVGElement.appendChild(anchorElement);
 
 function executeTest() {
     anchorElement.href.baseVal = "resources/linkTarget.svg";
+    completeTest();
     triggerUpdate();
 }
 
 executeTest();
-var successfullyParsed = true;
index 57093e6..c13fb39 100644 (file)
@@ -21,8 +21,8 @@ rootSVGElement.appendChild(anchorElement);
 
 function executeTest() {
     anchorElement.target.baseVal = "_self";
+    completeTest();
     triggerUpdate();
 }
 
 executeTest();
-var successfullyParsed = true;
index 59d6dbd..9cf2a08 100644 (file)
@@ -1,25 +1,23 @@
 // [Name] SVGCircleElement-dom-cx-attr.js
-// [Expected rendering result] green circle - and a series of PASS mesages
+// [Expected rendering result] unclipped green circle - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'cx' attribute of the SVGCircleElement object")
 createSVGTestCase();
 
 var circleElement = createSVGElement("circle");
-circleElement.setAttribute("cx", "-150");
+circleElement.setAttribute("cx", "-50");
 circleElement.setAttribute("cy", "150");
 circleElement.setAttribute("r", "150");
 circleElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(circleElement);
-shouldBeEqualToString("circleElement.getAttribute('cx')", "-150");
+shouldBeEqualToString("circleElement.getAttribute('cx')", "-50");
 
 function executeTest() {
     circleElement.setAttribute("cx", "150");
     shouldBeEqualToString("circleElement.getAttribute('cx')", "150");
 
-    waitForClickEvent(circleElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(circleElement, 50, 150);
index 3753a30..81716be 100644 (file)
@@ -1,25 +1,23 @@
 // [Name] SVGCircleElement-dom-cy-attr.js
-// [Expected rendering result] green circle - and a series of PASS mesages
+// [Expected rendering result] unclipped green circle - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'cy' attribute of the SVGCircleElement object")
 createSVGTestCase();
 
 var circleElement = createSVGElement("circle");
 circleElement.setAttribute("cx", "150");
-circleElement.setAttribute("cy", "-150");
+circleElement.setAttribute("cy", "-50");
 circleElement.setAttribute("r", "150");
 circleElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(circleElement);
-shouldBeEqualToString("circleElement.getAttribute('cy')", "-150");
+shouldBeEqualToString("circleElement.getAttribute('cy')", "-50");
 
 function executeTest() {
     circleElement.setAttribute("cy", "150");
     shouldBeEqualToString("circleElement.getAttribute('cy')", "150");
 
-    waitForClickEvent(circleElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(circleElement, 150, 50);
index 598bf2a..f76bf5e 100644 (file)
@@ -7,19 +7,17 @@ createSVGTestCase();
 var circleElement = createSVGElement("circle");
 circleElement.setAttribute("cx", "150");
 circleElement.setAttribute("cy", "150");
-circleElement.setAttribute("r", "0");
+circleElement.setAttribute("r", "1");
 circleElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(circleElement);
-shouldBeEqualToString("circleElement.getAttribute('r')", "0");
+shouldBeEqualToString("circleElement.getAttribute('r')", "1");
 
 function executeTest() {
     circleElement.setAttribute("r", "150");
     shouldBeEqualToString("circleElement.getAttribute('r')", "150");
 
-    waitForClickEvent(circleElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(circleElement, 150, 150);
index a15e0f9..9e97f6d 100644 (file)
@@ -1,25 +1,23 @@
 // [Name] SVGCircleElement-svgdom-cx-prop.js
-// [Expected rendering result] green circle - and a series of PASS mesages
+// [Expected rendering result] unclipped green circle - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'cx' property of the SVGCircleElement object")
 createSVGTestCase();
 
 var circleElement = createSVGElement("circle");
-circleElement.setAttribute("cx", "-150");
+circleElement.setAttribute("cx", "-50");
 circleElement.setAttribute("cy", "150");
 circleElement.setAttribute("r", "150");
 circleElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(circleElement);
-shouldBe("circleElement.cx.baseVal.value", "-150");
+shouldBe("circleElement.cx.baseVal.value", "-50");
 
 function executeTest() {
     circleElement.cx.baseVal.value = "150";
     shouldBe("circleElement.cx.baseVal.value", "150");
 
-    waitForClickEvent(circleElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(circleElement, 50, 150);
index dc75f3e..1f8d297 100644 (file)
@@ -1,25 +1,23 @@
 // [Name] SVGCircleElement-svgdom-cy-prop.js
-// [Expected rendering result] green circle - and a series of PASS mesages
+// [Expected rendering result] unclipped green circle - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'cy' property of the SVGCircleElement object")
 createSVGTestCase();
 
 var circleElement = createSVGElement("circle");
 circleElement.setAttribute("cx", "150");
-circleElement.setAttribute("cy", "-150");
+circleElement.setAttribute("cy", "-50");
 circleElement.setAttribute("r", "150");
 circleElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(circleElement);
-shouldBe("circleElement.cy.baseVal.value", "-150");
+shouldBe("circleElement.cy.baseVal.value", "-50");
 
 function executeTest() {
     circleElement.cy.baseVal.value = "150";
     shouldBe("circleElement.cy.baseVal.value", "150");
 
-    waitForClickEvent(circleElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(circleElement, 150, 50);
index 09eddbd..88783d5 100644 (file)
@@ -7,19 +7,17 @@ createSVGTestCase();
 var circleElement = createSVGElement("circle");
 circleElement.setAttribute("cx", "150");
 circleElement.setAttribute("cy", "150");
-circleElement.setAttribute("r", "0");
+circleElement.setAttribute("r", "1");
 circleElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(circleElement);
-shouldBe("circleElement.r.baseVal.value", "0");
+shouldBe("circleElement.r.baseVal.value", "1");
 
 function executeTest() {
     circleElement.r.baseVal.value = "150";
     shouldBe("circleElement.r.baseVal.value", "150");
 
-    waitForClickEvent(circleElement); 
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(circleElement, 150, 150);
index ef9ad05..f6b3b70 100644 (file)
@@ -17,7 +17,7 @@ circleElement.setAttribute("cy", "150");
 circleElement.setAttribute("r", "150");
 clipPathElement.appendChild(circleElement);
 
-defsElement.appendChild(clipPathElement);;
+defsElement.appendChild(clipPathElement);
 
 var rectElement = createSVGElement("rect");
 rectElement.setAttribute("width", "300");
@@ -32,9 +32,7 @@ function executeTest() {
     clipPathElement.setAttribute("clipPathUnits", "userSpaceOnUse");
     shouldBeEqualToString("clipPathElement.getAttribute('clipPathUnits')", "userSpaceOnUse");
 
-    waitForClickEvent(rectElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(rectElement, 150, 150);
index 003968d..a01cf5c 100644 (file)
@@ -32,9 +32,7 @@ function executeTest() {
     clipPathElement.clipPathUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE;
     shouldBe("clipPathElement.clipPathUnits.baseVal", "SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE");
 
-    waitForClickEvent(rectElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(rectElement, 150, 150);
index 0a33605..3b71742 100644 (file)
@@ -1,26 +1,24 @@
 // [Name] SVGEllipseElement-dom-cx-attr.js
-// [Expected rendering result] green ellipse - and a series of PASS mesages
+// [Expected rendering result] unclipped green ellipse - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'cx' attribute of the SVGEllipseElement object")
 createSVGTestCase();
 
 var ellipseElement = createSVGElement("ellipse");
-ellipseElement.setAttribute("cx", "-150");
+ellipseElement.setAttribute("cx", "-50");
 ellipseElement.setAttribute("cy", "150");
 ellipseElement.setAttribute("rx", "100");
 ellipseElement.setAttribute("ry", "150");
 ellipseElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(ellipseElement);
-shouldBeEqualToString("ellipseElement.getAttribute('cx')", "-150");
+shouldBeEqualToString("ellipseElement.getAttribute('cx')", "-50");
 
 function executeTest() {
     ellipseElement.setAttribute("cx", "150");
     shouldBeEqualToString("ellipseElement.getAttribute('cx')", "150");
 
-    waitForClickEvent(ellipseElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(ellipseElement, 50, 150);
index ba96935..680172e 100644 (file)
@@ -1,26 +1,24 @@
 // [Name] SVGEllipseElement-dom-cy-attr.js
-// [Expected rendering result] green ellipse - and a series of PASS mesages
+// [Expected rendering result] unclipped green ellipse - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'cy' attribute of the SVGEllipseElement object")
 createSVGTestCase();
 
 var ellipseElement = createSVGElement("ellipse");
 ellipseElement.setAttribute("cx", "150");
-ellipseElement.setAttribute("cy", "-150");
+ellipseElement.setAttribute("cy", "-50");
 ellipseElement.setAttribute("rx", "100");
 ellipseElement.setAttribute("ry", "150");
 ellipseElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(ellipseElement);
-shouldBeEqualToString("ellipseElement.getAttribute('cy')", "-150");
+shouldBeEqualToString("ellipseElement.getAttribute('cy')", "-50");
 
 function executeTest() {
     ellipseElement.setAttribute("cy", "150");
     shouldBeEqualToString("ellipseElement.getAttribute('cy')", "150");
 
-    waitForClickEvent(ellipseElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(ellipseElement, 150, 50);
index 2f975ba..6baa959 100644 (file)
@@ -1,5 +1,5 @@
 // [Name] SVGEllipseElement-dom-rx-attr.js
-// [Expected rendering result] green ellipse - and a series of PASS mesages
+// [Expected rendering result] green ellipse with rx = ry (in fact a circle)- and a series of PASS mesages
 
 description("Tests dynamic updates of the 'rx' attribute of the SVGEllipseElement object")
 createSVGTestCase();
@@ -7,20 +7,18 @@ createSVGTestCase();
 var ellipseElement = createSVGElement("ellipse");
 ellipseElement.setAttribute("cx", "150");
 ellipseElement.setAttribute("cy", "150");
-ellipseElement.setAttribute("rx", "0");
+ellipseElement.setAttribute("rx", "10");
 ellipseElement.setAttribute("ry", "150");
 ellipseElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(ellipseElement);
-shouldBeEqualToString("ellipseElement.getAttribute('rx')", "0");
+shouldBeEqualToString("ellipseElement.getAttribute('rx')", "10");
 
 function executeTest() {
-    ellipseElement.setAttribute("rx", "100");
-    shouldBeEqualToString("ellipseElement.getAttribute('rx')", "100");
+    ellipseElement.setAttribute("rx", "150");
+    shouldBeEqualToString("ellipseElement.getAttribute('rx')", "150");
 
-    waitForClickEvent(ellipseElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(ellipseElement, 150, 150);
index 1bec14b..3006575 100644 (file)
@@ -1,5 +1,5 @@
 // [Name] SVGEllipseElement-dom-ry-attr.js
-// [Expected rendering result] green ellipse - and a series of PASS mesages
+// [Expected rendering result] with rx = ry (in fact a circle) - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'ry' attribute of the SVGEllipseElement object")
 createSVGTestCase();
@@ -7,20 +7,18 @@ createSVGTestCase();
 var ellipseElement = createSVGElement("ellipse");
 ellipseElement.setAttribute("cx", "150");
 ellipseElement.setAttribute("cy", "150");
-ellipseElement.setAttribute("rx", "100");
-ellipseElement.setAttribute("ry", "0");
+ellipseElement.setAttribute("rx", "150");
+ellipseElement.setAttribute("ry", "10");
 ellipseElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(ellipseElement);
-shouldBeEqualToString("ellipseElement.getAttribute('ry')", "0");
+shouldBeEqualToString("ellipseElement.getAttribute('ry')", "10");
 
 function executeTest() {
     ellipseElement.setAttribute("ry", "150");
     shouldBeEqualToString("ellipseElement.getAttribute('ry')", "150");
 
-    waitForClickEvent(ellipseElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(ellipseElement, 150, 150);
index da19b0c..90ee9c1 100644 (file)
@@ -1,26 +1,24 @@
 // [Name] SVGEllipseElement-svgdom-cx-prop.js
-// [Expected rendering result] green ellipse - and a series of PASS mesages
+// [Expected rendering result] unclipped green ellipse - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'cx' property of the SVGEllipseElement object")
 createSVGTestCase();
 
 var ellipseElement = createSVGElement("ellipse");
-ellipseElement.setAttribute("cx", "-150");
+ellipseElement.setAttribute("cx", "-50");
 ellipseElement.setAttribute("cy", "150");
 ellipseElement.setAttribute("rx", "100");
 ellipseElement.setAttribute("ry", "150");
 ellipseElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(ellipseElement);
-shouldBe("ellipseElement.cx.baseVal.value", "-150");
+shouldBe("ellipseElement.cx.baseVal.value", "-50");
 
 function executeTest() {
     ellipseElement.cx.baseVal.value = "150";
     shouldBe("ellipseElement.cx.baseVal.value", "150");
 
-    waitForClickEvent(ellipseElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(ellipseElement, 50, 150);
index 2dd7a94..f641a44 100644 (file)
@@ -1,26 +1,24 @@
 // [Name] SVGEllipseElement-svgdom-cy-prop.js
-// [Expected rendering result] green ellipse - and a series of PASS mesages
+// [Expected rendering result] unclipped green ellipse - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'cy' property of the SVGEllipseElement object")
 createSVGTestCase();
 
 var ellipseElement = createSVGElement("ellipse");
 ellipseElement.setAttribute("cx", "150");
-ellipseElement.setAttribute("cy", "-150");
+ellipseElement.setAttribute("cy", "-50");
 ellipseElement.setAttribute("rx", "100");
 ellipseElement.setAttribute("ry", "150");
 ellipseElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(ellipseElement);
-shouldBe("ellipseElement.cy.baseVal.value", "-150");
+shouldBe("ellipseElement.cy.baseVal.value", "-50");
 
 function executeTest() {
     ellipseElement.cy.baseVal.value = "150";
     shouldBe("ellipseElement.cy.baseVal.value", "150");
 
-    waitForClickEvent(ellipseElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(ellipseElement, 150, 50);
index c0710ae..65905f2 100644 (file)
@@ -1,5 +1,5 @@
 // [Name] SVGEllipseElement-svgdom-rx-prop.js
-// [Expected rendering result] green ellipse - and a series of PASS mesages
+// [Expected rendering result] green ellipse with rx = ry (in fact a circle)- and a series of PASS mesages
 
 description("Tests dynamic updates of the 'rx' property of the SVGEllipseElement object")
 createSVGTestCase();
@@ -7,20 +7,18 @@ createSVGTestCase();
 var ellipseElement = createSVGElement("ellipse");
 ellipseElement.setAttribute("cx", "150");
 ellipseElement.setAttribute("cy", "150");
-ellipseElement.setAttribute("rx", "0");
+ellipseElement.setAttribute("rx", "10");
 ellipseElement.setAttribute("ry", "150");
 ellipseElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(ellipseElement);
-shouldBe("ellipseElement.rx.baseVal.value", "0");
+shouldBe("ellipseElement.rx.baseVal.value", "10");
 
 function executeTest() {
-    ellipseElement.rx.baseVal.value = "100";
-    shouldBe("ellipseElement.rx.baseVal.value", "100");
+    ellipseElement.rx.baseVal.value = "150";
+    shouldBe("ellipseElement.rx.baseVal.value", "150");
 
-    waitForClickEvent(ellipseElement); 
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(ellipseElement, 150, 150);
index c61b664..7a0aa2d 100644 (file)
@@ -1,5 +1,5 @@
 // [Name] SVGEllipseElement-svgdom-ry-prop.js
-// [Expected rendering result] green ellipse - and a series of PASS mesages
+// [Expected rendering result] green ellipse with rx = ry (in fact a circle)- and a series of PASS mesages
 
 description("Tests dynamic updates of the 'ry' property of the SVGEllipseElement object")
 createSVGTestCase();
@@ -7,20 +7,18 @@ createSVGTestCase();
 var ellipseElement = createSVGElement("ellipse");
 ellipseElement.setAttribute("cx", "150");
 ellipseElement.setAttribute("cy", "150");
-ellipseElement.setAttribute("rx", "100");
-ellipseElement.setAttribute("ry", "0");
+ellipseElement.setAttribute("rx", "150");
+ellipseElement.setAttribute("ry", "10");
 ellipseElement.setAttribute("fill", "green");
 
 rootSVGElement.appendChild(ellipseElement);
-shouldBe("ellipseElement.ry.baseVal.value", "0");
+shouldBe("ellipseElement.ry.baseVal.value", "10");
 
 function executeTest() {
     ellipseElement.ry.baseVal.value = "150";
     shouldBe("ellipseElement.ry.baseVal.value", "150");
 
-    waitForClickEvent(ellipseElement); 
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(ellipseElement, 150, 150);
index adc58b1..fd81594 100644 (file)
@@ -1,5 +1,5 @@
 // [Name] SVGForeignObjectElement-dom-height-attr.js
-// [Expected rendering result] 'Test passed' text - and a series of PASS mesages
+// [Expected rendering result] unclipped 'Test passed' text - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'height' attribute of the SVGForeignObjectElement object")
 createSVGTestCase();
@@ -8,7 +8,7 @@ var foreignObjectElement = createSVGElement("foreignObject");
 foreignObjectElement.setAttribute("x", "100");
 foreignObjectElement.setAttribute("y", "80");
 foreignObjectElement.setAttribute("width", "150");
-foreignObjectElement.setAttribute("height", "0");
+foreignObjectElement.setAttribute("height", "2");
 
 var htmlDivElement = document.createElementNS(xhtmlNS, "xhtml:div");
 htmlDivElement.setAttribute("style", "background-color: green; color: white; text-align: center");
@@ -17,15 +17,13 @@ htmlDivElement.textContent = "Test passed";
 foreignObjectElement.appendChild(htmlDivElement);
 rootSVGElement.appendChild(foreignObjectElement);
 
-shouldBeEqualToString("foreignObjectElement.getAttribute('height')", "0");
+shouldBeEqualToString("foreignObjectElement.getAttribute('height')", "2");
 
 function executeTest() {
     foreignObjectElement.setAttribute("height", "150");
     shouldBeEqualToString("foreignObjectElement.getAttribute('height')", "150");
 
-    waitForClickEvent(foreignObjectElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(foreignObjectElement, 150, 81);
index 453526c..43a22a6 100644 (file)
@@ -1,5 +1,5 @@
 // [Name] SVGForeignObjectElement-dom-width-attr.js
-// [Expected rendering result] 'Test passed' text - and a series of PASS mesages
+// [Expected rendering result] unclipped 'Test passed' text - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'width' attribute of the SVGForeignObjectElement object")
 createSVGTestCase();
@@ -7,7 +7,7 @@ createSVGTestCase();
 var foreignObjectElement = createSVGElement("foreignObject");
 foreignObjectElement.setAttribute("x", "100");
 foreignObjectElement.setAttribute("y", "80");
-foreignObjectElement.setAttribute("width", "0");
+foreignObjectElement.setAttribute("width", "2");
 foreignObjectElement.setAttribute("height", "150");
 
 var htmlDivElement = document.createElementNS(xhtmlNS, "xhtml:div");
@@ -17,15 +17,13 @@ htmlDivElement.textContent = "Test passed";
 foreignObjectElement.appendChild(htmlDivElement);
 rootSVGElement.appendChild(foreignObjectElement);
 
-shouldBeEqualToString("foreignObjectElement.getAttribute('width')", "0");
+shouldBeEqualToString("foreignObjectElement.getAttribute('width')", "2");
 
 function executeTest() {
     foreignObjectElement.setAttribute("width", "150");
     shouldBeEqualToString("foreignObjectElement.getAttribute('width')", "150");
 
-    waitForClickEvent(foreignObjectElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(foreignObjectElement, 101, 100);
index 4cbae01..7b66ba9 100644 (file)
@@ -1,5 +1,5 @@
 // [Name] SVGForeignObjectElement-dom-x-attr.js
-// [Expected rendering result] 'Test passed' text - and a series of PASS mesages
+// [Expected rendering result] unclipped 'Test passed' text - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'x' attribute of the SVGForeignObjectElement object")
 createSVGTestCase();
@@ -23,9 +23,7 @@ function executeTest() {
     foreignObjectElement.setAttribute("x", "100");
     shouldBeEqualToString("foreignObjectElement.getAttribute('x')", "100");
 
-    waitForClickEvent(foreignObjectElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(foreignObjectElement, 10, 100);
index 69e5ed4..9322a7b 100644 (file)
@@ -1,5 +1,5 @@
 // [Name] SVGForeignObjectElement-dom-y-attr.js
-// [Expected rendering result] 'Test passed' text - and a series of PASS mesages
+// [Expected rendering result] unclipped 'Test passed' text - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'y' attribute of the SVGForeignObjectElement object")
 createSVGTestCase();
@@ -23,9 +23,7 @@ function executeTest() {
     foreignObjectElement.setAttribute("y", "80");
     shouldBeEqualToString("foreignObjectElement.getAttribute('y')", "80");
 
-    waitForClickEvent(foreignObjectElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(foreignObjectElement, 150, 50);
index ccf644c..778b744 100644 (file)
@@ -1,5 +1,5 @@
 // [Name] SVGForeignObjectElement-svgdom-height-prop.js
-// [Expected rendering result] 'Test passed' text - and a series of PASS mesages
+// [Expected rendering result] unclipped 'Test passed' text - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'height' property of the SVGForeignObjectElement object")
 createSVGTestCase();
@@ -8,7 +8,7 @@ var foreignObjectElement = createSVGElement("foreignObject");
 foreignObjectElement.setAttribute("x", "100");
 foreignObjectElement.setAttribute("y", "80");
 foreignObjectElement.setAttribute("width", "150");
-foreignObjectElement.setAttribute("height", "0");
+foreignObjectElement.setAttribute("height", "2");
 
 var htmlDivElement = document.createElementNS(xhtmlNS, "xhtml:div");
 htmlDivElement.setAttribute("style", "background-color: green; color: white; text-align: center");
@@ -17,15 +17,13 @@ htmlDivElement.textContent = "Test passed";
 foreignObjectElement.appendChild(htmlDivElement);
 rootSVGElement.appendChild(foreignObjectElement);
 
-shouldBe("foreignObjectElement.height.baseVal.value", "0");
+shouldBe("foreignObjectElement.height.baseVal.value", "2");
 
 function executeTest() {
     foreignObjectElement.height.baseVal.value = "150";
     shouldBe("foreignObjectElement.height.baseVal.value", "150");
 
-    waitForClickEvent(foreignObjectElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(foreignObjectElement, 150, 81);
index 6b7ea87..37bf6b2 100644 (file)
@@ -1,5 +1,5 @@
 // [Name] SVGForeignObjectElement-svgdom-width-prop.js
-// [Expected rendering result] 'Test passed' text - and a series of PASS mesages
+// [Expected rendering result] unclipped 'Test passed' text - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'width' property of the SVGForeignObjectElement object")
 createSVGTestCase();
@@ -7,7 +7,7 @@ createSVGTestCase();
 var foreignObjectElement = createSVGElement("foreignObject");
 foreignObjectElement.setAttribute("x", "100");
 foreignObjectElement.setAttribute("y", "80");
-foreignObjectElement.setAttribute("width", "0");
+foreignObjectElement.setAttribute("width", "2");
 foreignObjectElement.setAttribute("height", "150");
 
 var htmlDivElement = document.createElementNS(xhtmlNS, "xhtml:div");
@@ -17,15 +17,13 @@ htmlDivElement.textContent = "Test passed";
 foreignObjectElement.appendChild(htmlDivElement);
 rootSVGElement.appendChild(foreignObjectElement);
 
-shouldBe("foreignObjectElement.width.baseVal.value", "0");
+shouldBe("foreignObjectElement.width.baseVal.value", "2");
 
 function executeTest() {
     foreignObjectElement.width.baseVal.value = "150";
     shouldBe("foreignObjectElement.width.baseVal.value", "150");
 
-    waitForClickEvent(foreignObjectElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(foreignObjectElement, 101, 100);
index 5a54140..e80ca22 100644 (file)
@@ -1,5 +1,5 @@
 // [Name] SVGForeignObjectElement-svgdom-x-prop.js
-// [Expected rendering result] 'Test passed' text - and a series of PASS mesages
+// [Expected rendering result] unclipped 'Test passed' text - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'x' property of the SVGForeignObjectElement object")
 createSVGTestCase();
@@ -23,9 +23,7 @@ function executeTest() {
     foreignObjectElement.x.baseVal.value = "100";
     shouldBe("foreignObjectElement.x.baseVal.value", "100");
 
-    waitForClickEvent(foreignObjectElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(foreignObjectElement, 10, 100);
index 5655d8a..1fd62d6 100644 (file)
@@ -1,5 +1,5 @@
 // [Name] SVGForeignObjectElement-svgdom-y-prop.js
-// [Expected rendering result] 'Test passed' text - and a series of PASS mesages
+// [Expected rendering result] unclipped 'Test passed' text - and a series of PASS mesages
 
 description("Tests dynamic updates of the 'y' property of the SVGForeignObjectElement object")
 createSVGTestCase();
@@ -23,9 +23,7 @@ function executeTest() {
     foreignObjectElement.y.baseVal.value = "80";
     shouldBe("foreignObjectElement.y.baseVal.value", "80");
 
-    waitForClickEvent(foreignObjectElement);
-    triggerUpdate();
+    completeTest();
 }
 
-executeTest();
-var successfullyParsed = true;
+startTest(foreignObjectElement, 150, 50);
index 72bc810..0d032a2 100644 (file)
@@ -20,15 +20,44 @@ function createSVGTestCase() {
     bodyElement.insertBefore(rootSVGElement, document.getElementById("description"));
 }
 
-function triggerUpdate() {
+function triggerUpdate(x, y) {
+    // Default x position
+    if (!x) {
+        x = 150;
+    }
+
+    // Default y position
+    if (!y) {
+        y = 200;
+    }
+
+    // Translation due to <h1> above us - is there a more precise way then guessing?
+    x = x + 8;
+    y = y + 66;
+
     if (window.eventSender) {
-        eventSender.mouseMoveTo(150, 200);
+        eventSender.mouseMoveTo(x, y);
         eventSender.mouseDown();
         eventSender.mouseUp();
     }
 }
 
-function waitForClickEvent(obj) {
-    if (window.layoutTestController)
-        obj.setAttribute("onclick", "layoutTestController.notifyDone()");
+function startTest(obj, x, y) {
+    obj.setAttribute("onclick", "executeTest()");
+
+    // Assure first layout finished
+    window.setTimeout("triggerUpdate(" + x + ", " + y + ")", 0);
+}
+
+function completeTest() {
+    var script = document.createElement("script");
+
+    script.onload = function() {
+        if (window.layoutTestController)
+            layoutTestController.notifyDone();
+    };
+
+    script.src = "../../fast/js/resources/js-test-post.js";
+    successfullyParsed = true;
+    document.body.appendChild(script);
 }
index aeed90a..25dfc05 100644 (file)
@@ -10,6 +10,5 @@
 <p id="description"></p>
 <div id="console"></div>
 <script src="YOUR_JS_FILE_HERE"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
index 622dd0f..8d98a7c 100644 (file)
@@ -1,3 +1,254 @@
+2008-04-02  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed by Oliver.
+
+        Fixes: http://bugs.webkit.org/show_bug.cgi?id=17779 (SVG 1.1 Errata demands "SVG JavaScript Liveness" support)
+
+        SVG Errata states: "All SVG DOM objects that directly correspond to an
+        attribute, e.g. the SVGAnimatedLength 'ry' in an SVGRectElement, are live. This
+        means that any changes made to the attribute are immediately reflected in the
+        corresponding SVG DOM object." (see linked URL on bug report)
+
+        Until now only XML -> SVG DOM changes took affect, aka. changing the 'rx' attribute of a <rect>
+        element resuted in changes when accessing 'rx' through SVG DOM (rx.baseVal.value).
+
+        Add a new synchronization layer to handle SVG DOM -> XML changes.
+
+        Added Test: svg/custom/svg-xml-dom-sync.html
+
+        * dom/Element.h:
+        * dom/NamedAttrMap.h:
+        * rendering/SVGRootInlineBox.cpp:
+        (WebCore::nodeToTextContentElement):
+        (WebCore::nodeToTextPositioningElement):
+        (WebCore::SVGRootInlineBox::buildLayoutInformation):
+        (WebCore::SVGRootInlineBox::buildTextChunks):
+        * svg/SVGAElement.h:
+        (WebCore::SVGAElement::contextElement):
+        * svg/SVGAltGlyphElement.h:
+        (WebCore::SVGAltGlyphElement::contextElement):
+        * svg/SVGAnimateColorElement.h:
+        (WebCore::SVGAnimateColorElement::contextElement):
+        * svg/SVGAnimateElement.h:
+        (WebCore::SVGAnimateElement::contextElement):
+        * svg/SVGAnimateMotionElement.h:
+        (WebCore::SVGAnimateMotionElement::contextElement):
+        * svg/SVGAnimateTransformElement.h:
+        (WebCore::SVGAnimateTransformElement::contextElement):
+        * svg/SVGAnimatedTemplate.h:
+        (WebCore::SVGAnimatedTemplate::toString):
+        (WebCore::SVGAnimatedTemplate::associatedAttributeName):
+        (WebCore::lookupOrCreateWrapper):
+        (WebCore::SVGAnimatedAngle::SVGAnimatedAngle):
+        (WebCore::SVGAnimatedAngle::toString):
+        (WebCore::SVGAnimatedBoolean::SVGAnimatedBoolean):
+        (WebCore::SVGAnimatedBoolean::toString):
+        (WebCore::SVGAnimatedEnumeration::SVGAnimatedEnumeration):
+        (WebCore::SVGAnimatedEnumeration::toString):
+        (WebCore::SVGAnimatedInteger::SVGAnimatedInteger):
+        (WebCore::SVGAnimatedInteger::toString):
+        (WebCore::SVGAnimatedLength::SVGAnimatedLength):
+        (WebCore::SVGAnimatedLength::toString):
+        (WebCore::SVGAnimatedLengthList::SVGAnimatedLengthList):
+        (WebCore::SVGAnimatedLengthList::toString):
+        (WebCore::SVGAnimatedNumber::SVGAnimatedNumber):
+        (WebCore::SVGAnimatedNumber::toString):
+        (WebCore::SVGAnimatedNumberList::SVGAnimatedNumberList):
+        (WebCore::SVGAnimatedNumberList::toString):
+        (WebCore::SVGAnimatedPreserveAspectRatio::SVGAnimatedPreserveAspectRatio):
+        (WebCore::SVGAnimatedPreserveAspectRatio::toString):
+        (WebCore::SVGAnimatedRect::SVGAnimatedRect):
+        (WebCore::SVGAnimatedRect::toString):
+        (WebCore::SVGAnimatedString::SVGAnimatedString):
+        (WebCore::SVGAnimatedString::toString):
+        (WebCore::SVGAnimatedTransformList::SVGAnimatedTransformList):
+        (WebCore::SVGAnimatedTransformList::toString):
+        (WebCore::SVGAnimatedType::SVGAnimatedType):
+        * svg/SVGAnimationElement.h:
+        * svg/SVGCircleElement.h:
+        (WebCore::SVGCircleElement::contextElement):
+        * svg/SVGClipPathElement.h:
+        (WebCore::SVGClipPathElement::contextElement):
+        * svg/SVGComponentTransferFunctionElement.cpp:
+        * svg/SVGComponentTransferFunctionElement.h:
+        * svg/SVGCursorElement.cpp:
+        (WebCore::SVGCursorElement::SVGCursorElement):
+        * svg/SVGCursorElement.h:
+        (WebCore::SVGCursorElement::contextElement):
+        * svg/SVGDefsElement.h:
+        (WebCore::SVGDefsElement::contextElement):
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::getAttribute):
+        * svg/SVGElement.h:
+        (LazilyUpdatedType::LazilyUpdatedType):
+        (LazilyUpdatedType::operator=):
+        (LazilyUpdatedType::operator==):
+        (LazilyUpdatedType::operator!=):
+        (LazilyUpdatedType::operator StoredType):
+        (WebCore::SVGElement::invokeSVGPropertySynchronizer):
+        (WebCore::SVGElement::addSVGPropertySynchronizer):
+        * svg/SVGEllipseElement.cpp:
+        (WebCore::SVGEllipseElement::SVGEllipseElement):
+        * svg/SVGEllipseElement.h:
+        (WebCore::SVGEllipseElement::contextElement):
+        * svg/SVGExternalResourcesRequired.h:
+        * svg/SVGFEBlendElement.h:
+        (WebCore::SVGFEBlendElement::contextElement):
+        * svg/SVGFEColorMatrixElement.cpp:
+        * svg/SVGFEColorMatrixElement.h:
+        (WebCore::SVGFEColorMatrixElement::contextElement):
+        * svg/SVGFEComponentTransferElement.h:
+        (WebCore::SVGFEComponentTransferElement::contextElement):
+        * svg/SVGFECompositeElement.h:
+        (WebCore::SVGFECompositeElement::contextElement):
+        * svg/SVGFEDiffuseLightingElement.h:
+        (WebCore::SVGFEDiffuseLightingElement::contextElement):
+        * svg/SVGFEDisplacementMapElement.h:
+        (WebCore::SVGFEDisplacementMapElement::contextElement):
+        * svg/SVGFEFloodElement.h:
+        (WebCore::SVGFEFloodElement::contextElement):
+        * svg/SVGFEGaussianBlurElement.h:
+        (WebCore::SVGFEGaussianBlurElement::contextElement):
+        * svg/SVGFEImageElement.cpp:
+        * svg/SVGFEImageElement.h:
+        (WebCore::SVGFEImageElement::contextElement):
+        * svg/SVGFELightElement.h:
+        * svg/SVGFEMergeElement.h:
+        (WebCore::SVGFEMergeElement::contextElement):
+        * svg/SVGFEMergeNodeElement.h:
+        (WebCore::SVGFEMergeNodeElement::contextElement):
+        * svg/SVGFEOffsetElement.h:
+        (WebCore::SVGFEOffsetElement::contextElement):
+        * svg/SVGFESpecularLightingElement.h:
+        (WebCore::SVGFESpecularLightingElement::contextElement):
+        * svg/SVGFETileElement.h:
+        (WebCore::SVGFETileElement::contextElement):
+        * svg/SVGFETurbulenceElement.h:
+        (WebCore::SVGFETurbulenceElement::contextElement):
+        * svg/SVGFilterElement.cpp:
+        (WebCore::SVGFilterElement::SVGFilterElement):
+        * svg/SVGFilterElement.h:
+        (WebCore::SVGFilterElement::contextElement):
+        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
+        (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
+        * svg/SVGFilterPrimitiveStandardAttributes.h:
+        (WebCore::SVGFilterPrimitiveStandardAttributes::contextElement):
+        * svg/SVGFitToViewBox.cpp:
+        * svg/SVGFitToViewBox.h:
+        * svg/SVGFontElement.h:
+        (WebCore::SVGFontElement::contextElement):
+        * svg/SVGForeignObjectElement.cpp:
+        (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
+        * svg/SVGForeignObjectElement.h:
+        (WebCore::SVGForeignObjectElement::contextElement):
+        * svg/SVGGElement.h:
+        (WebCore::SVGGElement::contextElement):
+        * svg/SVGGradientElement.cpp:
+        * svg/SVGGradientElement.h:
+        * svg/SVGImageElement.cpp:
+        (WebCore::SVGImageElement::SVGImageElement):
+        * svg/SVGImageElement.h:
+        (WebCore::SVGImageElement::contextElement):
+        * svg/SVGLength.cpp:
+        (WebCore::SVGLength::SVGLength):
+        (WebCore::SVGLength::operator=):
+        (WebCore::SVGLength::operator==):
+        (WebCore::SVGLength::operator!=):
+        * svg/SVGLength.h:
+        * svg/SVGLengthList.cpp:
+        (WebCore::SVGLengthList::valueAsString):
+        * svg/SVGLengthList.h:
+        * svg/SVGLineElement.cpp:
+        (WebCore::SVGLineElement::SVGLineElement):
+        * svg/SVGLineElement.h:
+        (WebCore::SVGLineElement::contextElement):
+        * svg/SVGLinearGradientElement.cpp:
+        (WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
+        (WebCore::SVGLinearGradientElement::collectGradientProperties):
+        * svg/SVGLinearGradientElement.h:
+        (WebCore::SVGLinearGradientElement::contextElement):
+        * svg/SVGMPathElement.h:
+        (WebCore::SVGMPathElement::contextElement):
+        * svg/SVGMarkerElement.cpp:
+        (WebCore::SVGMarkerElement::SVGMarkerElement):
+        * svg/SVGMarkerElement.h:
+        (WebCore::SVGMarkerElement::contextElement):
+        * svg/SVGMaskElement.cpp:
+        (WebCore::SVGMaskElement::SVGMaskElement):
+        * svg/SVGMaskElement.h:
+        (WebCore::SVGMaskElement::contextElement):
+        * svg/SVGNumberList.cpp:
+        (WebCore::SVGNumberList::valueAsString):
+        * svg/SVGNumberList.h:
+        * svg/SVGPathElement.h:
+        (WebCore::SVGPathElement::contextElement):
+        * svg/SVGPatternElement.cpp:
+        (WebCore::SVGPatternElement::SVGPatternElement):
+        (WebCore::SVGPatternElement::collectPatternProperties):
+        * svg/SVGPatternElement.h:
+        (WebCore::SVGPatternElement::contextElement):
+        * svg/SVGPolyElement.h:
+        (WebCore::SVGPolyElement::contextElement):
+        * svg/SVGPreserveAspectRatio.cpp:
+        (WebCore::SVGPreserveAspectRatio::valueAsString):
+        * svg/SVGPreserveAspectRatio.h:
+        * svg/SVGRadialGradientElement.cpp:
+        (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
+        (WebCore::SVGRadialGradientElement::svgAttributeChanged):
+        (WebCore::SVGRadialGradientElement::collectGradientProperties):
+        * svg/SVGRadialGradientElement.h:
+        (WebCore::SVGRadialGradientElement::contextElement):
+        * svg/SVGRectElement.cpp:
+        (WebCore::SVGRectElement::SVGRectElement):
+        * svg/SVGRectElement.h:
+        (WebCore::SVGRectElement::contextElement):
+        * svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::SVGSVGElement):
+        (WebCore::SVGSVGElement::currentView):
+        * svg/SVGSVGElement.h:
+        (WebCore::SVGSVGElement::contextElement):
+        * svg/SVGScriptElement.h:
+        (WebCore::SVGScriptElement::contextElement):
+        * svg/SVGSetElement.h:
+        (WebCore::SVGSetElement::contextElement):
+        * svg/SVGStyledElement.h:
+        * svg/SVGStyledTransformableElement.cpp:
+        * svg/SVGStyledTransformableElement.h:
+        * svg/SVGSwitchElement.h:
+        (WebCore::SVGSwitchElement::contextElement):
+        * svg/SVGSymbolElement.h:
+        (WebCore::SVGSymbolElement::contextElement):
+        * svg/SVGTRefElement.h:
+        (WebCore::SVGTRefElement::contextElement):
+        * svg/SVGTSpanElement.h:
+        (WebCore::SVGTSpanElement::contextElement):
+        * svg/SVGTextContentElement.cpp:
+        (WebCore::SVGTextContentElement::SVGTextContentElement):
+        * svg/SVGTextContentElement.h:
+        * svg/SVGTextElement.cpp:
+        * svg/SVGTextElement.h:
+        (WebCore::SVGTextElement::contextElement):
+        * svg/SVGTextPathElement.cpp:
+        (WebCore::SVGTextPathElement::SVGTextPathElement):
+        * svg/SVGTextPathElement.h:
+        (WebCore::SVGTextPathElement::contextElement):
+        * svg/SVGTextPositioningElement.cpp:
+        * svg/SVGTextPositioningElement.h:
+        * svg/SVGTransformList.cpp:
+        (SVGTransformList::valueAsString):
+        * svg/SVGTransformList.h:
+        * svg/SVGURIReference.h:
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::SVGUseElement):
+        * svg/SVGUseElement.h:
+        (WebCore::SVGUseElement::contextElement):
+        * svg/SVGViewElement.h:
+        (WebCore::SVGViewElement::contextElement):
+        * svg/SVGViewSpec.cpp:
+        (WebCore::SVGViewSpec::SVGViewSpec):
+        (WebCore::SVGViewSpec::contextElement):
+        * svg/SVGViewSpec.h:
+
 2008-04-02  Darin Adler  <darin@apple.com>
 
         Reviewed by Alexey.
index fbb73c4..4b5ed6d 100644 (file)
@@ -44,7 +44,7 @@ public:
 
     const AtomicString& getIDAttribute() const;
     bool hasAttribute(const QualifiedName&) const;
-    const AtomicString& getAttribute(const QualifiedName&) const;
+    virtual const AtomicString& getAttribute(const QualifiedName&) const;
     void setAttribute(const QualifiedName&, const AtomicString& value, ExceptionCode&);
     void removeAttribute(const QualifiedName&, ExceptionCode&);
 
@@ -53,7 +53,7 @@ public:
     bool hasAttribute(const String& name) const;
     bool hasAttributeNS(const String& namespaceURI, const String& localName) const;
 
-    const AtomicString& getAttribute(const String& name) const;
+    virtual const AtomicString& getAttribute(const String& name) const;
     const AtomicString& getAttributeNS(const String& namespaceURI, const String& localName) const;
 
     void setAttribute(const AtomicString& name, const AtomicString& value, ExceptionCode&);
index 52e385a..f0d5bbd 100644 (file)
@@ -90,11 +90,11 @@ public:
     
     bool mapsEquivalent(const NamedAttrMap* otherMap) const;
 
-protected:
     // These functions are internal, and do no error checking.
     void addAttribute(PassRefPtr<Attribute>);
     void removeAttribute(const QualifiedName& name);
 
+protected:
     virtual void clearAttributes();
 
     void detachFromElement();
index ca60ba7..9b5ff63 100644 (file)
@@ -319,6 +319,41 @@ FloatPoint topLeftPositionOfCharacterRange(Vector<SVGChar>::iterator it, Vector<
     return FloatPoint(lowX, lowY);
 }
 
+static inline SVGTextContentElement* nodeToTextContentElement(Node* node)
+{
+    if (!node || !node->isSVGElement())
+        return 0;
+
+    if (node->hasTagName(SVGNames::textTag)
+        || node->hasTagName(SVGNames::trefTag)
+        || node->hasTagName(SVGNames::tspanTag)
+        || node->hasTagName(SVGNames::textPathTag)
+#if ENABLE(SVG_FONTS)
+        || node->hasTagName(SVGNames::altGlyphTag)
+#endif
+        )
+         return static_cast<SVGTextContentElement*>(node);
+
+    return 0;
+}
+
+static inline SVGTextPositioningElement* nodeToTextPositioningElement(Node* node)
+{
+    if (!node || !node->isSVGElement())
+        return 0;
+
+    if (node->hasTagName(SVGNames::textTag)
+        || node->hasTagName(SVGNames::trefTag)
+        || node->hasTagName(SVGNames::tspanTag)
+#if ENABLE(SVG_FONTS)
+        || node->hasTagName(SVGNames::altGlyphTag)
+#endif
+        )
+         return static_cast<SVGTextPositioningElement*>(node);
+
+    return 0;
+}
+
 // Helper function
 static float calculateKerning(RenderObject* item)
 {
@@ -899,7 +934,7 @@ void SVGRootInlineBox::buildLayoutInformation(InlineFlowBox* start, SVGCharacter
     if (start->isRootInlineBox()) {
         ASSERT(start->object()->element()->hasTagName(SVGNames::textTag));
 
-        SVGTextPositioningElement* positioningElement = static_cast<SVGTextPositioningElement*>(start->object()->element());
+        SVGTextPositioningElement* positioningElement = nodeToTextPositioningElement(start->object()->element());
         ASSERT(positioningElement);
         ASSERT(positioningElement->parentNode());
 
@@ -919,7 +954,7 @@ void SVGRootInlineBox::buildLayoutInformation(InlineFlowBox* start, SVGCharacter
             bool isTextPath = flowBox->object()->element()->hasTagName(SVGNames::textPathTag);
 
             if (!isTextPath && !isAnchor) {
-                SVGTextPositioningElement* positioningElement = static_cast<SVGTextPositioningElement*>(flowBox->object()->element());
+                SVGTextPositioningElement* positioningElement = nodeToTextPositioningElement(flowBox->object()->element());
                 ASSERT(positioningElement);
                 ASSERT(positioningElement->parentNode());
 
@@ -928,10 +963,7 @@ void SVGRootInlineBox::buildLayoutInformation(InlineFlowBox* start, SVGCharacter
                 info.setInPathLayout(true);
 
                 // Handle text-anchor/textLength on path, which is special.
-                SVGTextContentElement* textContent = 0;
-                Node* node = flowBox->object()->element();
-                if (node && node->isSVGElement())
-                    textContent = static_cast<SVGTextContentElement*>(node);
+                SVGTextContentElement* textContent = nodeToTextContentElement(flowBox->object()->element());
                 ASSERT(textContent);
 
                 ELengthAdjust lengthAdjust = (ELengthAdjust) textContent->lengthAdjust();
@@ -1378,11 +1410,15 @@ void SVGRootInlineBox::buildTextChunks(Vector<SVGChar>& svgChars, InlineFlowBox*
             ASSERT(text);
             ASSERT(text->element());
 
-            SVGTextContentElement* textContent = 0;
-            Node* node = text->element()->parent();
-            if (node && node->isSVGElement())
-                textContent = static_cast<SVGTextContentElement*>(node);
-            ASSERT(textContent);
+            SVGTextContentElement* textContent = nodeToTextContentElement(text->element()->parent());
+            if (!textContent) {
+                // text->element()->parent() can point to a <a> element. Ask for its parent.
+                textContent = nodeToTextContentElement(text->element()->parent()->parent());
+                ASSERT(textContent);
+            }
+
+            if (!textContent)
+                continue;
 
             // Start new character range for the first chunk
             bool isFirstCharacter = info.svgTextChunks.isEmpty() && info.chunk.start == info.it && info.chunk.start == info.chunk.end;
index a1509fd..d5a85da 100644 (file)
@@ -61,11 +61,11 @@ namespace WebCore {
         virtual bool childShouldCreateRenderer(Node*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGAElement, SVGURIReference, String, Href, href)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGAElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
 
         ANIMATED_PROPERTY_DECLARATIONS(SVGAElement, String, String, Target, target)
     };
index 2361049..d2a9a63 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+    Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
                   2004, 2005, 2006 Rob Buis <buis@kde.org>
     Copyright (C) 2008 Apple Computer, Inc.
 
 
 #ifndef SVGAltGlyphElement_h
 #define SVGAltGlyphElement_h
-#if ENABLE(SVG_FONTS)
 
+#if ENABLE(SVG_FONTS)
 #include "AtomicString.h"
 #include "SVGTextPositioningElement.h"
 #include "SVGURIReference.h"
 
-namespace WebCore
-{
+namespace WebCore {
+
     class SVGGlyphElement;
 
-    class SVGAltGlyphElement : public SVGTextPositioningElement, public SVGURIReference
+    class SVGAltGlyphElement : public SVGTextPositioningElement,
+                               public SVGURIReference
     {
     public:
         SVGAltGlyphElement(const QualifiedName&, Document*);
@@ -48,12 +49,10 @@ namespace WebCore
         SVGGlyphElement* glyphElement() const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
     };
 
 } // namespace WebCore
 
 #endif // ENABLE(SVG)
 #endif
-
-// vim:ts=4:noet
index 1a9a841..b8947da 100644 (file)
@@ -42,7 +42,7 @@ namespace WebCore {
         virtual void applyAnimatedValueToElement();
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
         
         virtual bool updateAnimatedValue(EAnimationMode, float timePercentage, unsigned valueIndex, float percentagePast);
         virtual bool calculateFromAndToValues(EAnimationMode, unsigned valueIndex);
index 2b7cf14..eabb36d 100644 (file)
@@ -35,7 +35,7 @@ namespace WebCore {
         virtual ~SVGAnimateElement();
     
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
         
         virtual bool updateAnimatedValue(EAnimationMode, float timePercentage, unsigned valueIndex, float percentagePast) { return false; }
         virtual bool calculateFromAndToValues(EAnimationMode, unsigned valueIndex) { return false; }
index 6d9632c..5d27527 100644 (file)
@@ -44,7 +44,7 @@ namespace WebCore {
         Path animationPath();
         
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
         
         virtual bool updateAnimatedValue(EAnimationMode, float timePercentage, unsigned valueIndex, float percentagePast);
         virtual bool calculateFromAndToValues(EAnimationMode, unsigned valueIndex);
index 520e927..2ba51dd 100644 (file)
@@ -46,7 +46,7 @@ namespace WebCore {
         virtual void applyAnimatedValueToElement();
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
         
         virtual bool updateAnimatedValue(EAnimationMode, float timePercentage, unsigned valueIndex, float percentagePast);
         virtual bool calculateFromAndToValues(EAnimationMode, unsigned valueIndex);
index 20c508e..e20856e 100644 (file)
 #define SVGAnimatedTemplate_h
 
 #if ENABLE(SVG)
-#include <wtf/RefCounted.h>
 #include "AtomicString.h"
+#include "FloatRect.h"
 #include "Attribute.h"
+#include "SVGAngle.h"
+#include "SVGLength.h"
+#include "SVGLengthList.h"
+#include "SVGNumberList.h"
+#include "SVGTransformList.h"
+#include "SVGPreserveAspectRatio.h"
+
+#include <wtf/RefCounted.h>
 
 namespace WebCore {
 
-    class FloatRect;
-    class SVGAngle;
     class SVGElement;
-    class SVGLength;
-    class SVGLengthList;
-    class SVGNumberList;
-    class SVGPreserveAspectRatio;
-    class SVGTransformList;
-    class String;
-    class QualifiedName;
 
     struct SVGAnimatedTypeWrapperKey {            
         // Empty value
@@ -119,6 +118,8 @@ namespace WebCore {
         virtual BareType animVal() const = 0;
         virtual void setAnimVal(BareType newAnimVal) = 0;
 
+        virtual AtomicString toString() const { ASSERT_NOT_REACHED(); return AtomicString(); }
+
         typedef HashMap<SVGAnimatedTypeWrapperKey, SVGAnimatedTemplate<BareType>*, SVGAnimatedTypeWrapperKeyHash, SVGAnimatedTypeWrapperKeyHashTraits > ElementToWrapperMap;
         typedef typename ElementToWrapperMap::const_iterator ElementToWrapperMapIterator;
 
@@ -127,7 +128,7 @@ namespace WebCore {
             static ElementToWrapperMap* s_wrapperCache = new ElementToWrapperMap;                
             return s_wrapperCache;
         }
-        
+
         static void forgetWrapper(SVGAnimatedTemplate<BareType>* wrapper)
         {
             ElementToWrapperMap* cache = wrapperCache();
@@ -141,36 +142,196 @@ namespace WebCore {
             }
         }
 
-       const QualifiedName& associatedAttributeName() const { return m_associatedAttributeName; }
+        const QualifiedName& associatedAttributeName() const { return m_associatedAttributeName; }
 
     private:
-       const QualifiedName& m_associatedAttributeName;
+        const QualifiedName& m_associatedAttributeName;
     };
 
     template <class Type, class SVGElementSubClass>
-    Type* lookupOrCreateWrapper(const SVGElementSubClass* element, const QualifiedName& domAttrName, const AtomicString& attrIdentifier) {
+    Type* lookupOrCreateWrapper(SVGElementSubClass* element, const QualifiedName& domAttrName,
+                                const AtomicString& attrIdentifier, void (SVGElement::*synchronizer)()) {
         SVGAnimatedTypeWrapperKey key(element, attrIdentifier);
         Type* wrapper = static_cast<Type*>(Type::wrapperCache()->get(key));
-        if (!wrapper) {
-            wrapper = new Type(element, domAttrName);
-            Type::wrapperCache()->set(key, wrapper);
-        }
+        if (wrapper)
+            return wrapper;
+
+        wrapper = new Type(element, domAttrName);
+        element->addSVGPropertySynchronizer(domAttrName, synchronizer);
+
+        Type::wrapperCache()->set(key, wrapper);
         return wrapper;
     }
 
-    // Common type definitions, to ease IDL generation...
-    typedef SVGAnimatedTemplate<SVGAngle*> SVGAnimatedAngle;
-    typedef SVGAnimatedTemplate<bool> SVGAnimatedBoolean;
-    typedef SVGAnimatedTemplate<int> SVGAnimatedEnumeration;
-    typedef SVGAnimatedTemplate<long> SVGAnimatedInteger;
-    typedef SVGAnimatedTemplate<SVGLength> SVGAnimatedLength;
-    typedef SVGAnimatedTemplate<SVGLengthList*> SVGAnimatedLengthList;
-    typedef SVGAnimatedTemplate<float> SVGAnimatedNumber;
-    typedef SVGAnimatedTemplate<SVGNumberList*> SVGAnimatedNumberList; 
-    typedef SVGAnimatedTemplate<SVGPreserveAspectRatio*> SVGAnimatedPreserveAspectRatio;
-    typedef SVGAnimatedTemplate<FloatRect> SVGAnimatedRect;
-    typedef SVGAnimatedTemplate<String> SVGAnimatedString;
-    typedef SVGAnimatedTemplate<SVGTransformList*> SVGAnimatedTransformList;
+    // Define SVG 1.1 standard animated properties (these SVGAnimated* classes area slo able to convert themselves to strings)
+    // Note: If we'd just specialize the SVGAnimatedTemplate<> we'd have to duplicate a lot of code above. Hence choosing
+    // the solution, to inherit from the SVGAnimatedTemplate<> classes, and implementing the virtual toString() function.
+    class SVGAnimatedAngle : public SVGAnimatedTemplate<SVGAngle*> {
+    public:
+        SVGAnimatedAngle(const QualifiedName& attributeName) : SVGAnimatedTemplate<SVGAngle*>(attributeName) { }
+
+        virtual AtomicString toString() const
+        {
+            if (SVGAngle* angle = baseVal())
+                return angle->valueAsString();
+
+            return nullAtom;
+        }
+    };
+
+    class SVGAnimatedBoolean : public SVGAnimatedTemplate<bool> {
+    public:
+        SVGAnimatedBoolean(const QualifiedName& attributeName) : SVGAnimatedTemplate<bool>(attributeName) { }
+
+        virtual AtomicString toString() const
+        {
+            return baseVal() ? "true" : "false";
+        }
+    };
+
+    class SVGAnimatedEnumeration : public SVGAnimatedTemplate<int> {
+    public:
+        SVGAnimatedEnumeration(const QualifiedName& attributeName) : SVGAnimatedTemplate<int>(attributeName) { }
+
+        virtual AtomicString toString() const
+        {
+            return String::number(baseVal());
+        }
+    };
+
+    class SVGAnimatedInteger : public SVGAnimatedTemplate<long> {
+    public:
+        SVGAnimatedInteger(const QualifiedName& attributeName) : SVGAnimatedTemplate<long>(attributeName) { }
+
+        virtual AtomicString toString() const
+        {
+            return String::number(baseVal());
+        }
+    };
+
+    class SVGAnimatedLength : public SVGAnimatedTemplate<SVGLength> {
+    public:
+        SVGAnimatedLength(const QualifiedName& attributeName) : SVGAnimatedTemplate<SVGLength>(attributeName) { }
+
+        virtual AtomicString toString() const
+        {
+            return baseVal().valueAsString();
+        }
+    };
+
+    class SVGAnimatedLengthList : public SVGAnimatedTemplate<SVGLengthList*> {
+    public:
+        SVGAnimatedLengthList(const QualifiedName& attributeName) : SVGAnimatedTemplate<SVGLengthList*>(attributeName) { }
+
+        virtual AtomicString toString() const
+        {
+            if (SVGLengthList* list = baseVal())
+                return list->valueAsString();
+
+            return nullAtom;
+        }
+    };
+
+    class SVGAnimatedNumber : public SVGAnimatedTemplate<float> {
+    public:
+        SVGAnimatedNumber(const QualifiedName& attributeName) : SVGAnimatedTemplate<float>(attributeName) { }
+
+        virtual AtomicString toString() const
+        {
+            return String::number(baseVal());
+        }
+    };
+
+    class SVGAnimatedNumberList : public SVGAnimatedTemplate<SVGNumberList*> {
+    public:
+        SVGAnimatedNumberList(const QualifiedName& attributeName) : SVGAnimatedTemplate<SVGNumberList*>(attributeName) { }
+
+        virtual AtomicString toString() const
+        {
+            if (SVGNumberList* list = baseVal())
+                return list->valueAsString();
+
+            return nullAtom;
+        }
+    };
+
+    class SVGAnimatedPreserveAspectRatio : public SVGAnimatedTemplate<SVGPreserveAspectRatio*> {
+    public:
+        SVGAnimatedPreserveAspectRatio(const QualifiedName& attributeName) : SVGAnimatedTemplate<SVGPreserveAspectRatio*>(attributeName) { }
+
+        virtual AtomicString toString() const
+        {
+            if (SVGPreserveAspectRatio* ratio = baseVal())
+                return ratio->valueAsString();
+
+            return nullAtom;
+        }
+    };
+
+    class SVGAnimatedRect : public SVGAnimatedTemplate<FloatRect> {
+    public:
+        SVGAnimatedRect(const QualifiedName& attributeName) : SVGAnimatedTemplate<FloatRect>(attributeName) { }
+
+        virtual AtomicString toString() const
+        {
+            FloatRect rect = baseVal();
+            return String::format("%f %f %f %f", rect.x(), rect.y(), rect.width(), rect.height());
+        }
+    };
+
+    class SVGAnimatedString : public SVGAnimatedTemplate<String> {
+    public:
+        SVGAnimatedString(const QualifiedName& attributeName) : SVGAnimatedTemplate<String>(attributeName) { }
+
+        virtual AtomicString toString() const
+        {
+            return baseVal();
+        }
+    };
+
+    class SVGAnimatedTransformList : public SVGAnimatedTemplate<SVGTransformList*> {
+    public:
+        SVGAnimatedTransformList(const QualifiedName& attributeName) : SVGAnimatedTemplate<SVGTransformList*>(attributeName) { }
+
+        virtual AtomicString toString() const
+        {
+            if (SVGTransformList* list = baseVal())
+                return list->valueAsString();
+
+            return nullAtom;
+        }
+    };
+
+    // Helper for ANIMATED_PROPERTY* macros, whose helper classes SVGAnimatedTemplate##UpperProperty.. can't
+    // inherit from SVGAnimatedTemplate<xxx> as they rely on a working toString() implementation. So instead
+    // create a new helper type SVGAnimatedType, which gets specialized for the support datatypes and in turn inherits
+    // from the SVGAnimatedTEmplate<xxx> macros. Looks a bit complicated, but makes sense if you check the macros.
+    template<typename T>
+    class SVGAnimatedType : public SVGAnimatedTemplate<T> {
+    public:
+        SVGAnimatedType(const QualifiedName& attributeName) : SVGAnimatedTemplate<T>(attributeName) { ASSERT_NOT_REACHED(); }
+    };
+
+#define ADD_ANIMATED_TYPE_HELPER(DataType, SuperClass) \
+    template<> \
+    class SVGAnimatedType<DataType> : public SuperClass { \
+    public: \
+        SVGAnimatedType(const QualifiedName& attributeName) : SuperClass(attributeName) { } \
+    };
+
+    ADD_ANIMATED_TYPE_HELPER(SVGAngle*, SVGAnimatedAngle)
+    ADD_ANIMATED_TYPE_HELPER(bool, SVGAnimatedBoolean)
+    ADD_ANIMATED_TYPE_HELPER(int, SVGAnimatedEnumeration)
+    ADD_ANIMATED_TYPE_HELPER(long, SVGAnimatedInteger)
+    ADD_ANIMATED_TYPE_HELPER(SVGLength, SVGAnimatedLength)
+    ADD_ANIMATED_TYPE_HELPER(SVGLengthList*, SVGAnimatedLengthList)
+    ADD_ANIMATED_TYPE_HELPER(float, SVGAnimatedNumber)
+    ADD_ANIMATED_TYPE_HELPER(SVGNumberList*, SVGAnimatedNumberList)
+    ADD_ANIMATED_TYPE_HELPER(SVGPreserveAspectRatio*, SVGAnimatedPreserveAspectRatio)
+    ADD_ANIMATED_TYPE_HELPER(FloatRect, SVGAnimatedRect)
+    ADD_ANIMATED_TYPE_HELPER(String, SVGAnimatedString)
+    ADD_ANIMATED_TYPE_HELPER(SVGTransformList*, SVGAnimatedTransformList)
+
 }
 
 #endif // ENABLE(SVG)
index 6517d87..62ad1f8 100644 (file)
@@ -151,7 +151,8 @@ namespace WebCore {
         static void parseKeyNumbers(Vector<float>& keyNumbers, const String& value);
         static void parseBeginOrEndValue(double& number, const String& value);
 
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_START_DECLARATIONS(SVGAnimationElement)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGAnimationElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
 
         bool m_connectedToTimer : 1;
         
index 2e0e8c8..b41bec5 100644 (file)
@@ -47,11 +47,11 @@ namespace WebCore {
         virtual Path toPathData() const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
         virtual bool hasRelativeValues() const;
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGCircleElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
 
         ANIMATED_PROPERTY_DECLARATIONS(SVGCircleElement, SVGLength, SVGLength, Cx, cx)
         ANIMATED_PROPERTY_DECLARATIONS(SVGCircleElement, SVGLength, SVGLength, Cy, cy)
index 845aea6..bce0d6b 100644 (file)
@@ -51,11 +51,10 @@ namespace WebCore {
         virtual SVGResource* canvasResource();
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
-
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGClipPathElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
         ANIMATED_PROPERTY_DECLARATIONS(SVGClipPathElement, int, int, ClipPathUnits, clipPathUnits)
 
         RefPtr<SVGResourceClipper> m_clipper;
index e0872a7..3aa6c59 100644 (file)
@@ -48,7 +48,7 @@ SVGComponentTransferFunctionElement::~SVGComponentTransferFunctionElement()
 }
 
 ANIMATED_PROPERTY_DEFINITIONS(SVGComponentTransferFunctionElement, int, Enumeration, enumeration, Type, type, SVGNames::typeAttr, m_type)
-ANIMATED_PROPERTY_DEFINITIONS(SVGComponentTransferFunctionElement, SVGNumberList*, NumberList, numberList, TableValues, tableValues, SVGNames::tableValuesAttr, m_tableValues.get())
+ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED(SVGComponentTransferFunctionElement, SVGNumberList, NumberList, numberList, TableValues, tableValues, SVGNames::tableValuesAttr, m_tableValues)
 ANIMATED_PROPERTY_DEFINITIONS(SVGComponentTransferFunctionElement, float, Number, number, Slope, slope, SVGNames::slopeAttr, m_slope)
 ANIMATED_PROPERTY_DEFINITIONS(SVGComponentTransferFunctionElement, float, Number, number, Intercept, intercept, SVGNames::interceptAttr, m_intercept)
 ANIMATED_PROPERTY_DEFINITIONS(SVGComponentTransferFunctionElement, float, Number, number, Amplitude, amplitude, SVGNames::amplitudeAttr, m_amplitude)
index eadff18..d3d4e32 100644 (file)
@@ -44,6 +44,7 @@ namespace WebCore
         SVGComponentTransferFunction transferFunction() const;
 
     private:
+        ANIMATED_PROPERTY_START_DECLARATIONS(SVGComponentTransferFunctionElement)
         ANIMATED_PROPERTY_DECLARATIONS(SVGComponentTransferFunctionElement, int, int, Type, type)
         ANIMATED_PROPERTY_DECLARATIONS(SVGComponentTransferFunctionElement, SVGNumberList*, RefPtr<SVGNumberList>, TableValues, tableValues)
         ANIMATED_PROPERTY_DECLARATIONS(SVGComponentTransferFunctionElement, float, float, Slope, slope)
index ec1c994..2dad6b8 100644 (file)
@@ -36,8 +36,8 @@ SVGCursorElement::SVGCursorElement(const QualifiedName& tagName, Document* doc)
     , SVGTests()
     , SVGExternalResourcesRequired()
     , SVGURIReference()
-    , m_x(0, LengthModeWidth)
-    , m_y(0, LengthModeHeight)
+    , m_x(SVGLength(0, LengthModeWidth))
+    , m_y(SVGLength(0, LengthModeHeight))
 {
 }
 
index a646a9a..63996e4 100644 (file)
@@ -51,12 +51,13 @@ namespace WebCore {
         virtual void getSubresourceAttributeStrings(Vector<String>&) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGCursorElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGCursorElement, SVGURIReference, String, Href, href)
 
+        ANIMATED_PROPERTY_START_DECLARATIONS(SVGCursorElement)
         ANIMATED_PROPERTY_DECLARATIONS(SVGCursorElement, SVGLength, SVGLength, X, x)
         ANIMATED_PROPERTY_DECLARATIONS(SVGCursorElement, SVGLength, SVGLength, Y, y)
 
index 8113a99..85c796d 100644 (file)
@@ -44,10 +44,10 @@ namespace WebCore {
         virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
     
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGDefsElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
     };
 
 } // namespace WebCore
index 41a62c3..e6c6746 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
+    Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
                   2004, 2005, 2006 Rob Buis <buis@kde.org>
 
     This file is part of the KDE project
@@ -254,6 +254,18 @@ void SVGElement::attributeChanged(Attribute* attr, bool preserveDecls)
     svgAttributeChanged(attr->name());
 }
 
+const AtomicString& SVGElement::getAttribute(const String& name) const
+{
+    invokeSVGPropertySynchronizer(name.impl());
+    return StyledElement::getAttribute(name);
+}
+
+const AtomicString& SVGElement::getAttribute(const QualifiedName& name) const
+{
+    invokeSVGPropertySynchronizer(name.localName().impl());
+    return StyledElement::getAttribute(name);
+}
+
 }
 
 #endif // ENABLE(SVG)
index a4672be..cf80957 100644 (file)
 #include "SVGDocumentExtensions.h"
 #include "SVGNames.h"
 
+// Helper class for ANIMATED_PROPERTY* macros
+template<typename StoredType>
+class LazilyUpdatedType {
+public:
+    LazilyUpdatedType()
+        : value()
+        , dirty(false)
+    {
+    }
+
+    LazilyUpdatedType(const StoredType& other)
+        : value(other)
+        , dirty(false)
+    {
+    }
+
+    LazilyUpdatedType(const LazilyUpdatedType& other)
+        : value(other.value)
+        , dirty(other.dirty)
+    {
+    }
+
+    StoredType& operator=(const StoredType& other)
+    {
+        value = other;
+        dirty = true;
+        return value;
+    }
+
+    LazilyUpdatedType& operator=(const LazilyUpdatedType& other)
+    {
+        value = other.value;
+        dirty = other.dirty;
+        return (*this);
+    }
+
+    bool operator==(const StoredType& other) const
+    {
+        return value == other.value;
+    }
+
+    bool operator!=(const StoredType& other) const
+    {
+        return !((*this) == other);
+    }
+
+    bool operator==(const LazilyUpdatedType& other) const
+    {
+        return dirty == other.dirty && value == other.value;
+    }
+
+    bool operator!=(const LazilyUpdatedType& other) const
+    {
+        return !((*this) == other);
+    }
+
+    operator StoredType() const
+    {
+        return value;    
+    }
+
+    StoredType value;
+    bool dirty;
+};
+
 #define ANIMATED_PROPERTY_EMPTY_DECLARATIONS(BareType, NullType, UpperProperty, LowerProperty) \
 public: \
     virtual BareType LowerProperty() const { ASSERT_NOT_REACHED(); return NullType; } \
     virtual void set##UpperProperty(BareType newValue) { ASSERT_NOT_REACHED(); }\
     virtual BareType LowerProperty##BaseValue() const { ASSERT_NOT_REACHED(); return NullType; } \
     virtual void set##UpperProperty##BaseValue(BareType newValue) { ASSERT_NOT_REACHED(); } \
-    virtual void start##UpperProperty() const { ASSERT_NOT_REACHED(); } \
+    virtual void synchronize##UpperProperty() { ASSERT_NOT_REACHED(); } \
+    virtual SVGElement::AnimatedPropertySynchronizer synchronizerFor##UpperProperty() { ASSERT_NOT_REACHED(); return 0; } \
+    virtual void start##UpperProperty() { ASSERT_NOT_REACHED(); } \
     virtual void stop##UpperProperty() { ASSERT_NOT_REACHED(); }
 
-#define ANIMATED_PROPERTY_FORWARD_DECLARATIONS(ForwardClass, BareType, UpperProperty, LowerProperty) \
+#define ANIMATED_PROPERTY_FORWARD_DECLARATIONS(ClassType, ForwardClass, BareType, UpperProperty, LowerProperty) \
 public: \
     virtual BareType LowerProperty() const { return ForwardClass::LowerProperty(); } \
     virtual void set##UpperProperty(BareType newValue) { ForwardClass::set##UpperProperty(newValue); } \
     virtual BareType LowerProperty##BaseValue() const { return ForwardClass::LowerProperty##BaseValue(); } \
     virtual void set##UpperProperty##BaseValue(BareType newValue) { ForwardClass::set##UpperProperty##BaseValue(newValue); } \
-    virtual void start##UpperProperty() const { ForwardClass::start##UpperProperty(); } \
+    virtual void synchronize##UpperProperty() { ForwardClass::synchronize##UpperProperty(); } \
+    virtual SVGElement::AnimatedPropertySynchronizer synchronizerFor##UpperProperty() { return static_cast<SVGElement::AnimatedPropertySynchronizer>(&ClassType::synchronize##UpperProperty); } \
+    virtual void start##UpperProperty() { ForwardClass::start##UpperProperty(); } \
     virtual void stop##UpperProperty() { ForwardClass::stop##UpperProperty(); }
 
 #define ANIMATED_PROPERTY_DECLARATIONS_INTERNAL(ClassType, ClassStorageType, BareType, StorageType, UpperProperty, LowerProperty) \
 class SVGAnimatedTemplate##UpperProperty \
-: public SVGAnimatedTemplate<BareType> \
+: public SVGAnimatedType<BareType> \
 { \
 public: \
-    SVGAnimatedTemplate##UpperProperty(const ClassType*, const QualifiedName&); \
+    SVGAnimatedTemplate##UpperProperty(ClassType*, const QualifiedName&); \
     virtual ~SVGAnimatedTemplate##UpperProperty() { } \
     virtual BareType baseVal() const; \
     virtual void setBaseVal(BareType); \
@@ -69,16 +138,36 @@ public: \
     void set##UpperProperty(BareType); \
     BareType LowerProperty##BaseValue() const; \
     void set##UpperProperty##BaseValue(BareType); \
-    PassRefPtr<SVGAnimatedTemplate##UpperProperty> LowerProperty##Animated() const; \
-    void start##UpperProperty() const; \
+    PassRefPtr<SVGAnimatedTemplate##UpperProperty> LowerProperty##Animated(); \
+    void synchronize##UpperProperty(); \
+    SVGElement::AnimatedPropertySynchronizer synchronizerFor##UpperProperty(); \
+    void start##UpperProperty(); \
     void stop##UpperProperty(); \
 \
 private: \
-    StorageType m_##LowerProperty;
+    LazilyUpdatedType<StorageType> m_##LowerProperty;
+
+#define ANIMATED_PROPERTY_START_DECLARATIONS(ClassType) \
+public: \
+    virtual void invokeSVGPropertySynchronizer(StringImpl* stringImpl) const \
+    { \
+        if (m_svgPropertyUpdateMap.contains(stringImpl)) { \
+            SVGElement::AnimatedPropertySynchronizer updateMethod = m_svgPropertyUpdateMap.get(stringImpl); \
+            (const_cast<ClassType*>(this)->*updateMethod)(); \
+        } \
+    } \
+\
+    virtual void addSVGPropertySynchronizer(const QualifiedName& attrName, SVGElement::AnimatedPropertySynchronizer method) \
+    { \
+        m_svgPropertyUpdateMap.set(attrName.localName().impl(), method); \
+    } \
+\
+private: \
+    HashMap<StringImpl*, SVGElement::AnimatedPropertySynchronizer> m_svgPropertyUpdateMap;
 
 #define ANIMATED_PROPERTY_DEFINITIONS_INTERNAL(ClassName, ClassType, BareType, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName, StorageGetter, ContextElement) \
-ClassName::SVGAnimatedTemplate##UpperProperty::SVGAnimatedTemplate##UpperProperty(const ClassType* element, const QualifiedName& attributeName) \
-: SVGAnimatedTemplate<BareType>(attributeName), m_element(const_cast<ClassType*>(element)) { } \
+ClassName::SVGAnimatedTemplate##UpperProperty::SVGAnimatedTemplate##UpperProperty(ClassType* element, const QualifiedName& attributeName) \
+: SVGAnimatedType<BareType>(attributeName), m_element(element) { } \
 \
 BareType ClassName::SVGAnimatedTemplate##UpperProperty::baseVal() const \
 { \
@@ -106,46 +195,67 @@ void ClassName::set##UpperProperty(BareType newValue) \
 } \
 BareType ClassName::LowerProperty##BaseValue() const \
 { \
-    const SVGElement* context = ContextElement; \
+    SVGElement* context = ContextElement; \
     ASSERT(context); \
     SVGDocumentExtensions* extensions = (context->document() ? context->document()->accessSVGExtensions() : 0); \
-    if (extensions && extensions->hasBaseValue<BareType>(context, AttrName)) \
-         return extensions->baseValue<BareType>(context, AttrName); \
+    if (extensions && extensions->hasBaseValue<BareType>(context, AttrName.localName())) \
+         return extensions->baseValue<BareType>(context, AttrName.localName()); \
     return LowerProperty(); \
 } \
+\
 void ClassName::set##UpperProperty##BaseValue(BareType newValue) \
 { \
-    const SVGElement* context = ContextElement; \
+    SVGElement* context = ContextElement; \
     ASSERT(context); \
     SVGDocumentExtensions* extensions = (context->document() ? context->document()->accessSVGExtensions() : 0); \
-    if (extensions && extensions->hasBaseValue<BareType>(context, AttrName)) { \
-        extensions->setBaseValue<BareType>(context, AttrName, newValue); \
+    if (extensions && extensions->hasBaseValue<BareType>(context, AttrName.localName())) { \
+        extensions->setBaseValue<BareType>(context, AttrName.localName(), newValue); \
         return; \
     } \
     /* Only update stored property, if not animating */ \
     set##UpperProperty(newValue); \
 } \
 \
-void ClassName::start##UpperProperty() const \
+void ClassName::synchronize##UpperProperty() \
+{ \
+    if (!m_##LowerProperty.dirty) \
+        return; \
+    SVGElement* context = ContextElement; \
+    ASSERT(context); \
+    RefPtr<ClassName::SVGAnimatedTemplate##UpperProperty> animatedClass(LowerProperty##Animated()); \
+    AtomicString value(animatedClass->toString()); \
+    NamedAttrMap* namedAttrMap = context->attributes(false); \
+    ASSERT(!namedAttrMap->isReadOnlyNode()); \
+    Attribute* old = namedAttrMap->getAttributeItem(AttrName); \
+    if (old && value.isNull()) \
+        namedAttrMap->removeAttribute(old->name()); \
+    else if (!old && !value.isNull()) \
+        namedAttrMap->addAttribute(context->createAttribute(QualifiedName(nullAtom, AttrName.localName(), nullAtom), value.impl())); \
+    else if (old && !value.isNull()) \
+        old->setValue(value); \
+    m_##LowerProperty.dirty = false; \
+} \
+\
+void ClassName::start##UpperProperty() \
 { \
-    const SVGElement* context = ContextElement; \
+    SVGElement* context = ContextElement; \
     ASSERT(context); \
     SVGDocumentExtensions* extensions = (context->document() ? context->document()->accessSVGExtensions() : 0); \
     if (extensions) { \
-        ASSERT(!extensions->hasBaseValue<BareType>(context, AttrName)); \
-        extensions->setBaseValue<BareType>(context, AttrName, LowerProperty()); \
+        ASSERT(!extensions->hasBaseValue<BareType>(context, AttrName.localName())); \
+        extensions->setBaseValue<BareType>(context, AttrName.localName(), LowerProperty()); \
     } \
 } \
 \
 void ClassName::stop##UpperProperty() \
 { \
-    const SVGElement* context = ContextElement; \
+    SVGElement* context = ContextElement; \
     ASSERT(context); \
     SVGDocumentExtensions* extensions = (context->document() ? context->document()->accessSVGExtensions() : 0); \
     if (extensions) { \
-        ASSERT(extensions->hasBaseValue<BareType>(context, AttrName)); \
-        set##UpperProperty(extensions->baseValue<BareType>(context, AttrName)); \
-        extensions->removeBaseValue<BareType>(context, AttrName); \
+        ASSERT(extensions->hasBaseValue<BareType>(context, AttrName.localName())); \
+        set##UpperProperty(extensions->baseValue<BareType>(context, AttrName.localName())); \
+        extensions->removeBaseValue<BareType>(context, AttrName.localName()); \
     } \
 }
 
@@ -157,24 +267,44 @@ ANIMATED_PROPERTY_DECLARATIONS_INTERNAL(SVGElement, RefPtr<SVGElement>, BareType
 ANIMATED_PROPERTY_DECLARATIONS_INTERNAL(ClassName, RefPtr<ClassName>, BareType, StorageType, UpperProperty, LowerProperty)
 
 #define ANIMATED_PROPERTY_DEFINITIONS_WITH_CONTEXT(ClassName, BareType, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName, StorageGetter) \
-ANIMATED_PROPERTY_DEFINITIONS_INTERNAL(ClassName, SVGElement, BareType, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName.localName(), StorageGetter, contextElement()) \
-PassRefPtr<ClassName::SVGAnimatedTemplate##UpperProperty> ClassName::LowerProperty##Animated() const \
+ANIMATED_PROPERTY_DEFINITIONS_INTERNAL(ClassName, SVGElement, BareType, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName, StorageGetter, const_cast<ClassName*>(this)->contextElement()) \
+PassRefPtr<ClassName::SVGAnimatedTemplate##UpperProperty> ClassName::LowerProperty##Animated() \
 { \
-    const SVGElement* context = contextElement(); \
+    SVGElement* context = contextElement(); \
     ASSERT(context); \
-    return lookupOrCreateWrapper<ClassName::SVGAnimatedTemplate##UpperProperty, SVGElement>(context, AttrName, AttrName.localName()); \
+    return lookupOrCreateWrapper<ClassName::SVGAnimatedTemplate##UpperProperty, SVGElement>(context, AttrName, AttrName.localName(), context->synchronizerFor##UpperProperty()); \
+} \
+\
+SVGElement::AnimatedPropertySynchronizer ClassName::synchronizerFor##UpperProperty() \
+{ \
+    ASSERT_NOT_REACHED(); \
+    return 0; \
 }
 
+#define ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED_WITH_CONTEXT(ClassName, BareType, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName, StorageGetter) \
+ANIMATED_PROPERTY_DEFINITIONS_WITH_CONTEXT(ClassName, BareType*, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName, static_cast<RefPtr<BareType> >(StorageGetter).get())
+
 #define ANIMATED_PROPERTY_DEFINITIONS_WITH_CUSTOM_IDENTIFIER(ClassName, BareType, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName, AttrIdentifier, StorageGetter) \
-ANIMATED_PROPERTY_DEFINITIONS_INTERNAL(ClassName, ClassName, BareType, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName.localName(), StorageGetter, this) \
-PassRefPtr<ClassName::SVGAnimatedTemplate##UpperProperty> ClassName::LowerProperty##Animated() const \
+ANIMATED_PROPERTY_DEFINITIONS_INTERNAL(ClassName, ClassName, BareType, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName, StorageGetter, const_cast<ClassName*>(this)) \
+PassRefPtr<ClassName::SVGAnimatedTemplate##UpperProperty> ClassName::LowerProperty##Animated() \
 { \
-    return lookupOrCreateWrapper<ClassName::SVGAnimatedTemplate##UpperProperty, ClassName>(this, AttrName, AttrIdentifier); \
+    return lookupOrCreateWrapper<ClassName::SVGAnimatedTemplate##UpperProperty, ClassName>(this, AttrName, AttrIdentifier, synchronizerFor##UpperProperty()); \
+} \
+\
+SVGElement::AnimatedPropertySynchronizer ClassName::synchronizerFor##UpperProperty() \
+{ \
+    return static_cast<SVGElement::AnimatedPropertySynchronizer>(&ClassName::synchronize##UpperProperty); \
 }
 
+#define ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED_WITH_CUSTOM_IDENTIFIER(ClassName, BareType, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName, AttrIdentifier, StorageGetter) \
+ANIMATED_PROPERTY_DEFINITIONS_WITH_CUSTOM_IDENTIFIER(ClassName, BareType*, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName, AttrIdentifier, static_cast<RefPtr<BareType> >(StorageGetter).get())
+
 #define ANIMATED_PROPERTY_DEFINITIONS(ClassName, BareType, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName, StorageGetter) \
 ANIMATED_PROPERTY_DEFINITIONS_WITH_CUSTOM_IDENTIFIER(ClassName, BareType, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName, AttrName.localName(), StorageGetter)
 
+#define ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED(ClassName, BareType, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName, StorageGetter) \
+ANIMATED_PROPERTY_DEFINITIONS_WITH_CUSTOM_IDENTIFIER(ClassName, BareType*, UpperClassName, LowerClassName, UpperProperty, LowerProperty, AttrName, AttrName.localName(), static_cast<RefPtr<BareType> >(StorageGetter).get())
+
 namespace WebCore {
 
     class SVGPreserveAspectRatio;
@@ -220,12 +350,17 @@ namespace WebCore {
         virtual void insertedIntoDocument();
         virtual void buildPendingResource() { }
 
+        virtual const AtomicString& getAttribute(const String&) const;
+        virtual const AtomicString& getAttribute(const QualifiedName&) const;
+
         virtual void svgAttributeChanged(const QualifiedName&) { }
         virtual void attributeChanged(Attribute*, bool preserveDecls = false);
 
         void sendSVGLoadEventIfPossible(bool sendParentLoadEvents = false);
+        virtual bool dispatchEvent(PassRefPtr<Event> e, ExceptionCode& ec, bool tempEvent = false);
 
         // Forwarded properties (declared/defined anywhere else in the inheritance structure)
+        typedef void (SVGElement::*AnimatedPropertySynchronizer)();
 
         // -> For SVGURIReference
         ANIMATED_PROPERTY_EMPTY_DECLARATIONS(String, String(), Href, href)
@@ -237,7 +372,8 @@ namespace WebCore {
         // -> For SVGExternalResourcesRequired
         ANIMATED_PROPERTY_EMPTY_DECLARATIONS(bool, false, ExternalResourcesRequired, externalResourcesRequired)
 
-        virtual bool dispatchEvent(PassRefPtr<Event> e, ExceptionCode& ec, bool tempEvent = false);
+        virtual void invokeSVGPropertySynchronizer(StringImpl*) const { }
+        virtual void addSVGPropertySynchronizer(const QualifiedName&, AnimatedPropertySynchronizer) { ASSERT_NOT_REACHED(); }
 
     private:
         void addSVGEventListener(const AtomicString& eventType, const Attribute*);
index 0f32ed2..a8d1bc4 100644 (file)
@@ -37,10 +37,10 @@ SVGEllipseElement::SVGEllipseElement(const QualifiedName& tagName, Document* doc
     , SVGTests()
     , SVGLangSpace()
     , SVGExternalResourcesRequired()
-    , m_cx(this, LengthModeWidth)
-    , m_cy(this, LengthModeHeight)
-    , m_rx(this, LengthModeWidth)
-    , m_ry(this, LengthModeHeight)
+    , m_cx(SVGLength(this, LengthModeWidth))
+    , m_cy(SVGLength(this, LengthModeHeight))
+    , m_rx(SVGLength(this, LengthModeWidth))
+    , m_ry(SVGLength(this, LengthModeHeight))
 {
 }    
 
index 01e8ef5..473edb6 100644 (file)
@@ -47,11 +47,11 @@ namespace WebCore {
         virtual Path toPathData() const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
         virtual bool hasRelativeValues() const;
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGEllipseElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
  
         ANIMATED_PROPERTY_DECLARATIONS(SVGEllipseElement, SVGLength, SVGLength, Cx, cx)
         ANIMATED_PROPERTY_DECLARATIONS(SVGEllipseElement, SVGLength, SVGLength, Cy, cy)
index 4078794..ca207b2 100644 (file)
@@ -50,7 +50,7 @@ namespace WebCore {
         bool isKnownAttribute(const QualifiedName&);
 
     protected:
-        virtual const SVGElement* contextElement() const = 0;
+        virtual SVGElement* contextElement() = 0;
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS_WITH_CONTEXT(SVGExternalResourcesRequired, bool, bool, ExternalResourcesRequired, externalResourcesRequired)
index 88d2e6f..2d55cd9 100644 (file)
@@ -39,7 +39,7 @@ namespace WebCore
         virtual SVGFEBlend* filterEffect(SVGResourceFilter*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGFEBlendElement, String, String, In1, in1)
index d0648a8..60ef0cf 100644 (file)
@@ -46,7 +46,7 @@ SVGFEColorMatrixElement::~SVGFEColorMatrixElement()
 
 ANIMATED_PROPERTY_DEFINITIONS(SVGFEColorMatrixElement, String, String, string, In1, in1, SVGNames::inAttr, m_in1)
 ANIMATED_PROPERTY_DEFINITIONS(SVGFEColorMatrixElement, int, Enumeration, enumeration, Type, type, SVGNames::typeAttr, m_type)
-ANIMATED_PROPERTY_DEFINITIONS(SVGFEColorMatrixElement, SVGNumberList*, NumberList, numberList, Values, values, SVGNames::valuesAttr, m_values.get())
+ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED(SVGFEColorMatrixElement, SVGNumberList, NumberList, numberList, Values, values, SVGNames::valuesAttr, m_values)
 
 void SVGFEColorMatrixElement::parseMappedAttribute(MappedAttribute* attr)
 {
index 0015002..bea19c6 100644 (file)
@@ -41,7 +41,7 @@ namespace WebCore
         virtual SVGFEColorMatrix* filterEffect(SVGResourceFilter*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGFEColorMatrixElement, String, String, In1, in1)
index 74827c5..f52a54b 100644 (file)
@@ -40,7 +40,7 @@ namespace WebCore
         virtual SVGFEComponentTransfer* filterEffect(SVGResourceFilter*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGFEComponentTransferElement, String, String, In1, in1)
index 24fe6ae..2426617 100644 (file)
@@ -40,7 +40,7 @@ namespace WebCore
         virtual SVGFEComposite* filterEffect(SVGResourceFilter*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, String, String, In1, in1)
index 4d038b3..9f80cc9 100644 (file)
@@ -39,7 +39,7 @@ namespace WebCore {
         virtual SVGFilterEffect* filterEffect(SVGResourceFilter*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGFEDiffuseLightingElement, String, String, In1, in1)
index 7f6a109..0370e78 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
         virtual SVGFEDisplacementMap* filterEffect(SVGResourceFilter*) const;
         
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGFEDisplacementMapElement, String, String, In1, in1)
index 9094d5e..9010744 100644 (file)
@@ -39,7 +39,7 @@ namespace WebCore
         virtual SVGFEFlood* filterEffect(SVGResourceFilter*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGFEFloodElement, String, String, In1, in1)
index c1e9292..28ea8e6 100644 (file)
@@ -42,7 +42,7 @@ namespace WebCore
         virtual SVGFEGaussianBlur* filterEffect(SVGResourceFilter*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGFEGaussianBlurElement, String, String, In1, in1)
index 052717d..ac1e80d 100644 (file)
@@ -54,7 +54,7 @@ SVGFEImageElement::~SVGFEImageElement()
         m_cachedImage->deref(this);
 }
 
-ANIMATED_PROPERTY_DEFINITIONS(SVGFEImageElement, SVGPreserveAspectRatio*, PreserveAspectRatio, preserveAspectRatio, PreserveAspectRatio, preserveAspectRatio, SVGNames::preserveAspectRatioAttr, m_preserveAspectRatio.get())
+ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED(SVGFEImageElement, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio, PreserveAspectRatio, preserveAspectRatio, SVGNames::preserveAspectRatioAttr, m_preserveAspectRatio)
 
 void SVGFEImageElement::parseMappedAttribute(MappedAttribute* attr)
 {
index e977937..2da86a7 100644 (file)
@@ -52,11 +52,11 @@ namespace WebCore {
         virtual SVGFEImage* filterEffect(SVGResourceFilter*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFEImageElement, SVGURIReference, String, Href, href)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFEImageElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
  
         ANIMATED_PROPERTY_DECLARATIONS(SVGFEImageElement, SVGPreserveAspectRatio*, RefPtr<SVGPreserveAspectRatio>, PreserveAspectRatio, preserveAspectRatio)
 
@@ -68,5 +68,3 @@ namespace WebCore {
 
 #endif // ENABLE(SVG)
 #endif
-
-// vim:ts=4:noet
index e0b28e7..673472d 100644 (file)
@@ -40,6 +40,7 @@ namespace WebCore
         virtual void parseMappedAttribute(MappedAttribute*);
 
     private:
+        ANIMATED_PROPERTY_START_DECLARATIONS(SVGFELightElement)
         ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, float, float, Azimuth, azimuth)
         ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, float, float, Elevation, elevation)
         ANIMATED_PROPERTY_DECLARATIONS(SVGFELightElement, float, float, X, x)
index 59898bb..fffb39c 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore
         virtual SVGFEMerge* filterEffect(SVGResourceFilter*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         mutable SVGFEMerge* m_filterEffect;
index c601fde..68ca5f3 100644 (file)
@@ -37,9 +37,10 @@ namespace WebCore
         virtual void parseMappedAttribute(MappedAttribute*);
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
+        ANIMATED_PROPERTY_START_DECLARATIONS(SVGFEMergeNodeElement)
         ANIMATED_PROPERTY_DECLARATIONS(SVGFEMergeNodeElement, String, String, In1, in1)
     };
 
index 01ee9ea..8794bb8 100644 (file)
@@ -40,7 +40,7 @@ namespace WebCore
         virtual SVGFEOffset* filterEffect(SVGResourceFilter*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGFEOffsetElement, String, String, In1, in1)
index 435882e..c169884 100644 (file)
@@ -40,7 +40,7 @@ namespace WebCore
         virtual SVGFESpecularLighting* filterEffect(SVGResourceFilter*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGFESpecularLightingElement, String, String, In1, in1)
index 256e8a0..d71710d 100644 (file)
@@ -40,7 +40,7 @@ namespace WebCore
         virtual SVGFETile* filterEffect(SVGResourceFilter*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGFETileElement, String, String, In1, in1)
index a62bf15..963d1c5 100644 (file)
@@ -45,7 +45,7 @@ namespace WebCore
         virtual SVGFETurbulence* filterEffect(SVGResourceFilter*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGFETurbulenceElement, float, float, BaseFrequencyX, baseFrequencyX)
index a7dacea..890d912 100644 (file)
@@ -42,10 +42,10 @@ SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document* doc)
     , SVGExternalResourcesRequired()
     , m_filterUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
     , m_primitiveUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
-    , m_x(this, LengthModeWidth)
-    , m_y(this, LengthModeHeight)
-    , m_width(this, LengthModeWidth)
-    , m_height(this, LengthModeHeight)
+    , m_x(SVGLength(this, LengthModeWidth))
+    , m_y(SVGLength(this, LengthModeHeight))
+    , m_width(SVGLength(this, LengthModeWidth))
+    , m_height(SVGLength(this, LengthModeHeight))
     , m_filterResX(0)
     , m_filterResY(0)
 {
index f2d9773..d892c1a 100644 (file)
@@ -51,11 +51,11 @@ namespace WebCore {
         virtual bool rendererIsNeeded(RenderStyle*) { return false; }
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFilterElement, SVGURIReference, String, Href, href)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFilterElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
  
         ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, int, int, FilterUnits, filterUnits)
         ANIMATED_PROPERTY_DECLARATIONS(SVGFilterElement, int, int, PrimitiveUnits, primitiveUnits)
@@ -73,5 +73,3 @@ namespace WebCore {
 
 #endif // ENABLE(SVG)
 #endif
-
-// vim:ts=4:noet
index eae0434..4512db8 100644 (file)
@@ -36,10 +36,10 @@ namespace WebCore {
 
 SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const QualifiedName& tagName, Document* doc)
     : SVGStyledElement(tagName, doc)
-    , m_x(this, LengthModeWidth)
-    , m_y(this, LengthModeHeight)
-    , m_width(this, LengthModeWidth)
-    , m_height(this, LengthModeHeight)
+    , m_x(SVGLength(this, LengthModeWidth))
+    , m_y(SVGLength(this, LengthModeHeight))
+    , m_width(SVGLength(this, LengthModeWidth))
+    , m_height(SVGLength(this, LengthModeHeight))
 {
     // Spec: If the attribute is not specified, the effect is as if a value of "0%" were specified.
     setXBaseValue(SVGLength(this, LengthModeWidth, "0%"));
index b639282..6259959 100644 (file)
@@ -47,7 +47,7 @@ namespace WebCore {
         void setStandardAttributes(SVGFilterEffect*) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGFilterPrimitiveStandardAttributes, SVGLength, SVGLength, X, x)
index 2cf3dd7..013cd07 100644 (file)
@@ -46,7 +46,7 @@ SVGFitToViewBox::~SVGFitToViewBox()
 }
 
 ANIMATED_PROPERTY_DEFINITIONS_WITH_CONTEXT(SVGFitToViewBox, FloatRect, Rect, rect, ViewBox, viewBox, SVGNames::viewBoxAttr, m_viewBox)
-ANIMATED_PROPERTY_DEFINITIONS_WITH_CONTEXT(SVGFitToViewBox, SVGPreserveAspectRatio*, PreserveAspectRatio, preserveAspectRatio, PreserveAspectRatio, preserveAspectRatio, SVGNames::preserveAspectRatioAttr, m_preserveAspectRatio.get())
+ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED_WITH_CONTEXT(SVGFitToViewBox, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio, PreserveAspectRatio, preserveAspectRatio, SVGNames::preserveAspectRatioAttr, m_preserveAspectRatio)
 
 bool SVGFitToViewBox::parseViewBox(const UChar*& c, const UChar* end, float& x, float& y, float& w, float& h, bool validate)
 {
index 16ea1c2..bd62fec 100644 (file)
 
 #if ENABLE(SVG)
 #include "SVGElement.h"
+#include "SVGPreserveAspectRatio.h"
 
 namespace WebCore {
 
     class AffineTransform;
-    class SVGPreserveAspectRatio;
 
     class SVGFitToViewBox {
     public:
@@ -44,7 +44,7 @@ namespace WebCore {
         bool isKnownAttribute(const QualifiedName&);
 
     protected:
-        virtual const SVGElement* contextElement() const = 0;
+        virtual SVGElement* contextElement() = 0;
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS_WITH_CONTEXT(SVGFitToViewBox, FloatRect, FloatRect, ViewBox, viewBox)
index 4d0370b..4bf17e6 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
         virtual ~SVGFontElement();
 
         virtual bool rendererIsNeeded(RenderStyle*) { return false; }    
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
         void invalidateGlyphCache();
 
index d48a1f8..49fc464 100644 (file)
@@ -39,10 +39,10 @@ SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tagName, D
     , SVGTests()
     , SVGLangSpace()
     , SVGExternalResourcesRequired()
-    , m_x(this, LengthModeWidth)
-    , m_y(this, LengthModeHeight)
-    , m_width(this, LengthModeWidth)
-    , m_height(this, LengthModeHeight)
+    , m_x(SVGLength(this, LengthModeWidth))
+    , m_y(SVGLength(this, LengthModeHeight))
+    , m_width(SVGLength(this, LengthModeWidth))
+    , m_height(SVGLength(this, LengthModeHeight))
 {
 }
 
index f0c9830..56144d4 100644 (file)
@@ -49,11 +49,11 @@ namespace WebCore {
         virtual RenderObject* createRenderer(RenderArena* arena, RenderStyle* style);
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired) 
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGForeignObjectElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired) 
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGForeignObjectElement, SVGURIReference, String, Href, href)
 
         ANIMATED_PROPERTY_DECLARATIONS(SVGForeignObjectElement, SVGLength, SVGLength, X, x)
         ANIMATED_PROPERTY_DECLARATIONS(SVGForeignObjectElement, SVGLength, SVGLength, Y, y)
index 9237ef8..9dfaa21 100644 (file)
@@ -48,10 +48,10 @@ namespace WebCore {
         virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired) 
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGGElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired) 
 
     private:
         friend class SVGUseElement;
index 4cd527f..0805a38 100644 (file)
@@ -53,7 +53,7 @@ SVGGradientElement::~SVGGradientElement()
 }
 
 ANIMATED_PROPERTY_DEFINITIONS(SVGGradientElement, int, Enumeration, enumeration, GradientUnits, gradientUnits, SVGNames::gradientUnitsAttr, m_gradientUnits)
-ANIMATED_PROPERTY_DEFINITIONS(SVGGradientElement, SVGTransformList*, TransformList, transformList, GradientTransform, gradientTransform, SVGNames::gradientTransformAttr, m_gradientTransform.get())
+ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED(SVGGradientElement, SVGTransformList, TransformList, transformList, GradientTransform, gradientTransform, SVGNames::gradientTransformAttr, m_gradientTransform)
 ANIMATED_PROPERTY_DEFINITIONS(SVGGradientElement, int, Enumeration, enumeration, SpreadMethod, spreadMethod, SVGNames::spreadMethodAttr, m_spreadMethod)
 
 void SVGGradientElement::parseMappedAttribute(MappedAttribute* attr)
index 25579d0..ce838c4 100644 (file)
 #define SVGGradientElement_h
 
 #if ENABLE(SVG)
-#include "SVGPaintServerGradient.h"
 #include "SVGExternalResourcesRequired.h"
+#include "SVGPaintServerGradient.h"
 #include "SVGStyledElement.h"
+#include "SVGTransformlist.h"
 #include "SVGURIReference.h"
 
 namespace WebCore {
 
     class SVGGradientElement;
-    class SVGTransformList;
 
     class SVGGradientElement : public SVGStyledElement,
                                public SVGURIReference,
@@ -68,8 +68,8 @@ namespace WebCore {
         mutable RefPtr<SVGPaintServerGradient> m_resource;
  
     protected:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGGradientElement, SVGURIReference, String, Href, href)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGGradientElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
  
         ANIMATED_PROPERTY_DECLARATIONS(SVGGradientElement, int, int, SpreadMethod, spreadMethod)
         ANIMATED_PROPERTY_DECLARATIONS(SVGGradientElement, int, int, GradientUnits, gradientUnits)
index b7c6aea..5293133 100644 (file)
@@ -43,10 +43,10 @@ SVGImageElement::SVGImageElement(const QualifiedName& tagName, Document* doc)
     , SVGLangSpace()
     , SVGExternalResourcesRequired()
     , SVGURIReference()
-    , m_x(this, LengthModeWidth)
-    , m_y(this, LengthModeHeight)
-    , m_width(this, LengthModeWidth)
-    , m_height(this, LengthModeHeight)
+    , m_x(SVGLength(this, LengthModeWidth))
+    , m_y(SVGLength(this, LengthModeHeight))
+    , m_width(SVGLength(this, LengthModeWidth))
+    , m_height(SVGLength(this, LengthModeHeight))
     , m_preserveAspectRatio(SVGPreserveAspectRatio::create())
     , m_imageLoader(this)
 {
@@ -60,7 +60,7 @@ ANIMATED_PROPERTY_DEFINITIONS(SVGImageElement, SVGLength, Length, length, X, x,
 ANIMATED_PROPERTY_DEFINITIONS(SVGImageElement, SVGLength, Length, length, Y, y, SVGNames::yAttr, m_y)
 ANIMATED_PROPERTY_DEFINITIONS(SVGImageElement, SVGLength, Length, length, Width, width, SVGNames::widthAttr, m_width)
 ANIMATED_PROPERTY_DEFINITIONS(SVGImageElement, SVGLength, Length, length, Height, height, SVGNames::heightAttr, m_height)
-ANIMATED_PROPERTY_DEFINITIONS(SVGImageElement, SVGPreserveAspectRatio*, PreserveAspectRatio, preserveAspectRatio, PreserveAspectRatio, preserveAspectRatio, SVGNames::preserveAspectRatioAttr, m_preserveAspectRatio.get())
+ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED(SVGImageElement, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio, PreserveAspectRatio, preserveAspectRatio, SVGNames::preserveAspectRatioAttr, m_preserveAspectRatio)
 
 void SVGImageElement::parseMappedAttribute(MappedAttribute *attr)
 {
index 483d0fd..b30dc3e 100644 (file)
 
 #if ENABLE(SVG)
 #include "SVGExternalResourcesRequired.h"
-#include "SVGLangSpace.h"
 #include "SVGImageLoader.h"
+#include "SVGLangSpace.h"
+#include "SVGPreserveAspectRatio.h"
 #include "SVGStyledTransformableElement.h"
 #include "SVGTests.h"
 #include "SVGURIReference.h"
 
 namespace WebCore {
 
-    class SVGPreserveAspectRatio;
     class SVGLength;
 
     class SVGImageElement : public SVGStyledTransformableElement,
@@ -62,11 +62,11 @@ namespace WebCore {
         virtual bool hasRelativeValues() const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired) 
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGImageElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired) 
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGImageElement, SVGURIReference, String, Href, href)
 
         ANIMATED_PROPERTY_DECLARATIONS(SVGImageElement, SVGLength, SVGLength, X, x)
         ANIMATED_PROPERTY_DECLARATIONS(SVGImageElement, SVGLength, SVGLength, Y, y)
index e6ecb82..010911d 100644 (file)
@@ -122,6 +122,33 @@ SVGLength::SVGLength(const SVGStyledElement* context, SVGLengthMode mode, const
     setValueAsString(valueAsString);
 }
 
+SVGLength::SVGLength(const SVGLength& other)
+    : m_valueInSpecifiedUnits(other.m_valueInSpecifiedUnits)
+    , m_unit(other.m_unit)
+    , m_context(other.m_context)
+{
+}
+
+SVGLength& SVGLength::operator=(const SVGLength& other)
+{
+    m_valueInSpecifiedUnits = other.m_valueInSpecifiedUnits;
+    m_unit = other.m_unit;
+    m_context = other.m_context;
+    return (*this);
+}
+
+bool SVGLength::operator==(const SVGLength& other) const
+{
+    return m_valueInSpecifiedUnits == other.m_valueInSpecifiedUnits &&
+           m_unit == other.m_unit &&
+           m_context == other.m_context;
+}
+
+bool SVGLength::operator!=(const SVGLength& other) const
+{
+    return !((*this) == other);
+}
+
 SVGLengthType SVGLength::unitType() const
 {
     return extractType(m_unit);
index 543221f..579f763 100644 (file)
@@ -69,6 +69,11 @@ namespace WebCore {
         };
 
         SVGLength(const SVGStyledElement* context = 0, SVGLengthMode mode = LengthModeOther, const String& valueAsString = String());
+        SVGLength(const SVGLength&);
+
+        SVGLength& operator=(const SVGLength&);
+        bool operator==(const SVGLength&) const;
+        bool operator!=(const SVGLength&) const;
 
         // 'SVGLength' functions
         SVGLengthType unitType() const;
index c2d8160..dfff47f 100644 (file)
@@ -59,6 +59,22 @@ void SVGLengthList::parse(const String& value, const SVGStyledElement* context,
     }
 }
 
+String SVGLengthList::valueAsString() const
+{
+    String result;
+
+    ExceptionCode ec = 0;
+    for (unsigned int i = 0; i < numberOfItems(); ++i) {
+        if (i > 0)
+            result += ", ";
+
+        result += getItem(i, ec).valueAsString();
+        ASSERT(ec == 0);
+    }
+
+    return result;
+}
+
 }
 
 #endif // ENABLE(SVG)
index a2c615d..d295a79 100644 (file)
@@ -35,7 +35,9 @@ namespace WebCore {
         virtual ~SVGLengthList();
 
         void parse(const String& value, const SVGStyledElement* context, SVGLengthMode mode);
-        
+        String valueAsString() const;
+
     private:
         SVGLengthList(const QualifiedName&);
     };
index 3b664d1..c006360 100644 (file)
@@ -37,10 +37,10 @@ SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document* doc)
     , SVGTests()
     , SVGLangSpace()
     , SVGExternalResourcesRequired()
-    , m_x1(this, LengthModeWidth)
-    , m_y1(this, LengthModeHeight)
-    , m_x2(this, LengthModeWidth)
-    , m_y2(this, LengthModeHeight)
+    , m_x1(SVGLength(this, LengthModeWidth))
+    , m_y1(SVGLength(this, LengthModeHeight))
+    , m_x2(SVGLength(this, LengthModeWidth))
+    , m_y2(SVGLength(this, LengthModeHeight))
 {
 }
 
index c6dbc08..e6e8329 100644 (file)
@@ -51,11 +51,11 @@ namespace WebCore {
         virtual bool supportsMarkers() const { return true; }
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
         virtual bool hasRelativeValues() const;
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGLineElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
  
         ANIMATED_PROPERTY_DECLARATIONS(SVGLineElement, SVGLength, SVGLength, X1, x1)
         ANIMATED_PROPERTY_DECLARATIONS(SVGLineElement, SVGLength, SVGLength, Y1, y1)
index 6cddf07..385910a 100644 (file)
@@ -38,10 +38,10 @@ namespace WebCore {
 
 SVGLinearGradientElement::SVGLinearGradientElement(const QualifiedName& tagName, Document* doc)
     : SVGGradientElement(tagName, doc)
-    , m_x1(this, LengthModeWidth)
-    , m_y1(this, LengthModeHeight)
-    , m_x2(this, LengthModeWidth)
-    , m_y2(this, LengthModeHeight)
+    , m_x1(SVGLength(this, LengthModeWidth))
+    , m_y1(SVGLength(this, LengthModeHeight))
+    , m_x2(SVGLength(this, LengthModeWidth))
+    , m_y2(SVGLength(this, LengthModeHeight))
 {
     // Spec: If the attribute is not specified, the effect is as if a value of "100%" were specified.
     setX2BaseValue(SVGLength(this, LengthModeWidth, "100%"));
@@ -113,7 +113,7 @@ LinearGradientAttributes SVGLinearGradientElement::collectGradientProperties() c
             attributes.setSpreadMethod((SVGGradientSpreadMethod) current->spreadMethod());
 
         if (!attributes.hasBoundingBoxMode() && current->hasAttribute(SVGNames::gradientUnitsAttr))
-            attributes.setBoundingBoxMode(current->getAttribute(SVGNames::gradientUnitsAttr) == "objectBoundingBox");
+            attributes.setBoundingBoxMode(current->gradientUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
 
         if (!attributes.hasGradientTransform() && current->hasAttribute(SVGNames::gradientTransformAttr))
             attributes.setGradientTransform(current->gradientTransform()->consolidate().matrix());
index 496585e..6153d73 100644 (file)
@@ -46,7 +46,7 @@ namespace WebCore {
         LinearGradientAttributes collectGradientProperties() const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGLinearGradientElement, SVGLength, SVGLength, X1, x1)
index 1e84cc7..4f0c71b 100644 (file)
@@ -43,7 +43,7 @@ namespace WebCore {
         SVGPathElement* pathElement();
         
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
     };
 
 } // namespace WebCore
index 60d6a51..c54f3d7 100644 (file)
@@ -41,10 +41,10 @@ SVGMarkerElement::SVGMarkerElement(const QualifiedName& tagName, Document* doc)
     , SVGLangSpace()
     , SVGExternalResourcesRequired()
     , SVGFitToViewBox()
-    , m_refX(this, LengthModeWidth)
-    , m_refY(this, LengthModeHeight)
-    , m_markerWidth(this, LengthModeWidth)
-    , m_markerHeight(this, LengthModeHeight) 
+    , m_refX(SVGLength(this, LengthModeWidth))
+    , m_refY(SVGLength(this, LengthModeHeight))
+    , m_markerWidth(SVGLength(this, LengthModeWidth))
+    , m_markerHeight(SVGLength(this, LengthModeHeight))
     , m_markerUnits(SVG_MARKERUNITS_STROKEWIDTH)
     , m_orientType(0)
     , m_orientAngle(new SVGAngle())
@@ -64,7 +64,7 @@ ANIMATED_PROPERTY_DEFINITIONS(SVGMarkerElement, int, Enumeration, enumeration, M
 ANIMATED_PROPERTY_DEFINITIONS(SVGMarkerElement, SVGLength, Length, length, MarkerWidth, markerWidth, SVGNames::markerWidthAttr, m_markerWidth)
 ANIMATED_PROPERTY_DEFINITIONS(SVGMarkerElement, SVGLength, Length, length, MarkerHeight, markerHeight, SVGNames::markerHeightAttr, m_markerHeight)
 ANIMATED_PROPERTY_DEFINITIONS_WITH_CUSTOM_IDENTIFIER(SVGMarkerElement, int, Enumeration, enumeration, OrientType, orientType, SVGNames::orientAttr, "orientType", m_orientType)
-ANIMATED_PROPERTY_DEFINITIONS_WITH_CUSTOM_IDENTIFIER(SVGMarkerElement, SVGAngle*, Angle, angle, OrientAngle, orientAngle, SVGNames::orientAttr, "orientAngle", m_orientAngle.get())
+ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED_WITH_CUSTOM_IDENTIFIER(SVGMarkerElement, SVGAngle, Angle, angle, OrientAngle, orientAngle, SVGNames::orientAttr, "orientAngle", m_orientAngle)
 
 void SVGMarkerElement::parseMappedAttribute(MappedAttribute* attr)
 {
index 3e6cf25..56eb87d 100644 (file)
 #define SVGMarkerElement_h
 
 #if ENABLE(SVG)
-#include "SVGResourceMarker.h"
+#include "SVGAngle.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGFitToViewBox.h"
 #include "SVGLangSpace.h"
+#include "SVGResourceMarker.h"
 #include "SVGStyledElement.h"
 
 namespace WebCore {
 
-    class Document;
-    class SVGAngle;
-    
     class SVGMarkerElement : public SVGStyledElement,
                              public SVGLangSpace,
                              public SVGExternalResourcesRequired,
@@ -66,12 +64,12 @@ namespace WebCore {
         virtual SVGResource* canvasResource();
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired) 
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFitToViewBox, FloatRect, ViewBox, viewBox)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFitToViewBox, SVGPreserveAspectRatio*, PreserveAspectRatio, preserveAspectRatio)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGMarkerElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired) 
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGMarkerElement, SVGFitToViewBox, FloatRect, ViewBox, viewBox)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGMarkerElement, SVGFitToViewBox, SVGPreserveAspectRatio*, PreserveAspectRatio, preserveAspectRatio)
 
         ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, SVGLength, SVGLength, RefX, refX)
         ANIMATED_PROPERTY_DECLARATIONS(SVGMarkerElement, SVGLength, SVGLength, RefY, refY)
index 723fefa..393afb7 100644 (file)
@@ -50,10 +50,10 @@ SVGMaskElement::SVGMaskElement(const QualifiedName& tagName, Document* doc)
     , SVGExternalResourcesRequired()
     , m_maskUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
     , m_maskContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
-    , m_x(this, LengthModeWidth)
-    , m_y(this, LengthModeHeight)
-    , m_width(this, LengthModeWidth)
-    , m_height(this, LengthModeHeight)
+    , m_x(SVGLength(this, LengthModeWidth))
+    , m_y(SVGLength(this, LengthModeHeight))
+    , m_width(SVGLength(this, LengthModeWidth))
+    , m_height(SVGLength(this, LengthModeHeight))
 {
     // Spec: If the attribute is not specified, the effect is as if a value of "-10%" were specified.
     setXBaseValue(SVGLength(this, LengthModeWidth, "-10%"));
index cd44baf..2a66ac6 100644 (file)
@@ -54,9 +54,9 @@ namespace WebCore {
         std::auto_ptr<ImageBuffer> drawMaskerContent(const FloatRect& targetRect, FloatRect& maskRect) const;
 
     protected:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
-            
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGMaskElement, SVGURIReference, String, Href, href)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGMaskElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+
         ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, int, int, MaskUnits, maskUnits)
         ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, int, int, MaskContentUnits, maskContentUnits)
  
@@ -65,7 +65,7 @@ namespace WebCore {
         ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGLength, SVGLength, Width, width)
         ANIMATED_PROPERTY_DECLARATIONS(SVGMaskElement, SVGLength, SVGLength, Height, height)
 
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         RefPtr<SVGResourceMasker> m_masker;
index 7931eca..be1e895 100644 (file)
@@ -54,6 +54,22 @@ void SVGNumberList::parse(const String& value)
     }
 }
 
+String SVGNumberList::valueAsString() const
+{
+    String result;
+
+    ExceptionCode ec = 0;
+    for (unsigned int i = 0; i < numberOfItems(); ++i) {
+        if (i > 0)
+            result += ", ";
+
+        result += String::number(getItem(i, ec));
+        ASSERT(ec == 0);
+    }
+
+    return result;
+}
+
 }
 
 #endif // ENABLE(SVG)
index cd5957b..6cd43ff 100644 (file)
@@ -37,7 +37,9 @@ namespace WebCore {
         virtual ~SVGNumberList();
 
         void parse(const String& value);
-        
+        String valueAsString() const;
+
     private:
         SVGNumberList(const QualifiedName&);
     };
index 140e8b1..6258fa9 100644 (file)
@@ -101,13 +101,12 @@ namespace WebCore {
         virtual bool supportsMarkers() const { return true; }
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         mutable RefPtr<SVGPathSegList> m_pathSegList;
 
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGPathElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
         ANIMATED_PROPERTY_DECLARATIONS(SVGPathElement, float, float, PathLength, pathLength)
     };
 
index dda42d7..add64d7 100644 (file)
@@ -57,10 +57,10 @@ SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* doc
     , SVGLangSpace()
     , SVGExternalResourcesRequired()
     , SVGFitToViewBox()
-    , m_x(this, LengthModeWidth)
-    , m_y(this, LengthModeHeight)
-    , m_width(this, LengthModeWidth)
-    , m_height(this, LengthModeHeight)
+    , m_x(SVGLength(this, LengthModeWidth))
+    , m_y(SVGLength(this, LengthModeHeight))
+    , m_width(SVGLength(this, LengthModeWidth))
+    , m_height(SVGLength(this, LengthModeHeight))
     , m_patternUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
     , m_patternContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
     , m_patternTransform(SVGTransformList::create(SVGNames::patternTransformAttr))
@@ -77,7 +77,7 @@ ANIMATED_PROPERTY_DEFINITIONS(SVGPatternElement, SVGLength, Length, length, X, x
 ANIMATED_PROPERTY_DEFINITIONS(SVGPatternElement, SVGLength, Length, length, Y, y, SVGNames::yAttr, m_y)
 ANIMATED_PROPERTY_DEFINITIONS(SVGPatternElement, SVGLength, Length, length, Width, width, SVGNames::widthAttr, m_width)
 ANIMATED_PROPERTY_DEFINITIONS(SVGPatternElement, SVGLength, Length, length, Height, height, SVGNames::heightAttr, m_height)
-ANIMATED_PROPERTY_DEFINITIONS(SVGPatternElement, SVGTransformList*, TransformList, transformList, PatternTransform, patternTransform, SVGNames::patternTransformAttr, m_patternTransform.get())
+ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED(SVGPatternElement, SVGTransformList, TransformList, transformList, PatternTransform, patternTransform, SVGNames::patternTransformAttr, m_patternTransform)
 
 void SVGPatternElement::parseMappedAttribute(MappedAttribute* attr)
 {
@@ -297,10 +297,10 @@ PatternAttributes SVGPatternElement::collectPatternProperties() const
             attributes.setHeight(current->height());
 
         if (!attributes.hasBoundingBoxMode() && current->hasAttribute(SVGNames::patternUnitsAttr))
-            attributes.setBoundingBoxMode(current->getAttribute(SVGNames::patternUnitsAttr) == "objectBoundingBox");
+            attributes.setBoundingBoxMode(current->patternUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
 
         if (!attributes.hasBoundingBoxModeContent() && current->hasAttribute(SVGNames::patternContentUnitsAttr))
-            attributes.setBoundingBoxModeContent(current->getAttribute(SVGNames::patternContentUnitsAttr) == "objectBoundingBox");
+            attributes.setBoundingBoxModeContent(current->patternContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
 
         if (!attributes.hasPatternTransform() && current->hasAttribute(SVGNames::patternTransformAttr))
             attributes.setPatternTransform(current->patternTransform()->consolidate().matrix());
index 6b00a62..18161b2 100644 (file)
 #define SVGPatternElement_h
 
 #if ENABLE(SVG)
-#include "SVGPaintServerPattern.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGFitToViewBox.h"
 #include "SVGLangSpace.h"
+#include "SVGPaintServerPattern.h"
 #include "SVGStyledElement.h"
 #include "SVGTests.h"
+#include "SVGTransformList.h"
 #include "SVGURIReference.h"
 
-
 namespace WebCore {
 
     struct PatternAttributes;
  
     class SVGLength;
-    class SVGTransformList;
 
     class SVGPatternElement : public SVGStyledElement,
                               public SVGURIReference,
@@ -60,10 +59,10 @@ namespace WebCore {
         virtual SVGResource* canvasResource();
 
     protected:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFitToViewBox, FloatRect, ViewBox, viewBox)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFitToViewBox, SVGPreserveAspectRatio*, PreserveAspectRatio, preserveAspectRatio)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGPatternElement, SVGURIReference, String, Href, href)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGPatternElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGPatternElement, SVGFitToViewBox, FloatRect, ViewBox, viewBox)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGPatternElement, SVGFitToViewBox, SVGPreserveAspectRatio*, PreserveAspectRatio, preserveAspectRatio)
 
         ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGLength, SVGLength, X, x)
         ANIMATED_PROPERTY_DECLARATIONS(SVGPatternElement, SVGLength, SVGLength, Y, y)
@@ -75,7 +74,7 @@ namespace WebCore {
 
         mutable RefPtr<SVGPaintServerPattern> m_resource;
 
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         friend class SVGPaintServerPattern;
index 09ce1df..9fadd7d 100644 (file)
@@ -53,13 +53,13 @@ namespace WebCore {
         virtual bool supportsMarkers() const { return true; }
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         bool m_ignoreAttributeChanges : 1;
         mutable RefPtr<SVGPointList> m_points;
 
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGPolyElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
     };
 
 } // namespace WebCore
index 0709b9d..0388939 100644 (file)
@@ -202,6 +202,59 @@ AffineTransform SVGPreserveAspectRatio::getCTM(double logicX, double logicY,
     return temp;
 }
 
+String SVGPreserveAspectRatio::valueAsString() const
+{
+    String result;
+
+    switch ((SVGPreserveAspectRatioType) align()) {
+    default:
+    case SVG_PRESERVEASPECTRATIO_NONE:
+        result = "none";
+        break;
+    case SVG_PRESERVEASPECTRATIO_XMINYMIN:
+        result = "xMinYMin";
+        break;
+    case SVG_PRESERVEASPECTRATIO_XMIDYMIN:
+        result = "xMidYMin";
+        break;
+    case SVG_PRESERVEASPECTRATIO_XMAXYMIN:
+        result = "xMaxYMin";
+        break;
+    case SVG_PRESERVEASPECTRATIO_XMINYMID:
+        result = "xMinYMid";
+        break;
+    case SVG_PRESERVEASPECTRATIO_XMIDYMID:
+        result = "xMidYMid";
+        break;
+    case SVG_PRESERVEASPECTRATIO_XMAXYMID:
+        result = "xMaxYMid";
+        break;
+    case SVG_PRESERVEASPECTRATIO_XMINYMAX:
+        result = "xMinYMax";
+        break;
+    case SVG_PRESERVEASPECTRATIO_XMIDYMAX:
+        result = "xMidYMax";
+        break;
+    case SVG_PRESERVEASPECTRATIO_XMAXYMAX:
+        result = "xMaxYMax";
+        break;
+    };
+
+    switch ((SVGMeetOrSliceType) meetOrSlice()) {
+    default:
+    case SVG_MEETORSLICE_UNKNOWN:
+        break;
+    case SVG_MEETORSLICE_MEET:
+        result += " meet";
+        break;
+    case SVG_MEETORSLICE_SLICE:
+        result += " slice";
+        break;
+    };
+
+    return result;
+}
+
 }
 
 #endif // ENABLE(SVG)
index a1bed65..0dfe940 100644 (file)
@@ -74,6 +74,7 @@ namespace WebCore {
 
         // Helper
         bool parsePreserveAspectRatio(const UChar*& currParam, const UChar* end, bool validate = true);
+        String valueAsString() const;
 
         const QualifiedName& associatedAttributeName() const { return SVGNames::preserveAspectRatioAttr; }
 
index 9ec5eb8..78b984d 100644 (file)
@@ -41,11 +41,11 @@ namespace WebCore {
 
 SVGRadialGradientElement::SVGRadialGradientElement(const QualifiedName& tagName, Document* doc)
     : SVGGradientElement(tagName, doc)
-    , m_cx(this, LengthModeWidth)
-    , m_cy(this, LengthModeHeight)
-    , m_r(this, LengthModeOther)
-    , m_fx(this, LengthModeWidth)
-    , m_fy(this, LengthModeHeight)
+    , m_cx(SVGLength(this, LengthModeWidth))
+    , m_cy(SVGLength(this, LengthModeHeight))
+    , m_r(SVGLength(this, LengthModeOther))
+    , m_fx(SVGLength(this, LengthModeWidth))
+    , m_fy(SVGLength(this, LengthModeHeight))
 {
     // Spec: If the attribute is not specified, the effect is as if a value of "50%" were specified.
     setCxBaseValue(SVGLength(this, LengthModeWidth, "50%"));
@@ -89,7 +89,7 @@ void SVGRadialGradientElement::svgAttributeChanged(const QualifiedName& attrName
         return;
 
     if (attrName == SVGNames::cxAttr || attrName == SVGNames::cyAttr ||
-        attrName == SVGNames::fyAttr || attrName == SVGNames::fyAttr ||
+        attrName == SVGNames::fxAttr || attrName == SVGNames::fyAttr ||
         attrName == SVGNames::rAttr)
         m_resource->invalidate();
 }
@@ -126,7 +126,7 @@ RadialGradientAttributes SVGRadialGradientElement::collectGradientProperties() c
             attributes.setSpreadMethod((SVGGradientSpreadMethod) current->spreadMethod());
 
         if (!attributes.hasBoundingBoxMode() && current->hasAttribute(SVGNames::gradientUnitsAttr))
-            attributes.setBoundingBoxMode(current->getAttribute(SVGNames::gradientUnitsAttr) == "objectBoundingBox");
+            attributes.setBoundingBoxMode(current->gradientUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
 
         if (!attributes.hasGradientTransform() && current->hasAttribute(SVGNames::gradientTransformAttr))
             attributes.setGradientTransform(current->gradientTransform()->consolidate().matrix());
index 7007ea5..d243464 100644 (file)
@@ -46,7 +46,7 @@ namespace WebCore {
         RadialGradientAttributes collectGradientProperties() const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         ANIMATED_PROPERTY_DECLARATIONS(SVGRadialGradientElement, SVGLength, SVGLength, Cx, cx)
index 6820b9d..485dfaf 100644 (file)
@@ -36,12 +36,12 @@ SVGRectElement::SVGRectElement(const QualifiedName& tagName, Document *doc)
     , SVGTests()
     , SVGLangSpace()
     , SVGExternalResourcesRequired()
-    , m_x(this, LengthModeWidth)
-    , m_y(this, LengthModeHeight)
-    , m_width(this, LengthModeWidth)
-    , m_height(this, LengthModeHeight)
-    , m_rx(this, LengthModeWidth)
-    , m_ry(this, LengthModeHeight)
+    , m_x(SVGLength(this, LengthModeWidth))
+    , m_y(SVGLength(this, LengthModeHeight))
+    , m_width(SVGLength(this, LengthModeWidth))
+    , m_height(SVGLength(this, LengthModeHeight))
+    , m_rx(SVGLength(this, LengthModeWidth))
+    , m_ry(SVGLength(this, LengthModeHeight))
 {
 }
 
index 244a6ef..8fbe430 100644 (file)
@@ -47,11 +47,11 @@ namespace WebCore {
         virtual Path toPathData() const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
         virtual bool hasRelativeValues() const;
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGRectElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
 
         ANIMATED_PROPERTY_DECLARATIONS(SVGRectElement, SVGLength, SVGLength, X, x)
         ANIMATED_PROPERTY_DECLARATIONS(SVGRectElement, SVGLength, SVGLength, Y, y)
index 99289f7..e1a84b9 100644 (file)
@@ -63,10 +63,10 @@ SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document* doc)
     , SVGExternalResourcesRequired()
     , SVGFitToViewBox()
     , SVGZoomAndPan()
-    , m_x(this, LengthModeWidth)
-    , m_y(this, LengthModeHeight)
-    , m_width(this, LengthModeWidth)
-    , m_height(this, LengthModeHeight)
+    , m_x(SVGLength(this, LengthModeWidth))
+    , m_y(SVGLength(this, LengthModeHeight))
+    , m_width(SVGLength(this, LengthModeWidth))
+    , m_height(SVGLength(this, LengthModeHeight))
     , m_useCurrentView(false)
     , m_timeScheduler(new TimeScheduler(doc))
     , m_viewSpec(0)
@@ -187,7 +187,7 @@ void SVGSVGElement::setUseCurrentView(bool currentView)
 SVGViewSpec* SVGSVGElement::currentView() const
 {
     if (!m_viewSpec)
-        m_viewSpec.set(new SVGViewSpec(this));
+        m_viewSpec.set(new SVGViewSpec(const_cast<SVGSVGElement*>(this)));
 
     return m_viewSpec.get();
 }
index 4296938..0af8077 100644 (file)
@@ -135,7 +135,7 @@ namespace WebCore
         void inheritViewAttributes(SVGViewElement*);
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
         friend class RenderSVGRoot;
         friend class RenderSVGViewportContainer;
@@ -147,9 +147,9 @@ namespace WebCore
     private:
         void addSVGWindowEventListener(const AtomicString& eventType, const Attribute* attr);   
 
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFitToViewBox, FloatRect, ViewBox, viewBox)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFitToViewBox, SVGPreserveAspectRatio*, PreserveAspectRatio, preserveAspectRatio)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGSVGElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGSVGElement, SVGFitToViewBox, FloatRect, ViewBox, viewBox)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGSVGElement, SVGFitToViewBox, SVGPreserveAspectRatio*, PreserveAspectRatio, preserveAspectRatio)
 
         ANIMATED_PROPERTY_DECLARATIONS(SVGSVGElement, SVGLength, SVGLength, X, x)
         ANIMATED_PROPERTY_DECLARATIONS(SVGSVGElement, SVGLength, SVGLength, Y, y)
index 8ea374a..1a05dd0 100644 (file)
@@ -48,11 +48,12 @@ namespace WebCore
         virtual void getSubresourceAttributeStrings(Vector<String>&) const;
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGURIReference, String, Href, href)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_START_DECLARATIONS(SVGScriptElement)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGScriptElement, SVGURIReference, String, Href, href)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGScriptElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
 
         String m_type;
     };
index 91fc380..51f4154 100644 (file)
@@ -35,7 +35,7 @@ namespace WebCore
         virtual ~SVGSetElement();
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
         
         virtual bool updateAnimatedValue(EAnimationMode, float timePercentage, unsigned valueIndex, float percentagePast);
         virtual bool calculateFromAndToValues(EAnimationMode, unsigned valueIndex);
index 0d798ab..35d9eb9 100644 (file)
@@ -69,6 +69,7 @@ namespace WebCore {
         static int cssPropertyIdForSVGAttributeName(const QualifiedName&);
 
     private:
+        ANIMATED_PROPERTY_START_DECLARATIONS(SVGStyledElement)
         ANIMATED_PROPERTY_DECLARATIONS(SVGStyledElement, String, String, ClassName, className)
 
         void updateElementInstance(SVGDocumentExtensions*) const;
index 28ce33c..b37d519 100644 (file)
@@ -46,7 +46,7 @@ SVGStyledTransformableElement::~SVGStyledTransformableElement()
 {
 }
 
-ANIMATED_PROPERTY_DEFINITIONS(SVGStyledTransformableElement, SVGTransformList*, TransformList, transformList, Transform, transform, SVGNames::transformAttr, m_transform.get())
+ANIMATED_PROPERTY_DEFINITIONS_REFCOUNTED(SVGStyledTransformableElement, SVGTransformList, TransformList, transformList, Transform, transform, SVGNames::transformAttr, m_transform)
 
 AffineTransform SVGStyledTransformableElement::getCTM() const
 {
index 8e23a51..5f5bec4 100644 (file)
 #if ENABLE(SVG)
 #include "SVGStyledLocatableElement.h"
 #include "SVGTransformable.h"
+#include "SVGTransformList.h"
 
 namespace WebCore {
 
     class AffineTransform;
-    class SVGTransformList;
 
     class SVGStyledTransformableElement : public SVGStyledLocatableElement,
                                           public SVGTransformable {
index 3bfc275..7c442be 100644 (file)
@@ -47,12 +47,12 @@ namespace WebCore
         virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
 
     private:
         mutable bool m_insideRenderSection;
 
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGSwitchElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
     };
 
 } // namespace WebCore
index eaa0b94..c52fe69 100644 (file)
@@ -46,11 +46,11 @@ namespace WebCore
         virtual bool rendererIsNeeded(RenderStyle*) { return false; }
 
     protected:
-        virtual const SVGElement* contextElement() const { return this; }
+        virtual SVGElement* contextElement() { return this; }
  
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)       
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFitToViewBox, FloatRect, ViewBox, viewBox)
-        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGFitToViewBox, SVGPreserveAspectRatio*, PreserveAspectRatio, preserveAspectRatio)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGSymbolElement, SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)       
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGSymbolElement, SVGFitToViewBox, FloatRect, ViewBox, viewBox)
+        ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGSymbolElement, SVGFitToViewBox, SVGPreserveAspectRatio*, PreserveAspectRatio, preserveAspectRatio)
     };
 
 } // namespace WebCore