[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

zimmermann at webkit.org zimmermann at webkit.org
Wed Dec 22 15:22:24 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 5f86bfd499a6bb61c92f33c9d47965a10db9d500
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 2 08:35:42 2010 +0000

    2010-11-02  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Rob Buis.
    
            Convert SVGPreserveAspectRatio to the new SVGPropertyTearOff concept
            https://bugs.webkit.org/show_bug.cgi?id=48822
    
            Convert the next type to use the SVGPropertyTearOffConcept. Just SVGAnimatedTransformList/SVGTransform/SVGStringList are missing.
    
            Tests: svg/dom/SVGAnimatedPreserveAspectRatio.html
                   svg/dom/SVGPreserveAspectRatio.html
    
            * GNUmakefile.am: Add SVGAnimatedPreserveAspectRatio.h to build.
            * WebCore.gypi: Ditto.
            * WebCore.pro: Ditto.
            * WebCore.vcproj/WebCore.vcproj: Ditto.
            * WebCore.xcodeproj/project.pbxproj: Ditto.
            * bindings/scripts/CodeGenerator.pm: Recognize SVGAnimatedPreserveAspectRatio as new style animated type.
            * bindings/scripts/CodeGeneratorJS.pm: Remove special SVGPreserveAspectRatio handling.
            * bindings/scripts/CodeGeneratorObjC.pm: Always include the type wrapped by SVGPropertyTearOff<> - this was missing before, and now become visible as missing include.
            * bindings/scripts/CodeGeneratorV8.pm: Remove special SVGPreserveAspectRatio handling.
            * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGPreserveAspectRatio handling.
            * svg/DeprecatedSVGAnimatedTemplate.h: Ditto.
            * svg/SVGAnimatedPreserveAspectRatio.h: Added.
            * svg/SVGFEImageElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARE_ANIMATED_PROPERTY_NEW/ where SVGPreserveAspectRatio is used.
            * svg/SVGFitToViewBox.cpp:
            (WebCore::SVGFitToViewBox::viewBoxToViewTransform): SVGPreserveAspectRatio::getCTM doesn't need x/y parameters, they were not used anywhere, remove them.
            * svg/SVGFitToViewBox.h: Replace includes by class forwards.
            * svg/SVGImageElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARE_ANIMATED_PROPERTY_NEW/ where SVGPreserveAspectRatio is used.
            * svg/SVGLocatable.cpp: Add SVGNames.h include, to allow Qt to build (thanks ews!).
            * svg/SVGMarkerElement.h: Ditto.
            * svg/SVGPatternElement.h: Ditto.
            * svg/SVGPreserveAspectRatio.cpp: Modernize code, add error handling for align/meetOrSlice covered by the new tests.
            (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
            (WebCore::SVGPreserveAspectRatio::setAlign):
            (WebCore::SVGPreserveAspectRatio::setMeetOrSlice):
            (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
            (WebCore::SVGPreserveAspectRatio::transformRect):
            (WebCore::SVGPreserveAspectRatio::getCTM):
            (WebCore::SVGPreserveAspectRatio::valueAsString):
            * svg/SVGPreserveAspectRatio.h: Reindented header.
            (WebCore::SVGPreserveAspectRatio::align): Inlined.
            (WebCore::SVGPreserveAspectRatio::meetOrSlice): Inlined.
            * svg/SVGPreserveAspectRatio.idl: Enable StrictTypeChecking for the align/meetOrSlice properties.
            * svg/SVGSVGElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARE_ANIMATED_PROPERTY_NEW/ where SVGPreserveAspectRatio is used.
            * svg/SVGStyledTransformableElement.h: Add SVGAnimatedPropertyMacros.h include, needed by efl to build (thanks ews!).
            * svg/SVGSymbolElement.h: Ditto.
            * svg/SVGViewElement.h: Ditto.
            * svg/SVGViewSpec.h: Ditto.
    
    2010-11-02  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Rob Buis.
    
            Convert SVGPreserveAspectRatio to the new SVGPropertyTearOff concept
            https://bugs.webkit.org/show_bug.cgi?id=48822
    
            * svg/dom/SVGAnimatedPreserveAspectRatio-expected.txt: Added.
            * svg/dom/SVGAnimatedPreserveAspectRatio.html: Added.
            * svg/dom/SVGPreserveAspectRatio-expected.txt: Added.
            * svg/dom/SVGPreserveAspectRatio.html: Added.
            * svg/dom/script-tests/SVGAnimatedPreserveAspectRatio.js: Added.
            * svg/dom/script-tests/SVGPreserveAspectRatio.js: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71103 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 81b5236..4deb2da 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-02  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Rob Buis.
+
+        Convert SVGPreserveAspectRatio to the new SVGPropertyTearOff concept
+        https://bugs.webkit.org/show_bug.cgi?id=48822
+
+        * svg/dom/SVGAnimatedPreserveAspectRatio-expected.txt: Added.
+        * svg/dom/SVGAnimatedPreserveAspectRatio.html: Added.
+        * svg/dom/SVGPreserveAspectRatio-expected.txt: Added.
+        * svg/dom/SVGPreserveAspectRatio.html: Added.
+        * svg/dom/script-tests/SVGAnimatedPreserveAspectRatio.js: Added.
+        * svg/dom/script-tests/SVGPreserveAspectRatio.js: Added.
+
 2010-11-01  MORITA Hajime <morrita at google.com>
 
         Unreviewed, added skip entries for platforms where spellchecking
diff --git a/LayoutTests/svg/dom/SVGAnimatedPreserveAspectRatio-expected.txt b/LayoutTests/svg/dom/SVGAnimatedPreserveAspectRatio-expected.txt
new file mode 100644
index 0000000..4ca3994
--- /dev/null
+++ b/LayoutTests/svg/dom/SVGAnimatedPreserveAspectRatio-expected.txt
@@ -0,0 +1,31 @@
+This test checks the SVGAnimatedPreserveAspectRatio API - utilizing the preserveAspectRatio property of SVGSVGElement
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+Check initial preserveAspectRatio value
+PASS svgElement.preserveAspectRatio.toString() is "[object SVGAnimatedPreserveAspectRatio]"
+PASS svgElement.preserveAspectRatio.baseVal.toString() is "[object SVGPreserveAspectRatio]"
+PASS svgElement.preserveAspectRatio.baseVal.align is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMID
+PASS svgElement.preserveAspectRatio.baseVal.meetOrSlice is SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET
+
+Check that preserveAspectRatios are dynamic, caching value in a local variable and modifying it, should take effect
+PASS aspectRef.align is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN
+PASS aspectRef.meetOrSlice is SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE
+PASS svgElement.preserveAspectRatio.baseVal.align is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN
+PASS svgElement.preserveAspectRatio.baseVal.meetOrSlice is SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE
+
+Check that assigning to baseVal has no effect, as no setter is defined
+PASS svgElement.preserveAspectRatio.baseVal = -1 is -1
+PASS svgElement.preserveAspectRatio.baseVal = 'aString' is "aString"
+PASS svgElement.preserveAspectRatio.baseVal = svgElement is svgElement
+
+Check that the preserveAspectRatio align/meetOrSlice remained xMaxYMin/slice, and the baseVal type has not been changed
+PASS svgElement.preserveAspectRatio.baseVal.toString() is "[object SVGPreserveAspectRatio]"
+PASS svgElement.preserveAspectRatio.baseVal.align is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN
+PASS svgElement.preserveAspectRatio.baseVal.meetOrSlice is SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dom/SVGAnimatedPreserveAspectRatio.html b/LayoutTests/svg/dom/SVGAnimatedPreserveAspectRatio.html
new file mode 100644
index 0000000..2516986
--- /dev/null
+++ b/LayoutTests/svg/dom/SVGAnimatedPreserveAspectRatio.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGAnimatedPreserveAspectRatio.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dom/SVGPreserveAspectRatio-expected.txt b/LayoutTests/svg/dom/SVGPreserveAspectRatio-expected.txt
new file mode 100644
index 0000000..852c694
--- /dev/null
+++ b/LayoutTests/svg/dom/SVGPreserveAspectRatio-expected.txt
@@ -0,0 +1,39 @@
+This test checks the SVGPreserveAspectRatio API - utilizing the preserveAspectRatio property of SVGSVGElement
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+Check initial align/meetOrSlice values
+PASS preserveAspectRatio.align is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMID
+PASS preserveAspectRatio.meetOrSlice is SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET
+
+Check assigning align/meetOrSlice values
+PASS preserveAspectRatio.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN
+PASS preserveAspectRatio.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE is SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE
+
+Check assigning invalid align values
+PASS preserveAspectRatio.align = preserveAspectRatio threw exception TypeError: Type error.
+PASS preserveAspectRatio.align = null threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
+PASS preserveAspectRatio.align = 'aString' threw exception TypeError: Type error.
+PASS preserveAspectRatio.align = svgElement threw exception TypeError: Type error.
+PASS preserveAspectRatio.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_UNKNOWN threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
+PASS preserveAspectRatio.align = -1 threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
+PASS preserveAspectRatio.align = 11 threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
+
+Check assigning invalid meetOrSlice values
+PASS preserveAspectRatio.meetOrSlice = preserveAspectRatio threw exception TypeError: Type error.
+PASS preserveAspectRatio.meetOrSlice = null threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
+PASS preserveAspectRatio.meetOrSlice = 'aString' threw exception TypeError: Type error.
+PASS preserveAspectRatio.meetOrSlice = svgElement threw exception TypeError: Type error.
+PASS preserveAspectRatio.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_UNKNOWN threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
+PASS preserveAspectRatio.meetOrSlice = -1 threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
+PASS preserveAspectRatio.meetOrSlice = 3 threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
+
+Check that the preserveAspectRatio remained correct
+PASS preserveAspectRatio.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN
+PASS preserveAspectRatio.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE is SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dom/SVGPreserveAspectRatio.html b/LayoutTests/svg/dom/SVGPreserveAspectRatio.html
new file mode 100644
index 0000000..86c6250
--- /dev/null
+++ b/LayoutTests/svg/dom/SVGPreserveAspectRatio.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGPreserveAspectRatio.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dom/script-tests/SVGAnimatedPreserveAspectRatio.js b/LayoutTests/svg/dom/script-tests/SVGAnimatedPreserveAspectRatio.js
new file mode 100644
index 0000000..ea790d1
--- /dev/null
+++ b/LayoutTests/svg/dom/script-tests/SVGAnimatedPreserveAspectRatio.js
@@ -0,0 +1,34 @@
+description("This test checks the SVGAnimatedPreserveAspectRatio API - utilizing the preserveAspectRatio property of SVGSVGElement");
+
+var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
+
+debug("");
+debug("Check initial preserveAspectRatio value");
+shouldBeEqualToString("svgElement.preserveAspectRatio.toString()", "[object SVGAnimatedPreserveAspectRatio]");
+shouldBeEqualToString("svgElement.preserveAspectRatio.baseVal.toString()", "[object SVGPreserveAspectRatio]");
+shouldBe("svgElement.preserveAspectRatio.baseVal.align", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMID");
+shouldBe("svgElement.preserveAspectRatio.baseVal.meetOrSlice", "SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET");
+
+debug("");
+debug("Check that preserveAspectRatios are dynamic, caching value in a local variable and modifying it, should take effect");
+var aspectRef = svgElement.preserveAspectRatio.baseVal;
+aspectRef.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN;
+aspectRef.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE;
+shouldBe("aspectRef.align", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN");
+shouldBe("aspectRef.meetOrSlice", "SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE");
+shouldBe("svgElement.preserveAspectRatio.baseVal.align", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN");
+shouldBe("svgElement.preserveAspectRatio.baseVal.meetOrSlice", "SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE");
+
+debug("");
+debug("Check that assigning to baseVal has no effect, as no setter is defined");
+shouldBe("svgElement.preserveAspectRatio.baseVal = -1", "-1");
+shouldBeEqualToString("svgElement.preserveAspectRatio.baseVal = 'aString'", "aString");
+shouldBe("svgElement.preserveAspectRatio.baseVal = svgElement", "svgElement");
+
+debug("");
+debug("Check that the preserveAspectRatio align/meetOrSlice remained xMaxYMin/slice, and the baseVal type has not been changed");
+shouldBeEqualToString("svgElement.preserveAspectRatio.baseVal.toString()", "[object SVGPreserveAspectRatio]");
+shouldBe("svgElement.preserveAspectRatio.baseVal.align", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN");
+shouldBe("svgElement.preserveAspectRatio.baseVal.meetOrSlice", "SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE");
+
+successfullyParsed = true;
diff --git a/LayoutTests/svg/dom/script-tests/SVGPreserveAspectRatio.js b/LayoutTests/svg/dom/script-tests/SVGPreserveAspectRatio.js
new file mode 100644
index 0000000..3c9ad2a
--- /dev/null
+++ b/LayoutTests/svg/dom/script-tests/SVGPreserveAspectRatio.js
@@ -0,0 +1,41 @@
+description("This test checks the SVGPreserveAspectRatio API - utilizing the preserveAspectRatio property of SVGSVGElement");
+
+var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
+var preserveAspectRatio = svgElement.preserveAspectRatio.baseVal;
+
+debug("");
+debug("Check initial align/meetOrSlice values");
+shouldBe("preserveAspectRatio.align", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMID");
+shouldBe("preserveAspectRatio.meetOrSlice", "SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET");
+
+debug("");
+debug("Check assigning align/meetOrSlice values");
+shouldBe("preserveAspectRatio.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN");
+shouldBe("preserveAspectRatio.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE", "SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE");
+
+debug("");
+debug("Check assigning invalid align values");
+shouldThrow("preserveAspectRatio.align = preserveAspectRatio");
+shouldThrow("preserveAspectRatio.align = null");
+shouldThrow("preserveAspectRatio.align = 'aString'");
+shouldThrow("preserveAspectRatio.align = svgElement");
+shouldThrow("preserveAspectRatio.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_UNKNOWN");
+shouldThrow("preserveAspectRatio.align = -1");
+shouldThrow("preserveAspectRatio.align = 11"); // SVG_PRESERVEASPECTRATIO_XMAXYMAX + 1 (last value + 1)
+
+debug("");
+debug("Check assigning invalid meetOrSlice values");
+shouldThrow("preserveAspectRatio.meetOrSlice = preserveAspectRatio");
+shouldThrow("preserveAspectRatio.meetOrSlice = null");
+shouldThrow("preserveAspectRatio.meetOrSlice = 'aString'");
+shouldThrow("preserveAspectRatio.meetOrSlice = svgElement");
+shouldThrow("preserveAspectRatio.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_UNKNOWN");
+shouldThrow("preserveAspectRatio.meetOrSlice = -1");
+shouldThrow("preserveAspectRatio.meetOrSlice = 3"); // SVG_MEETORSLICE_SLICE + 1 (last value + 1)
+
+debug("");
+debug("Check that the preserveAspectRatio remained correct");
+shouldBe("preserveAspectRatio.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN");
+shouldBe("preserveAspectRatio.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE", "SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE");
+
+successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 966fd27..3c52de0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,53 @@
+2010-11-02  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Rob Buis.
+
+        Convert SVGPreserveAspectRatio to the new SVGPropertyTearOff concept
+        https://bugs.webkit.org/show_bug.cgi?id=48822
+
+        Convert the next type to use the SVGPropertyTearOffConcept. Just SVGAnimatedTransformList/SVGTransform/SVGStringList are missing.
+
+        Tests: svg/dom/SVGAnimatedPreserveAspectRatio.html
+               svg/dom/SVGPreserveAspectRatio.html
+
+        * GNUmakefile.am: Add SVGAnimatedPreserveAspectRatio.h to build.
+        * WebCore.gypi: Ditto.
+        * WebCore.pro: Ditto.
+        * WebCore.vcproj/WebCore.vcproj: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+        * bindings/scripts/CodeGenerator.pm: Recognize SVGAnimatedPreserveAspectRatio as new style animated type.
+        * bindings/scripts/CodeGeneratorJS.pm: Remove special SVGPreserveAspectRatio handling.
+        * bindings/scripts/CodeGeneratorObjC.pm: Always include the type wrapped by SVGPropertyTearOff<> - this was missing before, and now become visible as missing include.
+        * bindings/scripts/CodeGeneratorV8.pm: Remove special SVGPreserveAspectRatio handling.
+        * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGPreserveAspectRatio handling.
+        * svg/DeprecatedSVGAnimatedTemplate.h: Ditto.
+        * svg/SVGAnimatedPreserveAspectRatio.h: Added.
+        * svg/SVGFEImageElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARE_ANIMATED_PROPERTY_NEW/ where SVGPreserveAspectRatio is used.
+        * svg/SVGFitToViewBox.cpp:
+        (WebCore::SVGFitToViewBox::viewBoxToViewTransform): SVGPreserveAspectRatio::getCTM doesn't need x/y parameters, they were not used anywhere, remove them.
+        * svg/SVGFitToViewBox.h: Replace includes by class forwards.
+        * svg/SVGImageElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARE_ANIMATED_PROPERTY_NEW/ where SVGPreserveAspectRatio is used.
+        * svg/SVGLocatable.cpp: Add SVGNames.h include, to allow Qt to build (thanks ews!).
+        * svg/SVGMarkerElement.h: Ditto.
+        * svg/SVGPatternElement.h: Ditto.
+        * svg/SVGPreserveAspectRatio.cpp: Modernize code, add error handling for align/meetOrSlice covered by the new tests.
+        (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
+        (WebCore::SVGPreserveAspectRatio::setAlign):
+        (WebCore::SVGPreserveAspectRatio::setMeetOrSlice):
+        (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
+        (WebCore::SVGPreserveAspectRatio::transformRect):
+        (WebCore::SVGPreserveAspectRatio::getCTM):
+        (WebCore::SVGPreserveAspectRatio::valueAsString):
+        * svg/SVGPreserveAspectRatio.h: Reindented header.
+        (WebCore::SVGPreserveAspectRatio::align): Inlined.
+        (WebCore::SVGPreserveAspectRatio::meetOrSlice): Inlined.
+        * svg/SVGPreserveAspectRatio.idl: Enable StrictTypeChecking for the align/meetOrSlice properties.
+        * svg/SVGSVGElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARE_ANIMATED_PROPERTY_NEW/ where SVGPreserveAspectRatio is used.
+        * svg/SVGStyledTransformableElement.h: Add SVGAnimatedPropertyMacros.h include, needed by efl to build (thanks ews!).
+        * svg/SVGSymbolElement.h: Ditto.
+        * svg/SVGViewElement.h: Ditto.
+        * svg/SVGViewSpec.h: Ditto.
+
 2010-11-01  MORITA Hajime  <morrita at google.com>
 
         Reviewed by Kent Tamura.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index b424388..983b05e 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -3059,6 +3059,7 @@ webcore_sources += \
 	WebCore/svg/SVGAnimatedPathData.h \
 	WebCore/svg/SVGAnimatedPoints.cpp \
 	WebCore/svg/SVGAnimatedPoints.h \
+	WebCore/svg/SVGAnimatedPreserveAspectRatio.h \
 	WebCore/svg/SVGAnimatedRect.h \
 	WebCore/svg/SVGAnimateElement.cpp \
 	WebCore/svg/SVGAnimateElement.h \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index a7a556a..cb31807 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -3992,6 +3992,7 @@
             'svg/SVGAnimatedPathData.h',
             'svg/SVGAnimatedPoints.cpp',
             'svg/SVGAnimatedPoints.h',
+            'svg/SVGAnimatedPreserveAspectRatio.h',
             'svg/SVGAnimatedRect.h',
             'svg/SVGAnimationElement.cpp',
             'svg/SVGAnimationElement.h',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 44d544d..2a8e22d 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -2382,6 +2382,7 @@ HEADERS += \
     svg/SVGAnimatedNumberList.h \
     svg/SVGAnimatedPathData.h \
     svg/SVGAnimatedPoints.h \
+    svg/SVGAnimatedPreserveAspectRatio.h \
     svg/SVGAnimatedRect.h \
     svg/SVGAnimateElement.h \
     svg/SVGAnimateMotionElement.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index bc1f890..d3e3e7c 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -61664,6 +61664,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\svg\SVGAnimatedPreserveAspectRatio.h"
+				>
+			</File>
+			<File
 				RelativePath="..\svg\SVGAnimatedRect.h"
 				>
 			</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 7637976..0bc0fa6 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -254,6 +254,7 @@
 		08F0BFC61255C53C00075185 /* SVGTextMetrics.h in Headers */ = {isa = PBXBuildFile; fileRef = 08F0BFC11255C53C00075185 /* SVGTextMetrics.h */; };
 		08F2F0091213E61700DCEC48 /* RenderImageResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08F2F0071213E61700DCEC48 /* RenderImageResource.cpp */; };
 		08F2F00A1213E61700DCEC48 /* RenderImageResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 08F2F0081213E61700DCEC48 /* RenderImageResource.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		08FE0BC5127E2AC1000C4FB5 /* SVGAnimatedPreserveAspectRatio.h in Headers */ = {isa = PBXBuildFile; fileRef = 08FE0BC4127E2AC1000C4FB5 /* SVGAnimatedPreserveAspectRatio.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0A4844990CA44CB200B7BD48 /* SoftLinking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A4844980CA44CB200B7BD48 /* SoftLinking.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0AFDAC3D10F5448C00E1F3D2 /* PluginViewBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0B8C56D40F28627F000502E1 /* HTTPHeaderMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B8C56D30F28627F000502E1 /* HTTPHeaderMap.cpp */; };
@@ -6265,6 +6266,7 @@
 		08F2F0081213E61700DCEC48 /* RenderImageResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderImageResource.h; sourceTree = "<group>"; };
 		08FB84B00ECE373300DC064E /* WMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLElementFactory.cpp; sourceTree = "<group>"; };
 		08FB84B10ECE373300DC064E /* WMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLElementFactory.h; sourceTree = "<group>"; };
+		08FE0BC4127E2AC1000C4FB5 /* SVGAnimatedPreserveAspectRatio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPreserveAspectRatio.h; sourceTree = "<group>"; };
 		0A4844980CA44CB200B7BD48 /* SoftLinking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoftLinking.h; sourceTree = "<group>"; };
 		0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginViewBase.h; sourceTree = "<group>"; };
 		0B8C56D30F28627F000502E1 /* HTTPHeaderMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPHeaderMap.cpp; sourceTree = "<group>"; };
@@ -16028,6 +16030,7 @@
 				B22277F10D00BF1F0071B782 /* SVGAnimatedPoints.cpp */,
 				B22277F20D00BF1F0071B782 /* SVGAnimatedPoints.h */,
 				B22277F30D00BF1F0071B782 /* SVGAnimatedPoints.idl */,
+				08FE0BC4127E2AC1000C4FB5 /* SVGAnimatedPreserveAspectRatio.h */,
 				B22277F40D00BF1F0071B782 /* SVGAnimatedPreserveAspectRatio.idl */,
 				08C859BF1274575300A5728D /* SVGAnimatedRect.h */,
 				B22277F50D00BF1F0071B782 /* SVGAnimatedRect.idl */,
@@ -20819,6 +20822,7 @@
 				08B35B17127B6A88005314DD /* SVGAnimatedNumberList.h in Headers */,
 				B22279850D00BF220071B782 /* SVGAnimatedPathData.h in Headers */,
 				B22279880D00BF220071B782 /* SVGAnimatedPoints.h in Headers */,
+				08FE0BC5127E2AC1000C4FB5 /* SVGAnimatedPreserveAspectRatio.h in Headers */,
 				088A0E05126EF1DB00978F7A /* SVGAnimatedProperty.h in Headers */,
 				088A0E06126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h in Headers */,
 				088A0E07126EF1DB00978F7A /* SVGAnimatedPropertyMacros.h in Headers */,
diff --git a/WebCore/bindings/scripts/CodeGenerator.pm b/WebCore/bindings/scripts/CodeGenerator.pm
index 0ef5a77..834ca0d 100644
--- a/WebCore/bindings/scripts/CodeGenerator.pm
+++ b/WebCore/bindings/scripts/CodeGenerator.pm
@@ -51,7 +51,7 @@ my %numericTypeHash = ("int" => 1, "short" => 1, "long" => 1, "long long" => 1,
 my %primitiveTypeHash = ( "boolean" => 1, "void" => 1, "Date" => 1);
 
 my %podTypeHash = ("SVGTransform" => 1);
-my %podTypesWithWritablePropertiesHash = ("SVGMatrix" => 1, "SVGPoint" => 1, "SVGPreserveAspectRatio" => 1);
+my %podTypesWithWritablePropertiesHash = ("SVGMatrix" => 1, "SVGPoint" => 1);
 my %stringTypeHash = ("DOMString" => 1, "AtomicString" => 1);
 
 my %nonPointerTypeHash = ("DOMTimeStamp" => 1, "CompareHow" => 1, "SVGPaintType" => 1);
@@ -60,7 +60,7 @@ my %svgNewStyleAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedBoolean"
                                    "SVGAnimatedEnumeration" => 1, "SVGAnimatedInteger" => 1,
                                    "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1,
                                    "SVGAnimatedNumber" => 1, "SVGAnimatedNumberList" => 1,
-                                   "SVGAnimatedRect" => 1);
+                                   "SVGAnimatedPreserveAspectRatio" => 1, "SVGAnimatedRect" => 1);
 
 my %svgAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1,
                            "SVGAnimatedEnumeration" => 1, "SVGAnimatedInteger" => 1,
@@ -82,6 +82,7 @@ my %svgNativeType = (
     "SVGLengthList" => "SVGListPropertyTearOff<SVGLengthList>",
     "SVGNumber" => "SVGPropertyTearOff<float>",
     "SVGNumberList" => "SVGListPropertyTearOff<SVGNumberList>",
+    "SVGPreserveAspectRatio" => "SVGPropertyTearOff<SVGPreserveAspectRatio>",
     "SVGRect" => "SVGPropertyTearOff<FloatRect>"
 );
 
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 809f79c..5e4a669 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -2456,7 +2456,6 @@ my %nativeType = (
     "IDBKey" => "RefPtr<IDBKey>",
     "SVGMatrix" => "AffineTransform",
     "SVGPaintType" => "SVGPaint::SVGPaintType",
-    "SVGPreserveAspectRatio" => "SVGPreserveAspectRatio",
     "SVGPoint" => "FloatPoint",
     "SVGRect" => "FloatRect",
     "SVGTransform" => "SVGTransform",
diff --git a/WebCore/bindings/scripts/CodeGeneratorObjC.pm b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
index 73abf07..3b6cdf8 100644
--- a/WebCore/bindings/scripts/CodeGeneratorObjC.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
@@ -1137,7 +1137,12 @@ sub GenerateImplementation
         $implIncludes{"$1.h"} = 1;
     } else {
         if (!$podType) {
-            $implIncludes{"$implClassName.h"} = 1 if not $codeGenerator->AvoidInclusionOfType($implClassName);
+            if (!$codeGenerator->AvoidInclusionOfType($implClassName)) {
+                $implIncludes{"$implClassName.h"} = 1 ;
+            } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($implClassName)) {
+                my $includeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
+                $implIncludes{"${includeType}.h"} = 1;
+            }
         } else {
             $implIncludes{"$podType.h"} = 1 unless $podType eq "float";
         }
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 44140fb..d7f320e 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -2972,7 +2972,6 @@ sub GetNativeType
     return "FloatPoint" if $type eq "SVGPoint";
     return "AffineTransform" if $type eq "SVGMatrix";
     return "SVGTransform" if $type eq "SVGTransform";
-    return "SVGPreserveAspectRatio" if $type eq "SVGPreserveAspectRatio";
     return "SVGPaint::SVGPaintType" if $type eq "SVGPaintType";
     return "DOMTimeStamp" if $type eq "DOMTimeStamp";
     return "unsigned" if $type eq "unsigned int";
@@ -3024,7 +3023,6 @@ sub BasicTypeCanFailConversion
 
     return 1 if $type eq "SVGMatrix";
     return 1 if $type eq "SVGPoint";
-    return 1 if $type eq "SVGPreserveAspectRatio";
     return 1 if $type eq "SVGTransform";
     return 0;
 }
diff --git a/WebCore/svg/DeprecatedSVGAnimatedPropertyTraits.h b/WebCore/svg/DeprecatedSVGAnimatedPropertyTraits.h
index 464f01a..66be29c 100644
--- a/WebCore/svg/DeprecatedSVGAnimatedPropertyTraits.h
+++ b/WebCore/svg/DeprecatedSVGAnimatedPropertyTraits.h
@@ -23,7 +23,6 @@
 
 #if ENABLE(SVG)
 #include "PlatformString.h"
-#include "SVGPreserveAspectRatio.h"
 #include "SVGTransformList.h"
 
 namespace WebCore {
@@ -31,18 +30,6 @@ namespace WebCore {
 template<typename Type>
 struct DeprecatedSVGAnimatedPropertyTraits : public Noncopyable { };
 
-// SVGAnimatedPreserveAspectRatio
-template<>
-struct DeprecatedSVGAnimatedPropertyTraits<SVGPreserveAspectRatio> : public Noncopyable {
-    typedef const SVGPreserveAspectRatio& PassType;
-    typedef SVGPreserveAspectRatio ReturnType;
-    typedef SVGPreserveAspectRatio StoredType;
-
-    static ReturnType null() { return SVGPreserveAspectRatio(); }
-    static ReturnType toReturnType(const StoredType& type) { return type; }
-    static String toString(PassType type) { return type.valueAsString(); }
-};
-
 // SVGAnimatedString
 template<>
 struct DeprecatedSVGAnimatedPropertyTraits<String> : public Noncopyable {
diff --git a/WebCore/svg/DeprecatedSVGAnimatedTemplate.h b/WebCore/svg/DeprecatedSVGAnimatedTemplate.h
index c8e23e4..252fa0b 100644
--- a/WebCore/svg/DeprecatedSVGAnimatedTemplate.h
+++ b/WebCore/svg/DeprecatedSVGAnimatedTemplate.h
@@ -23,15 +23,14 @@
 
 #if ENABLE(SVG)
 #include "DeprecatedSVGAnimatedPropertyTraits.h"
+#include "QualifiedName.h"
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>
 
 namespace WebCore {
    
     class SVGElement;
-    class SVGPreserveAspectRatio;
     class SVGTransformList;
-    class QualifiedName;
 
     struct DeprecatedSVGAnimatedTypeWrapperKey {            
         // Empty value
@@ -153,7 +152,6 @@ namespace WebCore {
     }
 
     // Common type definitions, to ease IDL generation.
-    typedef DeprecatedSVGAnimatedTemplate<SVGPreserveAspectRatio> SVGAnimatedPreserveAspectRatio;
     typedef DeprecatedSVGAnimatedTemplate<String> SVGAnimatedString;
     typedef DeprecatedSVGAnimatedTemplate<SVGTransformList*> SVGAnimatedTransformList;
 
diff --git a/WebCore/svg/SVGAnimatedPreserveAspectRatio.h b/WebCore/svg/SVGAnimatedPreserveAspectRatio.h
new file mode 100644
index 0000000..57d8621
--- /dev/null
+++ b/WebCore/svg/SVGAnimatedPreserveAspectRatio.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef SVGAnimatedPreserveAspectRatio_h
+#define SVGAnimatedPreserveAspectRatio_h
+
+#if ENABLE(SVG)
+#include "SVGAnimatedPropertyTearOff.h"
+#include "SVGPreserveAspectRatio.h"
+
+namespace WebCore {
+
+typedef SVGAnimatedPropertyTearOff<SVGPreserveAspectRatio> SVGAnimatedPreserveAspectRatio;
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG)
+#endif
diff --git a/WebCore/svg/SVGFEImageElement.h b/WebCore/svg/SVGFEImageElement.h
index 901cb19..74dfa74 100644
--- a/WebCore/svg/SVGFEImageElement.h
+++ b/WebCore/svg/SVGFEImageElement.h
@@ -56,7 +56,7 @@ private:
 
     void requestImageResource();
 
-    DECLARE_ANIMATED_PROPERTY(SVGFEImageElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+    DECLARE_ANIMATED_PROPERTY_NEW(SVGFEImageElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
 
     // SVGURIReference
     DECLARE_ANIMATED_PROPERTY(SVGFEImageElement, XLinkNames::hrefAttr, String, Href, href)
diff --git a/WebCore/svg/SVGFitToViewBox.cpp b/WebCore/svg/SVGFitToViewBox.cpp
index 5297e8f..e5bd5db 100644
--- a/WebCore/svg/SVGFitToViewBox.cpp
+++ b/WebCore/svg/SVGFitToViewBox.cpp
@@ -27,6 +27,7 @@
 #include "Attr.h"
 #include "Document.h"
 #include "FloatRect.h"
+#include "SVGDocumentExtensions.h"
 #include "SVGNames.h"
 #include "SVGParserUtilities.h"
 #include "SVGPreserveAspectRatio.h"
@@ -85,7 +86,7 @@ AffineTransform SVGFitToViewBox::viewBoxToViewTransform(const FloatRect& viewBox
     if (!viewBoxRect.width() || !viewBoxRect.height())
         return AffineTransform();
 
-    return preserveAspectRatio.getCTM(viewBoxRect.x(), viewBoxRect.y(), viewBoxRect.width(), viewBoxRect.height(), 0, 0, viewWidth, viewHeight);
+    return preserveAspectRatio.getCTM(viewBoxRect.x(), viewBoxRect.y(), viewBoxRect.width(), viewBoxRect.height(), viewWidth, viewHeight);
 }
 
 bool SVGFitToViewBox::parseMappedAttribute(Document* document, Attribute* attr)
diff --git a/WebCore/svg/SVGFitToViewBox.h b/WebCore/svg/SVGFitToViewBox.h
index df41fce..3d62271 100644
--- a/WebCore/svg/SVGFitToViewBox.h
+++ b/WebCore/svg/SVGFitToViewBox.h
@@ -22,12 +22,16 @@
 #define SVGFitToViewBox_h
 
 #if ENABLE(SVG)
-#include "SVGElement.h"
-#include "SVGPreserveAspectRatio.h"
+#include <wtf/text/WTFString.h>
 
 namespace WebCore {
 
 class AffineTransform;
+class Attribute;
+class Document;
+class FloatRect;
+class QualifiedName;
+class SVGPreserveAspectRatio;
 
 class SVGFitToViewBox {
 public:
@@ -40,7 +44,7 @@ public:
     bool isKnownAttribute(const QualifiedName&);
 
     virtual void setViewBoxBaseValue(const FloatRect&) = 0;
-    virtual void setPreserveAspectRatioBaseValue(DeprecatedSVGAnimatedPropertyTraits<SVGPreserveAspectRatio>::PassType) = 0;
+    virtual void setPreserveAspectRatioBaseValue(const SVGPreserveAspectRatio&) = 0;
 
 private:
     bool parseViewBox(Document*, const String&, FloatRect&);
diff --git a/WebCore/svg/SVGImageElement.h b/WebCore/svg/SVGImageElement.h
index ee105d2..33e2f39 100644
--- a/WebCore/svg/SVGImageElement.h
+++ b/WebCore/svg/SVGImageElement.h
@@ -70,7 +70,7 @@ namespace WebCore {
         DECLARE_ANIMATED_PROPERTY_NEW(SVGImageElement, SVGNames::yAttr, SVGLength, Y, y)
         DECLARE_ANIMATED_PROPERTY_NEW(SVGImageElement, SVGNames::widthAttr, SVGLength, Width, width)
         DECLARE_ANIMATED_PROPERTY_NEW(SVGImageElement, SVGNames::heightAttr, SVGLength, Height, height)
-        DECLARE_ANIMATED_PROPERTY(SVGImageElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+        DECLARE_ANIMATED_PROPERTY_NEW(SVGImageElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
 
         // SVGURIReference
         DECLARE_ANIMATED_PROPERTY(SVGImageElement, XLinkNames::hrefAttr, String, Href, href)
diff --git a/WebCore/svg/SVGLocatable.cpp b/WebCore/svg/SVGLocatable.cpp
index 9a823ff..b3dce01 100644
--- a/WebCore/svg/SVGLocatable.cpp
+++ b/WebCore/svg/SVGLocatable.cpp
@@ -26,8 +26,9 @@
 #include "SVGLocatable.h"
 
 #include "RenderObject.h"
-#include "SVGStyledLocatableElement.h"
 #include "SVGException.h"
+#include "SVGNames.h"
+#include "SVGStyledLocatableElement.h"
 
 namespace WebCore {
 
diff --git a/WebCore/svg/SVGMarkerElement.h b/WebCore/svg/SVGMarkerElement.h
index fd67cfc..e84357e 100644
--- a/WebCore/svg/SVGMarkerElement.h
+++ b/WebCore/svg/SVGMarkerElement.h
@@ -89,7 +89,7 @@ private:
 
     // SVGFitToViewBox
     DECLARE_ANIMATED_PROPERTY_NEW(SVGMarkerElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
-    DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+    DECLARE_ANIMATED_PROPERTY_NEW(SVGMarkerElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
 };
 
 }
diff --git a/WebCore/svg/SVGPatternElement.h b/WebCore/svg/SVGPatternElement.h
index 84e0415..79152c8 100644
--- a/WebCore/svg/SVGPatternElement.h
+++ b/WebCore/svg/SVGPatternElement.h
@@ -80,7 +80,7 @@ namespace WebCore {
 
         // SVGPatternElement
         DECLARE_ANIMATED_PROPERTY_NEW(SVGPatternElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
-        DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio) 
+        DECLARE_ANIMATED_PROPERTY_NEW(SVGPatternElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio) 
     };
 
 } // namespace WebCore
diff --git a/WebCore/svg/SVGPreserveAspectRatio.cpp b/WebCore/svg/SVGPreserveAspectRatio.cpp
index a129fe6..c9c452e 100644
--- a/WebCore/svg/SVGPreserveAspectRatio.cpp
+++ b/WebCore/svg/SVGPreserveAspectRatio.cpp
@@ -25,8 +25,9 @@
 #include "SVGPreserveAspectRatio.h"
 
 #include "AffineTransform.h"
+#include "FloatRect.h"
 #include "SVGParserUtilities.h"
-#include "SVGSVGElement.h"
+#include <wtf/text/StringConcatenate.h>
 
 namespace WebCore {
 
@@ -34,27 +35,26 @@ SVGPreserveAspectRatio::SVGPreserveAspectRatio()
     : m_align(SVG_PRESERVEASPECTRATIO_XMIDYMID)
     , m_meetOrSlice(SVG_MEETORSLICE_MEET)
 {
-    // FIXME: Should the two values default to UNKNOWN instead?
 }
 
-void SVGPreserveAspectRatio::setAlign(unsigned short align)
+void SVGPreserveAspectRatio::setAlign(unsigned short align, ExceptionCode& ec)
 {
-    m_align = align;
-}
+    if (align == SVG_PRESERVEASPECTRATIO_UNKNOWN || align > SVG_PRESERVEASPECTRATIO_XMAXYMAX) {
+        ec = NOT_SUPPORTED_ERR;
+        return;
+    }
 
-unsigned short SVGPreserveAspectRatio::align() const
-{
-    return m_align;
+    m_align = static_cast<SVGPreserveAspectRatioType>(align);
 }
 
-void SVGPreserveAspectRatio::setMeetOrSlice(unsigned short meetOrSlice)
+void SVGPreserveAspectRatio::setMeetOrSlice(unsigned short meetOrSlice, ExceptionCode& ec)
 {
-    m_meetOrSlice = meetOrSlice;
-}
+    if (meetOrSlice == SVG_MEETORSLICE_UNKNOWN || meetOrSlice > SVG_MEETORSLICE_SLICE) {
+        ec = NOT_SUPPORTED_ERR;
+        return;
+    }
 
-unsigned short SVGPreserveAspectRatio::meetOrSlice() const
-{
-    return m_meetOrSlice;
+    m_meetOrSlice = static_cast<SVGMeetOrSliceType>(meetOrSlice);
 }
 
 SVGPreserveAspectRatio SVGPreserveAspectRatio::parsePreserveAspectRatio(const UChar*& currParam, const UChar* end, bool validate, bool& result)
@@ -64,6 +64,7 @@ SVGPreserveAspectRatio SVGPreserveAspectRatio::parsePreserveAspectRatio(const UC
     aspectRatio.m_meetOrSlice = SVG_MEETORSLICE_MEET;
     result = false;
 
+    // FIXME: Rewrite this parser, without gotos!
     if (!skipOptionalSpaces(currParam, end))
         goto bail_out;
 
@@ -160,167 +161,184 @@ void SVGPreserveAspectRatio::transformRect(FloatRect& destRect, FloatRect& srcRe
     FloatSize imageSize = srcRect.size();
     float origDestWidth = destRect.width();
     float origDestHeight = destRect.height();
-    if (meetOrSlice() == SVGPreserveAspectRatio::SVG_MEETORSLICE_MEET) {
+    switch (m_meetOrSlice) {
+    case SVGPreserveAspectRatio::SVG_MEETORSLICE_UNKNOWN:
+        break;
+    case SVGPreserveAspectRatio::SVG_MEETORSLICE_MEET:
+    {
         float widthToHeightMultiplier = srcRect.height() / srcRect.width();
-        if (origDestHeight > (origDestWidth * widthToHeightMultiplier)) {
+        if (origDestHeight > origDestWidth * widthToHeightMultiplier) {
             destRect.setHeight(origDestWidth * widthToHeightMultiplier);
-            switch (align()) {
+            switch (m_align) {
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMID:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
-                destRect.setY(destRect.y() + origDestHeight / 2.0f - destRect.height() / 2.0f);
+                destRect.setY(destRect.y() + origDestHeight / 2 - destRect.height() / 2);
                 break;
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMAX:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
                 destRect.setY(destRect.y() + origDestHeight - destRect.height());
                 break;
+            default:
+                break;
             }
         }
-        if (origDestWidth > (origDestHeight / widthToHeightMultiplier)) {
+        if (origDestWidth > origDestHeight / widthToHeightMultiplier) {
             destRect.setWidth(origDestHeight / widthToHeightMultiplier);
-            switch (align()) {
+            switch (m_align) {
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMIN:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
-                destRect.setX(destRect.x() + origDestWidth / 2.0f - destRect.width() / 2.0f);
+                destRect.setX(destRect.x() + origDestWidth / 2 - destRect.width() / 2);
                 break;
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMIN:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
                 destRect.setX(destRect.x() + origDestWidth - destRect.width());
                 break;
+            default:
+                break;
             }
         }
-    } else if (meetOrSlice() == SVGPreserveAspectRatio::SVG_MEETORSLICE_SLICE) {
+        break;
+    }
+    case SVGPreserveAspectRatio::SVG_MEETORSLICE_SLICE:
+    {
         float widthToHeightMultiplier = srcRect.height() / srcRect.width();
         // if the destination height is less than the height of the image we'll be drawing
-        if (origDestHeight < (origDestWidth * widthToHeightMultiplier)) {
+        if (origDestHeight < origDestWidth * widthToHeightMultiplier) {
             float destToSrcMultiplier = srcRect.width() / destRect.width();
             srcRect.setHeight(destRect.height() * destToSrcMultiplier);
-            switch (align()) {
+            switch (m_align) {
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMID:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
-                srcRect.setY(destRect.y() + imageSize.height() / 2.0f - srcRect.height() / 2.0f);
+                srcRect.setY(destRect.y() + imageSize.height() / 2 - srcRect.height() / 2);
                 break;
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMAX:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
                 srcRect.setY(destRect.y() + imageSize.height() - srcRect.height());
                 break;
+            default:
+                break;
             }
         }
         // if the destination width is less than the width of the image we'll be drawing
-        if (origDestWidth < (origDestHeight / widthToHeightMultiplier)) {
+        if (origDestWidth < origDestHeight / widthToHeightMultiplier) {
             float destToSrcMultiplier = srcRect.height() / destRect.height();
             srcRect.setWidth(destRect.width() * destToSrcMultiplier);
-            switch (align()) {
+            switch (m_align) {
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMIN:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX:
-                srcRect.setX(destRect.x() + imageSize.width() / 2.0f - srcRect.width() / 2.0f);
+                srcRect.setX(destRect.x() + imageSize.width() / 2 - srcRect.width() / 2);
                 break;
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMIN:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID:
             case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMAX:
                 srcRect.setX(destRect.x() + imageSize.width() - srcRect.width());
                 break;
+            default:
+                break;
             }
         }
+        break;
+    }
     }
 }
 
-AffineTransform SVGPreserveAspectRatio::getCTM(double logicX, double logicY,
-                                               double logicWidth, double logicHeight,
-                                               double /*physX*/, double /*physY*/,
-                                               double physWidth, double physHeight) const
+// FIXME: We should use floats here, like everywhere else!
+AffineTransform SVGPreserveAspectRatio::getCTM(double logicX, double logicY, double logicWidth, double logicHeight, double physWidth, double physHeight) const
 {
-    AffineTransform temp;
+    AffineTransform transform;
+    if (m_align == SVG_PRESERVEASPECTRATIO_UNKNOWN)
+        return transform;
 
-    if (align() == SVG_PRESERVEASPECTRATIO_UNKNOWN)
-        return temp;
+    double logicalRatio = logicWidth / logicHeight;
+    double physRatio = physWidth / physHeight;
 
-    double vpar = logicWidth / logicHeight;
-    double svgar = physWidth / physHeight;
+    if (m_align == SVG_PRESERVEASPECTRATIO_NONE) {
+        transform.scaleNonUniform(physWidth / logicWidth, physHeight / logicHeight);
+        transform.translate(-logicX, -logicY);
+        return transform;
+    }
 
-    if (align() == SVG_PRESERVEASPECTRATIO_NONE) {
-        temp.scaleNonUniform(physWidth / logicWidth, physHeight / logicHeight);
-        temp.translate(-logicX, -logicY);
-    } else if ((vpar < svgar && (meetOrSlice() == SVG_MEETORSLICE_MEET)) || (vpar >= svgar && (meetOrSlice() == SVG_MEETORSLICE_SLICE))) {
-        temp.scaleNonUniform(physHeight / logicHeight, physHeight / logicHeight);
+    if ((logicalRatio < physRatio && (m_meetOrSlice == SVG_MEETORSLICE_MEET)) || (logicalRatio >= physRatio && (m_meetOrSlice == SVG_MEETORSLICE_SLICE))) {
+        transform.scaleNonUniform(physHeight / logicHeight, physHeight / logicHeight);
 
-        if (align() == SVG_PRESERVEASPECTRATIO_XMINYMIN || align() == SVG_PRESERVEASPECTRATIO_XMINYMID || align() == SVG_PRESERVEASPECTRATIO_XMINYMAX)
-            temp.translate(-logicX, -logicY);
-        else if (align() == SVG_PRESERVEASPECTRATIO_XMIDYMIN || align() == SVG_PRESERVEASPECTRATIO_XMIDYMID || align() == SVG_PRESERVEASPECTRATIO_XMIDYMAX)
-            temp.translate(-logicX - (logicWidth - physWidth * logicHeight / physHeight) / 2, -logicY);
+        if (m_align == SVG_PRESERVEASPECTRATIO_XMINYMIN || m_align == SVG_PRESERVEASPECTRATIO_XMINYMID || m_align == SVG_PRESERVEASPECTRATIO_XMINYMAX)
+            transform.translate(-logicX, -logicY);
+        else if (m_align == SVG_PRESERVEASPECTRATIO_XMIDYMIN || m_align == SVG_PRESERVEASPECTRATIO_XMIDYMID || m_align == SVG_PRESERVEASPECTRATIO_XMIDYMAX)
+            transform.translate(-logicX - (logicWidth - physWidth * logicHeight / physHeight) / 2, -logicY);
         else
-            temp.translate(-logicX - (logicWidth - physWidth * logicHeight / physHeight), -logicY);
-    } else {
-        temp.scaleNonUniform(physWidth / logicWidth, physWidth / logicWidth);
-
-        if (align() == SVG_PRESERVEASPECTRATIO_XMINYMIN || align() == SVG_PRESERVEASPECTRATIO_XMIDYMIN || align() == SVG_PRESERVEASPECTRATIO_XMAXYMIN)
-            temp.translate(-logicX, -logicY);
-        else if (align() == SVG_PRESERVEASPECTRATIO_XMINYMID || align() == SVG_PRESERVEASPECTRATIO_XMIDYMID || align() == SVG_PRESERVEASPECTRATIO_XMAXYMID)
-            temp.translate(-logicX, -logicY - (logicHeight - physHeight * logicWidth / physWidth) / 2);
-        else
-            temp.translate(-logicX, -logicY - (logicHeight - physHeight * logicWidth / physWidth));
+            transform.translate(-logicX - (logicWidth - physWidth * logicHeight / physHeight), -logicY);
+        
+        return transform;
     }
 
-    return temp;
+    transform.scaleNonUniform(physWidth / logicWidth, physWidth / logicWidth);
+
+    if (m_align == SVG_PRESERVEASPECTRATIO_XMINYMIN || m_align == SVG_PRESERVEASPECTRATIO_XMIDYMIN || m_align == SVG_PRESERVEASPECTRATIO_XMAXYMIN)
+        transform.translate(-logicX, -logicY);
+    else if (m_align == SVG_PRESERVEASPECTRATIO_XMINYMID || m_align == SVG_PRESERVEASPECTRATIO_XMIDYMID || m_align == SVG_PRESERVEASPECTRATIO_XMAXYMID)
+        transform.translate(-logicX, -logicY - (logicHeight - physHeight * logicWidth / physWidth) / 2);
+    else
+        transform.translate(-logicX, -logicY - (logicHeight - physHeight * logicWidth / physWidth));
+
+    return transform;
 }
 
 String SVGPreserveAspectRatio::valueAsString() const
 {
-    String result;
+    String alignType;
 
-    switch ((SVGPreserveAspectRatioType) align()) {
-    default:
+    switch (m_align) {
     case SVG_PRESERVEASPECTRATIO_NONE:
-        result = "none";
+        alignType = "none";
         break;
     case SVG_PRESERVEASPECTRATIO_XMINYMIN:
-        result = "xMinYMin";
+        alignType = "xMinYMin";
         break;
     case SVG_PRESERVEASPECTRATIO_XMIDYMIN:
-        result = "xMidYMin";
+        alignType = "xMidYMin";
         break;
     case SVG_PRESERVEASPECTRATIO_XMAXYMIN:
-        result = "xMaxYMin";
+        alignType = "xMaxYMin";
         break;
     case SVG_PRESERVEASPECTRATIO_XMINYMID:
-        result = "xMinYMid";
+        alignType = "xMinYMid";
         break;
     case SVG_PRESERVEASPECTRATIO_XMIDYMID:
-        result = "xMidYMid";
+        alignType = "xMidYMid";
         break;
     case SVG_PRESERVEASPECTRATIO_XMAXYMID:
-        result = "xMaxYMid";
+        alignType = "xMaxYMid";
         break;
     case SVG_PRESERVEASPECTRATIO_XMINYMAX:
-        result = "xMinYMax";
+        alignType = "xMinYMax";
         break;
     case SVG_PRESERVEASPECTRATIO_XMIDYMAX:
-        result = "xMidYMax";
+        alignType = "xMidYMax";
         break;
     case SVG_PRESERVEASPECTRATIO_XMAXYMAX:
-        result = "xMaxYMax";
+        alignType = "xMaxYMax";
+        break;
+    case SVG_PRESERVEASPECTRATIO_UNKNOWN:
+        alignType = "unknown";
         break;
     };
 
-    switch ((SVGMeetOrSliceType) meetOrSlice()) {
+    switch (m_meetOrSlice) {
     default:
     case SVG_MEETORSLICE_UNKNOWN:
-        break;
+        return alignType;
     case SVG_MEETORSLICE_MEET:
-        result += " meet";
-        break;
+        return makeString(alignType, " meet");
     case SVG_MEETORSLICE_SLICE:
-        result += " slice";
-        break;
+        return makeString(alignType, " slice");
     };
-
-    return result;
 }
 
 }
diff --git a/WebCore/svg/SVGPreserveAspectRatio.h b/WebCore/svg/SVGPreserveAspectRatio.h
index f29b7d3..eda82d4 100644
--- a/WebCore/svg/SVGPreserveAspectRatio.h
+++ b/WebCore/svg/SVGPreserveAspectRatio.h
@@ -22,72 +22,70 @@
 #define SVGPreserveAspectRatio_h
 
 #if ENABLE(SVG)
-#include "FloatRect.h"
-#include "PlatformString.h"
-#include "SVGNames.h"
-#include <wtf/Forward.h>
+#include "ExceptionCode.h"
+#include <wtf/text/WTFString.h>
 
 namespace WebCore {
 
-    class AffineTransform;
-
-    class SVGPreserveAspectRatio {
-    public:
-        enum SVGPreserveAspectRatioType {
-            SVG_PRESERVEASPECTRATIO_UNKNOWN     = 0,
-            SVG_PRESERVEASPECTRATIO_NONE        = 1,
-            SVG_PRESERVEASPECTRATIO_XMINYMIN    = 2,
-            SVG_PRESERVEASPECTRATIO_XMIDYMIN    = 3,
-            SVG_PRESERVEASPECTRATIO_XMAXYMIN    = 4,
-            SVG_PRESERVEASPECTRATIO_XMINYMID    = 5,
-            SVG_PRESERVEASPECTRATIO_XMIDYMID    = 6,
-            SVG_PRESERVEASPECTRATIO_XMAXYMID    = 7,
-            SVG_PRESERVEASPECTRATIO_XMINYMAX    = 8,
-            SVG_PRESERVEASPECTRATIO_XMIDYMAX    = 9,
-            SVG_PRESERVEASPECTRATIO_XMAXYMAX    = 10
-        };
-
-        enum SVGMeetOrSliceType {
-            SVG_MEETORSLICE_UNKNOWN    = 0,
-            SVG_MEETORSLICE_MEET       = 1,
-            SVG_MEETORSLICE_SLICE      = 2
-        };
-
-        SVGPreserveAspectRatio();
-
-        void setAlign(unsigned short);
-        unsigned short align() const;
-
-        void setMeetOrSlice(unsigned short);
-        unsigned short meetOrSlice() const;
-
-        void transformRect(FloatRect& destRect, FloatRect& srcRect);
-        
-        AffineTransform getCTM(double logicX, double logicY,
-                               double logicWidth, double logicHeight,
-                               double physX, double physY,
-                               double physWidth, double physHeight) const;
-
-        template<class Consumer>
-        static bool parsePreserveAspectRatio(Consumer* consumer, const String& value, bool validate = true)
-        {
-            bool result = false;
-            const UChar* begin = value.characters();
-            const UChar* end = begin + value.length();
-            consumer->setPreserveAspectRatioBaseValue(parsePreserveAspectRatio(begin, end, validate, result));
-            return result;
-        }
-
-        // It's recommended to use the method above, only SVGViewSpec needs this parsing method
-        static SVGPreserveAspectRatio parsePreserveAspectRatio(const UChar*& currParam, const UChar* end, bool validate, bool& result);
-
-        String valueAsString() const;
-
-    private:
-        unsigned short m_align;
-        unsigned short m_meetOrSlice;
+class AffineTransform;
+class FloatRect;
+
+class SVGPreserveAspectRatio {
+public:
+    enum SVGPreserveAspectRatioType {
+        SVG_PRESERVEASPECTRATIO_UNKNOWN = 0,
+        SVG_PRESERVEASPECTRATIO_NONE = 1,
+        SVG_PRESERVEASPECTRATIO_XMINYMIN = 2,
+        SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3,
+        SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4,
+        SVG_PRESERVEASPECTRATIO_XMINYMID = 5,
+        SVG_PRESERVEASPECTRATIO_XMIDYMID = 6,
+        SVG_PRESERVEASPECTRATIO_XMAXYMID = 7,
+        SVG_PRESERVEASPECTRATIO_XMINYMAX = 8,
+        SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9,
+        SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10
     };
 
+    enum SVGMeetOrSliceType {
+        SVG_MEETORSLICE_UNKNOWN = 0,
+        SVG_MEETORSLICE_MEET = 1,
+        SVG_MEETORSLICE_SLICE = 2
+    };
+
+    SVGPreserveAspectRatio();
+
+    void setAlign(unsigned short align, ExceptionCode&);
+    unsigned short align() const { return m_align; }
+
+    void setMeetOrSlice(unsigned short, ExceptionCode&);
+    unsigned short meetOrSlice() const { return m_meetOrSlice; }
+
+    void transformRect(FloatRect& destRect, FloatRect& srcRect);
+
+    AffineTransform getCTM(double logicX, double logicY,
+                           double logicWidth, double logicHeight,
+                           double physWidth, double physHeight) const;
+
+    template<class Consumer>
+    static bool parsePreserveAspectRatio(Consumer* consumer, const String& value, bool validate = true)
+    {
+        bool result = false;
+        const UChar* begin = value.characters();
+        const UChar* end = begin + value.length();
+        consumer->setPreserveAspectRatioBaseValue(parsePreserveAspectRatio(begin, end, validate, result));
+        return result;
+    }
+
+    // It's recommended to use the method above, only SVGViewSpec needs this parsing method
+    static SVGPreserveAspectRatio parsePreserveAspectRatio(const UChar*& currParam, const UChar* end, bool validate, bool& result);
+
+    String valueAsString() const;
+
+private:
+    SVGPreserveAspectRatioType m_align;
+    SVGMeetOrSliceType m_meetOrSlice;
+};
+
 } // namespace WebCore
 
 #endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGPreserveAspectRatio.idl b/WebCore/svg/SVGPreserveAspectRatio.idl
index 7537e9b..80696e7 100644
--- a/WebCore/svg/SVGPreserveAspectRatio.idl
+++ b/WebCore/svg/SVGPreserveAspectRatio.idl
@@ -25,10 +25,10 @@
 
 module svg {
 
-    interface [Conditional=SVG, PODType=SVGPreserveAspectRatio] SVGPreserveAspectRatio {
+    interface [Conditional=SVG] SVGPreserveAspectRatio {
         // Alignment Types
-        const unsigned short SVG_PRESERVEASPECTRATIO_UNKNOWN  = 0;
-        const unsigned short SVG_PRESERVEASPECTRATIO_NONE     = 1;
+        const unsigned short SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
+        const unsigned short SVG_PRESERVEASPECTRATIO_NONE = 1;
         const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
         const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
         const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
@@ -38,15 +38,17 @@ module svg {
         const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
         const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
         const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;
+
         // Meet-or-slice Types
-        const unsigned short SVG_MEETORSLICE_UNKNOWN   = 0;
-        const unsigned short SVG_MEETORSLICE_MEET      = 1;
-        const unsigned short SVG_MEETORSLICE_SLICE     = 2;
+        const unsigned short SVG_MEETORSLICE_UNKNOWN = 0;
+        const unsigned short SVG_MEETORSLICE_MEET = 1;
+        const unsigned short SVG_MEETORSLICE_SLICE = 2;
+
+        attribute [StrictTypeChecking] unsigned short align
+            setter raises(DOMException);
 
-                 attribute unsigned short align
-                     /*setter raises(DOMException)*/;
-                 attribute unsigned short meetOrSlice
-                     /*setter raises(DOMException)*/;
+        attribute [StrictTypeChecking] unsigned short meetOrSlice
+            setter raises(DOMException);
     };
 
 }
diff --git a/WebCore/svg/SVGSVGElement.h b/WebCore/svg/SVGSVGElement.h
index b2a5812..804c5ec 100644
--- a/WebCore/svg/SVGSVGElement.h
+++ b/WebCore/svg/SVGSVGElement.h
@@ -147,7 +147,7 @@ namespace WebCore {
 
         // SVGFitToViewBox
         DECLARE_ANIMATED_PROPERTY_NEW(SVGSVGElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
-        DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+        DECLARE_ANIMATED_PROPERTY_NEW(SVGSVGElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
  
         virtual void documentWillBecomeInactive();
         virtual void documentDidBecomeActive();
diff --git a/WebCore/svg/SVGStyledTransformableElement.h b/WebCore/svg/SVGStyledTransformableElement.h
index 5349cfa..f6309dd 100644
--- a/WebCore/svg/SVGStyledTransformableElement.h
+++ b/WebCore/svg/SVGStyledTransformableElement.h
@@ -23,6 +23,7 @@
 
 #if ENABLE(SVG)
 #include "Path.h"
+#include "SVGAnimatedPropertyMacros.h"
 #include "SVGStyledLocatableElement.h"
 #include "SVGTransformable.h"
 
diff --git a/WebCore/svg/SVGSymbolElement.h b/WebCore/svg/SVGSymbolElement.h
index 6c561f2..1aa7cbf 100644
--- a/WebCore/svg/SVGSymbolElement.h
+++ b/WebCore/svg/SVGSymbolElement.h
@@ -52,7 +52,7 @@ namespace WebCore {
  
         // SVGFitToViewBox
         DECLARE_ANIMATED_PROPERTY_NEW(SVGSymbolElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
-        DECLARE_ANIMATED_PROPERTY(SVGSymbolElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio) 
+        DECLARE_ANIMATED_PROPERTY_NEW(SVGSymbolElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio) 
     };
 
 } // namespace WebCore
diff --git a/WebCore/svg/SVGViewElement.h b/WebCore/svg/SVGViewElement.h
index f0e756f..4c14900 100644
--- a/WebCore/svg/SVGViewElement.h
+++ b/WebCore/svg/SVGViewElement.h
@@ -53,7 +53,7 @@ namespace WebCore {
  
         // SVGFitToViewBox
         DECLARE_ANIMATED_PROPERTY_NEW(SVGViewElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
-        DECLARE_ANIMATED_PROPERTY(SVGViewElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+        DECLARE_ANIMATED_PROPERTY_NEW(SVGViewElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
  
         mutable RefPtr<SVGStringList> m_viewTarget;
     };
diff --git a/WebCore/svg/SVGViewSpec.h b/WebCore/svg/SVGViewSpec.h
index 6fcc94e..f557d23 100644
--- a/WebCore/svg/SVGViewSpec.h
+++ b/WebCore/svg/SVGViewSpec.h
@@ -59,7 +59,7 @@ namespace WebCore {
 
         // SVGFitToViewBox
         DECLARE_ANIMATED_PROPERTY_NEW(SVGViewSpec, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
-        DECLARE_ANIMATED_PROPERTY(SVGViewSpec, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
+        DECLARE_ANIMATED_PROPERTY_NEW(SVGViewSpec, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
 
         mutable RefPtr<SVGTransformList> m_transform;
         String m_viewTargetString;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list