Changeset 203831 in webkit
- Timestamp:
- Jul 28, 2016 1:18:42 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r203820 r203831 1 2016-07-28 Chris Dumez <cdumez@apple.com> 2 3 [Bindings] "length" value of overloaded operations may be wrong 4 https://bugs.webkit.org/show_bug.cgi?id=160303 5 6 Reviewed by Ryosuke Niwa. 7 8 Rebaseline W3C test now that more checks are passing. 9 10 * web-platform-tests/html/dom/interfaces-expected.txt: 11 1 12 2016-07-28 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
r203820 r203831 4905 4905 PASS CanvasRenderingContext2D interface: operation strokeRect(unrestricted double,unrestricted double,unrestricted double,unrestricted double) 4906 4906 PASS CanvasRenderingContext2D interface: operation beginPath() 4907 FAIL CanvasRenderingContext2D interface: operation fill(CanvasFillRule) assert_equals: property has wrong .length expected 0 but got 1 4908 FAIL CanvasRenderingContext2D interface: operation fill(Path2D,CanvasFillRule) assert_equals: property has wrong .length expected 0 but got 1 4909 FAIL CanvasRenderingContext2D interface: operation stroke() assert_equals: property has wrong .length expected 0 but got 1 4910 FAIL CanvasRenderingContext2D interface: operation stroke(Path2D) assert_equals: property has wrong .length expected 0 but got 1 4907 PASS CanvasRenderingContext2D interface: operation fill(CanvasFillRule) 4908 PASS CanvasRenderingContext2D interface: operation fill(Path2D,CanvasFillRule) 4909 PASS CanvasRenderingContext2D interface: operation stroke() 4910 PASS CanvasRenderingContext2D interface: operation stroke(Path2D) 4911 4911 FAIL CanvasRenderingContext2D interface: operation drawSystemFocusRing(Element) assert_own_property: interface prototype object missing non-static operation expected property "drawSystemFocusRing" missing 4912 4912 FAIL CanvasRenderingContext2D interface: operation drawSystemFocusRing(Path2D,Element) assert_own_property: interface prototype object missing non-static operation expected property "drawSystemFocusRing" missing … … 4915 4915 FAIL CanvasRenderingContext2D interface: operation scrollPathIntoView() assert_own_property: interface prototype object missing non-static operation expected property "scrollPathIntoView" missing 4916 4916 FAIL CanvasRenderingContext2D interface: operation scrollPathIntoView(Path2D) assert_own_property: interface prototype object missing non-static operation expected property "scrollPathIntoView" missing 4917 FAIL CanvasRenderingContext2D interface: operation clip(CanvasFillRule) assert_equals: property has wrong .length expected 0 but got 1 4918 FAIL CanvasRenderingContext2D interface: operation clip(Path2D,CanvasFillRule) assert_equals: property has wrong .length expected 0 but got 1 4917 PASS CanvasRenderingContext2D interface: operation clip(CanvasFillRule) 4918 PASS CanvasRenderingContext2D interface: operation clip(Path2D,CanvasFillRule) 4919 4919 FAIL CanvasRenderingContext2D interface: operation resetClip() assert_own_property: interface prototype object missing non-static operation expected property "resetClip" missing 4920 FAIL CanvasRenderingContext2D interface: operation isPointInPath(unrestricted double,unrestricted double,CanvasFillRule) assert_equals: property has wrong .length expected 2 but got 3 4921 FAIL CanvasRenderingContext2D interface: operation isPointInPath(Path2D,unrestricted double,unrestricted double,CanvasFillRule) assert_equals: property has wrong .length expected 2 but got 3 4922 FAIL CanvasRenderingContext2D interface: operation isPointInStroke(unrestricted double,unrestricted double) assert_equals: property has wrong .length expected 2 but got 3 4923 FAIL CanvasRenderingContext2D interface: operation isPointInStroke(Path2D,unrestricted double,unrestricted double) assert_equals: property has wrong .length expected 2 but got 3 4920 PASS CanvasRenderingContext2D interface: operation isPointInPath(unrestricted double,unrestricted double,CanvasFillRule) 4921 PASS CanvasRenderingContext2D interface: operation isPointInPath(Path2D,unrestricted double,unrestricted double,CanvasFillRule) 4922 PASS CanvasRenderingContext2D interface: operation isPointInStroke(unrestricted double,unrestricted double) 4923 PASS CanvasRenderingContext2D interface: operation isPointInStroke(Path2D,unrestricted double,unrestricted double) 4924 4924 PASS CanvasRenderingContext2D interface: operation fillText(DOMString,unrestricted double,unrestricted double,unrestricted double) 4925 4925 PASS CanvasRenderingContext2D interface: operation strokeText(DOMString,unrestricted double,unrestricted double,unrestricted double) -
trunk/Source/WebCore/ChangeLog
r203826 r203831 1 2016-07-28 Chris Dumez <cdumez@apple.com> 2 3 [Bindings] "length" value of overloaded operations may be wrong 4 https://bugs.webkit.org/show_bug.cgi?id=160303 5 6 Reviewed by Ryosuke Niwa. 7 8 "length" value of overloaded operations may be wrong because we fail to 9 account for overloads when computing the length of a function: 10 - https://heycam.github.io/webidl/#es-operations 11 12 No new tests, rebaselined existing test. 13 14 * bindings/scripts/CodeGeneratorJS.pm: 15 (GetFunctionLength): 16 * bindings/scripts/test/JS/JSTestObj.cpp: 17 1 18 2016-07-28 George Ruan <gruan@apple.com> 2 19 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r203707 r203831 1708 1708 my $function = shift; 1709 1709 1710 my $length = 0; 1711 foreach my $parameter (@{$function->parameters}) { 1712 # Abort as soon as we find the first optional parameter as no mandatory 1713 # parameter can follow an optional one. 1714 last if $parameter->isOptional || $parameter->isVariadic; 1715 $length++; 1710 my $getOverloadLength = sub { 1711 my $function = shift; 1712 1713 my $length = 0; 1714 foreach my $parameter (@{$function->parameters}) { 1715 last if $parameter->isOptional || $parameter->isVariadic; 1716 $length++; 1717 } 1718 return $length; 1719 }; 1720 1721 my $length = &$getOverloadLength($function); 1722 foreach my $overload (@{$function->{overloads}}) { 1723 my $newLength = &$getOverloadLength($overload); 1724 $length = $newLength if $newLength < $length; 1716 1725 } 1717 1726 return $length; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r203337 r203831 1249 1249 { 0, 0, NoIntrinsic, { 0, 0 } }, 1250 1250 #endif 1251 { "overloadedMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadedMethod), (intptr_t) ( 2) } },1251 { "overloadedMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadedMethod), (intptr_t) (0) } }, 1252 1252 { "overloadedMethodWithOptionalParameter", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter), (intptr_t) (1) } }, 1253 1253 { "classMethodWithClamp", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionClassMethodWithClamp), (intptr_t) (2) } },
Note: See TracChangeset
for help on using the changeset viewer.