Title: [151985] trunk
Revision
151985
Author
[email protected]
Date
2013-06-26 03:39:50 -0700 (Wed, 26 Jun 2013)

Log Message

Get rid of multiple inheritence for SVGViewElement interface
https://bugs.webkit.org/show_bug.cgi?id=118014

Reviewed by Kentaro Hara.

Source/WebCore:

Web IDL no longer supports multiple inheritence. As per the latest
specification SVGViewElement should only inherit from SVGElement.
'implements' statements are used for the rest. This patch refactors
the IDL files to match the latest specification:
http://www.w3.org/TR/SVG2/linking.html#InterfaceSVGViewElement

Note that there is a WebExposed change as SVGZoomAndPan used to be
exposed on the Window and it is not anymore. SVGZoomAndPan merely
supplements SVGViewElement and should not be exposed to _javascript_
according to the latest specification.

No new tests, covered by existing tests.

* CMakeLists.txt:
* DerivedSources.pri:
* GNUmakefile.list.am:
* svg/SVGExternalResourcesRequired.idl:
* svg/SVGFitToViewBox.idl:
* svg/SVGViewElement.idl:
* svg/SVGZoomAndPan.idl:

LayoutTests:

Update / Rebaseline several SVG test cases now that SVGZoomAndPan interface
is no longer exposed.

* fast/js/global-constructors-attributes-expected.txt:
* platform/efl/fast/js/global-constructors-attributes-expected.txt:
* platform/gtk/fast/js/global-constructors-attributes-expected.txt:
* platform/mac-lion/fast/js/global-constructors-attributes-expected.txt:
* platform/qt/fast/js/global-constructors-attributes-expected.txt:
* svg/custom/global-constructors-expected.txt:
* svg/custom/js-svg-constructors-expected.txt:
* svg/custom/js-svg-constructors.svg:
* svg/custom/script-tests/global-constructors.js:
* svg/dom/SVGViewSpec-defaults-expected.txt:
* svg/dom/SVGViewSpec-expected.txt:
* svg/dom/resources/viewspec-parser.js:
(zoomAndPanToString):
(viewSpecToString):
* svg/dom/script-tests/SVGViewSpec-defaults.js:
* svg/dom/script-tests/SVGViewSpec.js:
(continueTesting):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (151984 => 151985)


--- trunk/LayoutTests/ChangeLog	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/ChangeLog	2013-06-26 10:39:50 UTC (rev 151985)
@@ -1,3 +1,31 @@
+2013-06-26  Christophe Dumez  <[email protected]>
+
+        Get rid of multiple inheritence for SVGViewElement interface
+        https://bugs.webkit.org/show_bug.cgi?id=118014
+
+        Reviewed by Kentaro Hara.
+
+        Update / Rebaseline several SVG test cases now that SVGZoomAndPan interface
+        is no longer exposed.
+
+        * fast/js/global-constructors-attributes-expected.txt:
+        * platform/efl/fast/js/global-constructors-attributes-expected.txt:
+        * platform/gtk/fast/js/global-constructors-attributes-expected.txt:
+        * platform/mac-lion/fast/js/global-constructors-attributes-expected.txt:
+        * platform/qt/fast/js/global-constructors-attributes-expected.txt:
+        * svg/custom/global-constructors-expected.txt:
+        * svg/custom/js-svg-constructors-expected.txt:
+        * svg/custom/js-svg-constructors.svg:
+        * svg/custom/script-tests/global-constructors.js:
+        * svg/dom/SVGViewSpec-defaults-expected.txt:
+        * svg/dom/SVGViewSpec-expected.txt:
+        * svg/dom/resources/viewspec-parser.js:
+        (zoomAndPanToString):
+        (viewSpecToString):
+        * svg/dom/script-tests/SVGViewSpec-defaults.js:
+        * svg/dom/script-tests/SVGViewSpec.js:
+        (continueTesting):
+
 2013-06-25  Krzysztof Czech  <[email protected]>
 
         [AX][ATK] Update accessibility baselines after r151953

Modified: trunk/LayoutTests/fast/js/global-constructors-attributes-expected.txt (151984 => 151985)


--- trunk/LayoutTests/fast/js/global-constructors-attributes-expected.txt	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/fast/js/global-constructors-attributes-expected.txt	2013-06-26 10:39:50 UTC (rev 151985)
@@ -1663,11 +1663,6 @@
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').value is SVGZoomAndPan
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').value is SVGZoomEvent
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/efl/fast/js/global-constructors-attributes-expected.txt (151984 => 151985)


--- trunk/LayoutTests/platform/efl/fast/js/global-constructors-attributes-expected.txt	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/platform/efl/fast/js/global-constructors-attributes-expected.txt	2013-06-26 10:39:50 UTC (rev 151985)
@@ -1743,11 +1743,6 @@
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').value is SVGZoomAndPan
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').value is SVGZoomEvent
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/gtk/fast/js/global-constructors-attributes-expected.txt (151984 => 151985)


--- trunk/LayoutTests/platform/gtk/fast/js/global-constructors-attributes-expected.txt	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/platform/gtk/fast/js/global-constructors-attributes-expected.txt	2013-06-26 10:39:50 UTC (rev 151985)
@@ -1758,11 +1758,6 @@
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').value is SVGZoomAndPan
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').value is SVGZoomEvent
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/mac-lion/fast/js/global-constructors-attributes-expected.txt (151984 => 151985)


--- trunk/LayoutTests/platform/mac-lion/fast/js/global-constructors-attributes-expected.txt	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/platform/mac-lion/fast/js/global-constructors-attributes-expected.txt	2013-06-26 10:39:50 UTC (rev 151985)
@@ -1653,11 +1653,6 @@
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').value is SVGZoomAndPan
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').value is SVGZoomEvent
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/qt/fast/js/global-constructors-attributes-expected.txt (151984 => 151985)


--- trunk/LayoutTests/platform/qt/fast/js/global-constructors-attributes-expected.txt	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/platform/qt/fast/js/global-constructors-attributes-expected.txt	2013-06-26 10:39:50 UTC (rev 151985)
@@ -1593,11 +1593,6 @@
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGViewSpec').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').value is SVGZoomAndPan
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomAndPan').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').value is SVGZoomEvent
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'SVGZoomEvent').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/svg/custom/global-constructors-expected.txt (151984 => 151985)


--- trunk/LayoutTests/svg/custom/global-constructors-expected.txt	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/svg/custom/global-constructors-expected.txt	2013-06-26 10:39:50 UTC (rev 151985)
@@ -29,9 +29,6 @@
 FAIL SVGTransformable.toString() should be [object SVGTransformableConstructor]. Threw exception ReferenceError: Can't find variable: SVGTransformable
 FAIL SVGTests.toString() should be [object SVGTestsConstructor]. Threw exception ReferenceError: Can't find variable: SVGTests
 FAIL SVGLangSpace.toString() should be [object SVGLangSpaceConstructor]. Threw exception ReferenceError: Can't find variable: SVGLangSpace
-FAIL SVGExternalResourcesRequired.toString() should be [object SVGExternalResourcesRequiredConstructor]. Threw exception ReferenceError: Can't find variable: SVGExternalResourcesRequired
-FAIL SVGFitToViewBox.toString() should be [object SVGFitToViewBoxConstructor]. Threw exception ReferenceError: Can't find variable: SVGFitToViewBox
-PASS SVGZoomAndPan.toString() is '[object SVGZoomAndPanConstructor]'
 PASS SVGViewSpec.toString() is '[object SVGViewSpecConstructor]'
 FAIL SVGURIReference.toString() should be [object SVGURIReferenceConstructor]. Threw exception ReferenceError: Can't find variable: SVGURIReference
 FAIL SVGCSSRule.toString() should be [object SVGCSSRuleConstructor]. Threw exception ReferenceError: Can't find variable: SVGCSSRule

Modified: trunk/LayoutTests/svg/custom/js-svg-constructors-expected.txt (151984 => 151985)


--- trunk/LayoutTests/svg/custom/js-svg-constructors-expected.txt	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/svg/custom/js-svg-constructors-expected.txt	2013-06-26 10:39:50 UTC (rev 151985)
@@ -143,6 +143,6 @@
 SVGUnitTypes.SVG_UNIT_TYPE_UNKNOWN PASSED
 SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE PASSED
 SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX PASSED
-SVGZoomAndPan.SVG_ZOOMANDPAN_UNKNOWN PASSED
-SVGZoomAndPan.SVG_ZOOMANDPAN_DISABLE PASSED
-SVGZoomAndPan.SVG_ZOOMANDPAN_MAGNIFY PASSED
+SVGViewElement.SVG_ZOOMANDPAN_UNKNOWN PASSED
+SVGViewElement.SVG_ZOOMANDPAN_DISABLE PASSED
+SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY PASSED

Modified: trunk/LayoutTests/svg/custom/js-svg-constructors.svg (151984 => 151985)


--- trunk/LayoutTests/svg/custom/js-svg-constructors.svg	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/svg/custom/js-svg-constructors.svg	2013-06-26 10:39:50 UTC (rev 151985)
@@ -208,9 +208,9 @@
       expect("SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE", 1);
       expect("SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX", 2);
 
-      expect("SVGZoomAndPan.SVG_ZOOMANDPAN_UNKNOWN", 0);
-      expect("SVGZoomAndPan.SVG_ZOOMANDPAN_DISABLE", 1);
-      expect("SVGZoomAndPan.SVG_ZOOMANDPAN_MAGNIFY", 2);
+      expect("SVGViewElement.SVG_ZOOMANDPAN_UNKNOWN", 0);
+      expect("SVGViewElement.SVG_ZOOMANDPAN_DISABLE", 1);
+      expect("SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY", 2);
     }
   ]]></script>  
 </svg>

Modified: trunk/LayoutTests/svg/custom/script-tests/global-constructors.js (151984 => 151985)


--- trunk/LayoutTests/svg/custom/script-tests/global-constructors.js	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/svg/custom/script-tests/global-constructors.js	2013-06-26 10:39:50 UTC (rev 151985)
@@ -32,9 +32,6 @@
 shouldBeDefined("SVGTransformable");
 shouldBeDefined("SVGTests");
 shouldBeDefined("SVGLangSpace");
-shouldBeDefined("SVGExternalResourcesRequired");
-shouldBeDefined("SVGFitToViewBox");
-shouldBeDefined("SVGZoomAndPan");
 shouldBeDefined("SVGViewSpec");
 shouldBeDefined("SVGURIReference");
 shouldBeDefined("SVGCSSRule");

Modified: trunk/LayoutTests/svg/dom/SVGViewSpec-defaults-expected.txt (151984 => 151985)


--- trunk/LayoutTests/svg/dom/SVGViewSpec-defaults-expected.txt	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/svg/dom/SVGViewSpec-defaults-expected.txt	2013-06-26 10:39:50 UTC (rev 151985)
@@ -7,7 +7,7 @@
 Check initial SVGSVGElement.currentView values on a SVGSVGElement
 PASS currentView.transform.numberOfItems is 0
 PASS currentView.viewTarget is null
-PASS currentView.zoomAndPan is SVGZoomAndPan.SVG_ZOOMANDPAN_MAGNIFY
+PASS currentView.zoomAndPan is SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY
 PASS currentView.viewBox.baseVal.x is 0
 PASS currentView.viewBox.baseVal.y is 0
 PASS currentView.viewBox.baseVal.width is 0
@@ -18,11 +18,11 @@
 PASS currentView.preserveAspectRatioString is "xMidYMid meet"
 PASS currentView.transformString is ""
 PASS currentView.viewTargetString is ""
-PASS currentView.zoomAndPan is SVGZoomAndPan.SVG_ZOOMANDPAN_MAGNIFY
+PASS currentView.zoomAndPan is SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY
 
 Try changing zoomAndPan - none of these will work, as SVGViewSpec is fully readonly - even the animated properties it inherits from parent classes like SVGZoomAndPan/SVGFitToViewBox
-PASS currentView.zoomAndPan = SVGZoomAndPan.SVG_ZOOMANDPAN_DISABLE threw exception Error: NoModificationAllowedError: DOM Exception 7.
-PASS currentView.zoomAndPan is SVGZoomAndPan.SVG_ZOOMANDPAN_MAGNIFY
+PASS currentView.zoomAndPan = SVGViewElement.SVG_ZOOMANDPAN_DISABLE threw exception Error: NoModificationAllowedError: DOM Exception 7.
+PASS currentView.zoomAndPan is SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY
 
 Try changing viewBox - this has no affect on the SVGSVGElement the viewSpec belongs to - it exposed all its properties as read-only
 PASS currentView.viewBox.baseVal.x = 10 threw exception Error: NoModificationAllowedError: DOM Exception 7.

Modified: trunk/LayoutTests/svg/dom/SVGViewSpec-expected.txt (151984 => 151985)


--- trunk/LayoutTests/svg/dom/SVGViewSpec-expected.txt	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/svg/dom/SVGViewSpec-expected.txt	2013-06-26 10:39:50 UTC (rev 151985)
@@ -32,7 +32,7 @@
 PASS currentView.viewTarget is null
 
 Check zoomAndPan value
-PASS currentView.zoomAndPan is SVGZoomAndPan.SVG_ZOOMANDPAN_DISABLE
+PASS currentView.zoomAndPan is SVGViewElement.SVG_ZOOMANDPAN_DISABLE
 
 Check viewBox value
 PASS currentView.viewBox.baseVal.x is 0

Modified: trunk/LayoutTests/svg/dom/resources/viewspec-parser.js (151984 => 151985)


--- trunk/LayoutTests/svg/dom/resources/viewspec-parser.js	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/svg/dom/resources/viewspec-parser.js	2013-06-26 10:39:50 UTC (rev 151985)
@@ -29,9 +29,9 @@
 
 function zoomAndPanToString(zoomAndPan)
 {
-    if (zoomAndPan == SVGZoomAndPan.SVG_ZOOMANDPAN_MAGNIFY)
+    if (zoomAndPan == SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY)
         return "magnify";
-    if (zoomAndPan == SVGZoomAndPan.SVG_ZOOMANDPAN_DISABLE)
+    if (zoomAndPan == SVGViewElement.SVG_ZOOMANDPAN_DISABLE)
         return "disable";
     return "unknown";
 }
@@ -48,7 +48,7 @@
         attributes.push("viewBox(" + viewSpec.viewBoxString + ")");
     if (viewSpec.preserveAspectRatioString && viewSpec.preserveAspectRatioString != "xMidYMid meet")
         attributes.push("preserveAspectRatio(" + viewSpec.preserveAspectRatioString + ")");
-    if (viewSpec.zoomAndPan && viewSpec.zoomAndPan != SVGZoomAndPan.SVG_ZOOMANDPAN_MAGNIFY)
+    if (viewSpec.zoomAndPan && viewSpec.zoomAndPan != SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY)
         attributes.push("zoomAndPan(" + zoomAndPanToString(viewSpec.zoomAndPan) + ")");
     if (viewSpec.viewTargetString)
         attributes.push("viewTarget(" + viewSpec.viewTargetString + ")");

Modified: trunk/LayoutTests/svg/dom/script-tests/SVGViewSpec-defaults.js (151984 => 151985)


--- trunk/LayoutTests/svg/dom/script-tests/SVGViewSpec-defaults.js	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/svg/dom/script-tests/SVGViewSpec-defaults.js	2013-06-26 10:39:50 UTC (rev 151985)
@@ -11,7 +11,7 @@
 debug("Check initial SVGSVGElement.currentView values on a SVGSVGElement");
 shouldBe("currentView.transform.numberOfItems", "0");
 shouldBeNull("currentView.viewTarget");
-shouldBe("currentView.zoomAndPan", "SVGZoomAndPan.SVG_ZOOMANDPAN_MAGNIFY");
+shouldBe("currentView.zoomAndPan", "SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY");
 shouldBe("currentView.viewBox.baseVal.x", "0");
 shouldBe("currentView.viewBox.baseVal.y", "0");
 shouldBe("currentView.viewBox.baseVal.width", "0");
@@ -22,12 +22,12 @@
 shouldBeEqualToString("currentView.preserveAspectRatioString", "xMidYMid meet");
 shouldBeEqualToString("currentView.transformString", "");
 shouldBeEqualToString("currentView.viewTargetString", "");
-shouldBe("currentView.zoomAndPan", "SVGZoomAndPan.SVG_ZOOMANDPAN_MAGNIFY");
+shouldBe("currentView.zoomAndPan", "SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY");
 
 debug("");
 debug("Try changing zoomAndPan - none of these will work, as SVGViewSpec is fully readonly - even the animated properties it inherits from parent classes like SVGZoomAndPan/SVGFitToViewBox");
-shouldThrow("currentView.zoomAndPan = SVGZoomAndPan.SVG_ZOOMANDPAN_DISABLE");
-shouldBe("currentView.zoomAndPan", "SVGZoomAndPan.SVG_ZOOMANDPAN_MAGNIFY");
+shouldThrow("currentView.zoomAndPan = SVGViewElement.SVG_ZOOMANDPAN_DISABLE");
+shouldBe("currentView.zoomAndPan", "SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY");
 
 debug("");
 debug("Try changing viewBox - this has no affect on the SVGSVGElement the viewSpec belongs to - it exposed all its properties as read-only");

Modified: trunk/LayoutTests/svg/dom/script-tests/SVGViewSpec.js (151984 => 151985)


--- trunk/LayoutTests/svg/dom/script-tests/SVGViewSpec.js	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/LayoutTests/svg/dom/script-tests/SVGViewSpec.js	2013-06-26 10:39:50 UTC (rev 151985)
@@ -71,7 +71,7 @@
 
     debug("");
     debug("Check zoomAndPan value");
-    shouldBe("currentView.zoomAndPan", "SVGZoomAndPan.SVG_ZOOMANDPAN_DISABLE");
+    shouldBe("currentView.zoomAndPan", "SVGViewElement.SVG_ZOOMANDPAN_DISABLE");
 
     debug("");
     debug("Check viewBox value");

Modified: trunk/Source/WebCore/CMakeLists.txt (151984 => 151985)


--- trunk/Source/WebCore/CMakeLists.txt	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/Source/WebCore/CMakeLists.txt	2013-06-26 10:39:50 UTC (rev 151985)
@@ -649,6 +649,7 @@
     svg/SVGElementInstanceList.idl
     svg/SVGEllipseElement.idl
     svg/SVGException.idl
+    svg/SVGExternalResourcesRequired.idl
     svg/SVGFEBlendElement.idl
     svg/SVGFEColorMatrixElement.idl
     svg/SVGFEComponentTransferElement.idl
@@ -675,6 +676,7 @@
     svg/SVGFETileElement.idl
     svg/SVGFETurbulenceElement.idl
     svg/SVGFilterElement.idl
+    svg/SVGFitToViewBox.idl
     svg/SVGFontElement.idl
     svg/SVGFontFaceElement.idl
     svg/SVGFontFaceFormatElement.idl

Modified: trunk/Source/WebCore/ChangeLog (151984 => 151985)


--- trunk/Source/WebCore/ChangeLog	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/Source/WebCore/ChangeLog	2013-06-26 10:39:50 UTC (rev 151985)
@@ -1,3 +1,31 @@
+2013-06-26  Christophe Dumez  <[email protected]>
+
+        Get rid of multiple inheritence for SVGViewElement interface
+        https://bugs.webkit.org/show_bug.cgi?id=118014
+
+        Reviewed by Kentaro Hara.
+
+        Web IDL no longer supports multiple inheritence. As per the latest
+        specification SVGViewElement should only inherit from SVGElement.
+        'implements' statements are used for the rest. This patch refactors
+        the IDL files to match the latest specification:
+        http://www.w3.org/TR/SVG2/linking.html#InterfaceSVGViewElement
+
+        Note that there is a WebExposed change as SVGZoomAndPan used to be
+        exposed on the Window and it is not anymore. SVGZoomAndPan merely
+        supplements SVGViewElement and should not be exposed to _javascript_
+        according to the latest specification.
+
+        No new tests, covered by existing tests.
+
+        * CMakeLists.txt:
+        * DerivedSources.pri:
+        * GNUmakefile.list.am:
+        * svg/SVGExternalResourcesRequired.idl:
+        * svg/SVGFitToViewBox.idl:
+        * svg/SVGViewElement.idl:
+        * svg/SVGZoomAndPan.idl:
+
 2013-06-26  Ryosuke Niwa  <[email protected]>
 
         Mark SVG(Circle|Path|Rect)Element::createRenderer() with OVERRIDE

Modified: trunk/Source/WebCore/DerivedSources.pri (151984 => 151985)


--- trunk/Source/WebCore/DerivedSources.pri	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/Source/WebCore/DerivedSources.pri	2013-06-26 10:39:50 UTC (rev 151985)
@@ -532,6 +532,7 @@
     $$PWD/svg/SVGElementInstanceList.idl \
     $$PWD/svg/SVGEllipseElement.idl \
     $$PWD/svg/SVGException.idl \
+    $$PWD/svg/SVGExternalResourcesRequired.idl \
     $$PWD/svg/SVGFEBlendElement.idl \
     $$PWD/svg/SVGFEColorMatrixElement.idl \
     $$PWD/svg/SVGFEComponentTransferElement.idl \
@@ -558,6 +559,7 @@
     $$PWD/svg/SVGFETileElement.idl \
     $$PWD/svg/SVGFETurbulenceElement.idl \
     $$PWD/svg/SVGFilterElement.idl \
+    $$PWD/svg/SVGFitToViewBox.idl \
     $$PWD/svg/SVGFontElement.idl \
     $$PWD/svg/SVGFontFaceElement.idl \
     $$PWD/svg/SVGFontFaceFormatElement.idl \

Modified: trunk/Source/WebCore/GNUmakefile.list.am (151984 => 151985)


--- trunk/Source/WebCore/GNUmakefile.list.am	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2013-06-26 10:39:50 UTC (rev 151985)
@@ -1678,6 +1678,7 @@
 	$(WebCore)/svg/SVGElementInstanceList.idl \
 	$(WebCore)/svg/SVGEllipseElement.idl \
 	$(WebCore)/svg/SVGException.idl \
+	$(WebCore)/svg/SVGExternalResourcesRequired.idl \
 	$(WebCore)/svg/SVGFEBlendElement.idl \
 	$(WebCore)/svg/SVGFEColorMatrixElement.idl \
 	$(WebCore)/svg/SVGFEComponentTransferElement.idl \
@@ -1704,6 +1705,7 @@
 	$(WebCore)/svg/SVGFETileElement.idl \
 	$(WebCore)/svg/SVGFETurbulenceElement.idl \
 	$(WebCore)/svg/SVGFilterElement.idl \
+	$(WebCore)/svg/SVGFitToViewBox.idl \
 	$(WebCore)/svg/SVGFontElement.idl \
 	$(WebCore)/svg/SVGFontFaceElement.idl \
 	$(WebCore)/svg/SVGFontFaceFormatElement.idl \

Modified: trunk/Source/WebCore/svg/SVGExternalResourcesRequired.idl (151984 => 151985)


--- trunk/Source/WebCore/svg/SVGExternalResourcesRequired.idl	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/Source/WebCore/svg/SVGExternalResourcesRequired.idl	2013-06-26 10:39:50 UTC (rev 151985)
@@ -28,7 +28,6 @@
     NoInterfaceObject,
     Conditional=SVG,
     ObjCProtocol,
-    SuppressToJSObject,
 ] interface SVGExternalResourcesRequired { 
     readonly attribute SVGAnimatedBoolean externalResourcesRequired;
 };

Modified: trunk/Source/WebCore/svg/SVGFitToViewBox.idl (151984 => 151985)


--- trunk/Source/WebCore/svg/SVGFitToViewBox.idl	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/Source/WebCore/svg/SVGFitToViewBox.idl	2013-06-26 10:39:50 UTC (rev 151985)
@@ -28,7 +28,6 @@
     NoInterfaceObject,
     Conditional=SVG,
     ObjCProtocol,
-    SuppressToJSObject,
 ] interface SVGFitToViewBox {
     readonly attribute SVGAnimatedRect                viewBox;
     readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;

Modified: trunk/Source/WebCore/svg/SVGViewElement.idl (151984 => 151985)


--- trunk/Source/WebCore/svg/SVGViewElement.idl	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/Source/WebCore/svg/SVGViewElement.idl	2013-06-26 10:39:50 UTC (rev 151985)
@@ -25,10 +25,10 @@
 
 [
     Conditional=SVG
-] interface SVGViewElement : SVGElement,
-                                             SVGExternalResourcesRequired,
-                                             SVGFitToViewBox,
-                                             SVGZoomAndPan {
+] interface SVGViewElement : SVGElement {
     readonly attribute SVGStringList viewTarget;
 };
 
+SVGViewElement implements SVGExternalResourcesRequired;
+SVGViewElement implements SVGFitToViewBox;
+SVGViewElement implements SVGZoomAndPan;

Modified: trunk/Source/WebCore/svg/SVGZoomAndPan.idl (151984 => 151985)


--- trunk/Source/WebCore/svg/SVGZoomAndPan.idl	2013-06-26 08:18:24 UTC (rev 151984)
+++ trunk/Source/WebCore/svg/SVGZoomAndPan.idl	2013-06-26 10:39:50 UTC (rev 151985)
@@ -25,10 +25,9 @@
  */
 
 [
+    NoInterfaceObject,
     Conditional=SVG,
-    ObjCProtocol,
-    SuppressToJSObject,
-    ImplementationLacksVTable
+    ObjCProtocol
 ] interface SVGZoomAndPan {
     const unsigned short SVG_ZOOMANDPAN_UNKNOWN = 0;
     const unsigned short SVG_ZOOMANDPAN_DISABLE = 1;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to