Title: [199371] trunk/Source/WebCore
Revision
199371
Author
[email protected]
Date
2016-04-12 10:08:31 -0700 (Tue, 12 Apr 2016)

Log Message

Remove UsePointersEvenForNonNullableObjectArguments from SVG lists
https://bugs.webkit.org/show_bug.cgi?id=156494

Reviewed by Chris Dumez.

* bindings/scripts/CodeGenerator.pm:
(ShouldPassWrapperByReference): For now, don't do this for any tear-off classes.
This includes the items stored in most SVG list classes.

* svg/SVGLengthList.idl: Removed UsePointersEvenForNonNullableObjectArguments.
* svg/SVGNumberList.idl: Ditto.
* svg/SVGPointList.idl: Ditto.
* svg/SVGTransformList.idl: Ditto.

* svg/SVGPathSegList.idl: Removed UsePointersEvenForNonNullableObjectArguments.
Marked the arguments nullable, and added FIXMEs about returning later since they
don't really need to be nullable. But fixing this requires some reworking of the
SVG list template and it's not urgent at this time. Preserves behavior where we
get an exception when passing null, it's just an SVG exception instead of TypeError.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (199370 => 199371)


--- trunk/Source/WebCore/ChangeLog	2016-04-12 16:58:29 UTC (rev 199370)
+++ trunk/Source/WebCore/ChangeLog	2016-04-12 17:08:31 UTC (rev 199371)
@@ -1,3 +1,25 @@
+2016-04-12  Darin Adler  <[email protected]>
+
+        Remove UsePointersEvenForNonNullableObjectArguments from SVG lists
+        https://bugs.webkit.org/show_bug.cgi?id=156494
+
+        Reviewed by Chris Dumez.
+
+        * bindings/scripts/CodeGenerator.pm:
+        (ShouldPassWrapperByReference): For now, don't do this for any tear-off classes.
+        This includes the items stored in most SVG list classes.
+
+        * svg/SVGLengthList.idl: Removed UsePointersEvenForNonNullableObjectArguments.
+        * svg/SVGNumberList.idl: Ditto.
+        * svg/SVGPointList.idl: Ditto.
+        * svg/SVGTransformList.idl: Ditto.
+
+        * svg/SVGPathSegList.idl: Removed UsePointersEvenForNonNullableObjectArguments.
+        Marked the arguments nullable, and added FIXMEs about returning later since they
+        don't really need to be nullable. But fixing this requires some reworking of the
+        SVG list template and it's not urgent at this time. Preserves behavior where we
+        get an exception when passing null, it's just an SVG exception instead of TypeError.
+
 2016-04-12  Chris Dumez  <[email protected]>
 
         Lazily update tokens in DOMTokenList when the associated attribute value changes

Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (199370 => 199371)


--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm	2016-04-12 16:58:29 UTC (rev 199370)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm	2016-04-12 17:08:31 UTC (rev 199371)
@@ -896,6 +896,7 @@
     return 0 if $parameter->isNullable;
     return 0 if $parameter->isOptional and $parameter->extendedAttributes->{"Default"} and $parameter->extendedAttributes->{"Default"} eq "Undefined";
     return 0 if !$object->IsWrapperType($parameter->type) && !$object->IsTypedArrayType($parameter->type);
+    return 0 if $object->IsSVGTypeNeedingTearOff($parameter->type);
     return 0 if $interface->extendedAttributes->{"UsePointersEvenForNonNullableObjectArguments"};
     return 1;
 }

Modified: trunk/Source/WebCore/svg/SVGLengthList.idl (199370 => 199371)


--- trunk/Source/WebCore/svg/SVGLengthList.idl	2016-04-12 16:58:29 UTC (rev 199370)
+++ trunk/Source/WebCore/svg/SVGLengthList.idl	2016-04-12 17:08:31 UTC (rev 199371)
@@ -23,9 +23,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
-[
-    UsePointersEvenForNonNullableObjectArguments,
-] interface SVGLengthList { 
+
+interface SVGLengthList {
     readonly attribute unsigned long numberOfItems;
 
     [RaisesException] void clear();
@@ -36,4 +35,3 @@
     [StrictTypeChecking, RaisesException] SVGLength removeItem(unsigned long index);
     [StrictTypeChecking, RaisesException] SVGLength appendItem(SVGLength item);
 };
-

Modified: trunk/Source/WebCore/svg/SVGNumberList.idl (199370 => 199371)


--- trunk/Source/WebCore/svg/SVGNumberList.idl	2016-04-12 16:58:29 UTC (rev 199370)
+++ trunk/Source/WebCore/svg/SVGNumberList.idl	2016-04-12 17:08:31 UTC (rev 199371)
@@ -23,9 +23,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
-[
-    UsePointersEvenForNonNullableObjectArguments,
-] interface SVGNumberList {
+
+interface SVGNumberList {
     readonly attribute unsigned long numberOfItems;
 
     [RaisesException] void clear();
@@ -36,4 +35,3 @@
     [StrictTypeChecking, RaisesException] SVGNumber removeItem(unsigned long index);
     [StrictTypeChecking, RaisesException] SVGNumber appendItem(SVGNumber item);
 };
-

Modified: trunk/Source/WebCore/svg/SVGPathSegList.idl (199370 => 199371)


--- trunk/Source/WebCore/svg/SVGPathSegList.idl	2016-04-12 16:58:29 UTC (rev 199370)
+++ trunk/Source/WebCore/svg/SVGPathSegList.idl	2016-04-12 17:08:31 UTC (rev 199371)
@@ -23,17 +23,15 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
-[
-    UsePointersEvenForNonNullableObjectArguments,
-] interface SVGPathSegList {
+
+interface SVGPathSegList {
     readonly attribute unsigned long numberOfItems;
 
     [RaisesException] void clear();
-    [StrictTypeChecking, RaisesException] SVGPathSeg initialize(SVGPathSeg newItem);
+    [StrictTypeChecking, RaisesException] SVGPathSeg initialize(SVGPathSeg? newItem); // FIXME: Should not be nullable.
     [StrictTypeChecking, RaisesException] SVGPathSeg getItem(unsigned long index);
-    [StrictTypeChecking, RaisesException] SVGPathSeg insertItemBefore(SVGPathSeg newItem, unsigned long index);
-    [StrictTypeChecking, RaisesException] SVGPathSeg replaceItem(SVGPathSeg newItem, unsigned long index);
+    [StrictTypeChecking, RaisesException] SVGPathSeg insertItemBefore(SVGPathSeg? newItem, unsigned long index); // FIXME: Should not be nullable.
+    [StrictTypeChecking, RaisesException] SVGPathSeg replaceItem(SVGPathSeg? newItem, unsigned long index); // FIXME: Should not be nullable.
     [StrictTypeChecking, RaisesException] SVGPathSeg removeItem(unsigned long index);
-    [StrictTypeChecking, RaisesException] SVGPathSeg appendItem(SVGPathSeg newItem);
+    [StrictTypeChecking, RaisesException] SVGPathSeg appendItem(SVGPathSeg? newItem); // FIXME: Should not be nullable.
 };
-

Modified: trunk/Source/WebCore/svg/SVGPointList.idl (199370 => 199371)


--- trunk/Source/WebCore/svg/SVGPointList.idl	2016-04-12 16:58:29 UTC (rev 199370)
+++ trunk/Source/WebCore/svg/SVGPointList.idl	2016-04-12 17:08:31 UTC (rev 199371)
@@ -22,9 +22,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
-[
-    UsePointersEvenForNonNullableObjectArguments,
-] interface SVGPointList {
+
+interface SVGPointList {
     readonly attribute unsigned long numberOfItems;
 
     [RaisesException] void clear();
@@ -35,4 +34,3 @@
     [StrictTypeChecking, RaisesException] SVGPoint removeItem(unsigned long index);
     [StrictTypeChecking, RaisesException] SVGPoint appendItem(SVGPoint item);
 };
-

Modified: trunk/Source/WebCore/svg/SVGTransformList.idl (199370 => 199371)


--- trunk/Source/WebCore/svg/SVGTransformList.idl	2016-04-12 16:58:29 UTC (rev 199370)
+++ trunk/Source/WebCore/svg/SVGTransformList.idl	2016-04-12 17:08:31 UTC (rev 199371)
@@ -23,9 +23,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
-[
-    UsePointersEvenForNonNullableObjectArguments,
-] interface SVGTransformList {
+
+interface SVGTransformList {
     readonly attribute unsigned long numberOfItems;
 
     [RaisesException] void clear();
@@ -40,4 +39,3 @@
 
     [RaisesException] SVGTransform consolidate();
 };
-
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to