Diff
Modified: trunk/Source/WebCore/ChangeLog (204032 => 204033)
--- trunk/Source/WebCore/ChangeLog 2016-08-02 18:47:14 UTC (rev 204032)
+++ trunk/Source/WebCore/ChangeLog 2016-08-02 19:11:27 UTC (rev 204033)
@@ -1,3 +1,25 @@
+2016-08-02 Chris Dumez <cdu...@apple.com>
+
+ Kill [StrictTypeChecking] IDL extended attribute
+ https://bugs.webkit.org/show_bug.cgi?id=160382
+
+ Reviewed by Darin Adler.
+
+ Kill [StrictTypeChecking] IDL extended attribute. Its only remaining
+ use was on DOMString parameters for a few CanvasRenderingContext2D
+ operations in order to work around a bug in our overload resolution.
+
+ However, as of r204028, we implement the Web IDL overload resolution
+ algorithm and [StrictTypeChecking] is now a no-op and is no longer
+ needed.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateParametersCheckExpression):
+ * bindings/scripts/IDLAttributes.txt:
+ * bindings/scripts/test/TestObj.idl:
+ * bindings/scripts/test/TestTypedefs.idl:
+ * html/canvas/CanvasRenderingContext2D.idl:
+
2016-08-02 Frederic Wang <fw...@igalia.com>
Move parsing of boolean operator properties into MathMLOperatorElement
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (204032 => 204033)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-08-02 18:47:14 UTC (rev 204032)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-08-02 19:11:27 UTC (rev 204033)
@@ -1956,16 +1956,7 @@
my $value = "arg$parameterIndex";
my $type = $parameter->type;
- # For DOMString with StrictTypeChecking only Null, Undefined and Object
- # are accepted for compatibility. Otherwise, no restrictions are made to
- # match the non-overloaded behavior.
- # FIXME: Implement WebIDL overload resolution algorithm.
- if ($type eq "DOMString" || $codeGenerator->IsEnumType($type)) {
- if ($parameter->extendedAttributes->{"StrictTypeChecking"}) {
- push(@andExpression, "(${value}.isUndefinedOrNull() || ${value}.isString() || ${value}.isObject())");
- $usedArguments{$parameterIndex} = 1;
- }
- } elsif ($codeGenerator->IsCallbackInterface($parameter->type)) {
+ if ($codeGenerator->IsCallbackInterface($parameter->type)) {
# For Callbacks only checks if the value is null or object.
if ($codeGenerator->IsFunctionOnlyCallbackInterface($parameter->type)) {
push(@andExpression, "(${value}.isNull() || ${value}.isFunction())");
Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (204032 => 204033)
--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2016-08-02 18:47:14 UTC (rev 204032)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2016-08-02 19:11:27 UTC (rev 204033)
@@ -120,7 +120,6 @@
SetterRaisesExceptionWithMessage
SetterCallWith=ScriptExecutionContext|ScriptState|ScriptArguments|CallStack|ActiveWindow|FirstWindow
SkipVTableValidation
-StrictTypeChecking
SuppressToJSObject
TreatNullAs=EmptyString
TreatReturnedNaNDateAs=Null|NaN
Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (204032 => 204033)
--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl 2016-08-02 18:47:14 UTC (rev 204032)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl 2016-08-02 19:11:27 UTC (rev 204033)
@@ -251,9 +251,9 @@
#if defined(TESTING_JS)
// Overloads
- void overloadedMethod(TestObj? objArg, [StrictTypeChecking] DOMString strArg);
+ void overloadedMethod(TestObj? objArg, DOMString strArg);
void overloadedMethod(TestObj? objArg, optional long longArg);
- void overloadedMethod([StrictTypeChecking] DOMString strArg);
+ void overloadedMethod(DOMString strArg);
void overloadedMethod(long longArg);
void overloadedMethod(TestCallback callback);
void overloadedMethod(DOMStringList? listArg);
Modified: trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl (204032 => 204033)
--- trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl 2016-08-02 18:47:14 UTC (rev 204032)
+++ trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl 2016-08-02 19:11:27 UTC (rev 204033)
@@ -42,7 +42,7 @@
void func(optional ARRAY_OF_LONGS x = []);
- void setShadow(DOUBLE width, DOUBLE height, unrestricted float blur, [StrictTypeChecking] optional STRING color, optional DOUBLE alpha);
+ void setShadow(DOUBLE width, DOUBLE height, unrestricted float blur, optional STRING color, optional DOUBLE alpha);
ULONGLONG methodWithSequenceArg(sequence<SCRIPT_VALUE> sequenceArg);
Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl (204032 => 204033)
--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl 2016-08-02 18:47:14 UTC (rev 204032)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl 2016-08-02 19:11:27 UTC (rev 204033)
@@ -126,12 +126,12 @@
void fillText(DOMString text, unrestricted float x, unrestricted float y, optional unrestricted float maxWidth);
void strokeText(DOMString text, unrestricted float x, unrestricted float y, optional unrestricted float maxWidth);
- void setStrokeColor([StrictTypeChecking] DOMString color, optional unrestricted float alpha);
+ void setStrokeColor(DOMString color, optional unrestricted float alpha);
void setStrokeColor(unrestricted float grayLevel, optional float alpha = 1);
void setStrokeColor(unrestricted float r, unrestricted float g, unrestricted float b, unrestricted float a);
void setStrokeColor(unrestricted float c, unrestricted float m, unrestricted float y, unrestricted float k, unrestricted float a);
- void setFillColor([StrictTypeChecking] DOMString color, optional unrestricted float alpha);
+ void setFillColor(DOMString color, optional unrestricted float alpha);
void setFillColor(unrestricted float grayLevel, optional unrestricted float alpha = 1);
void setFillColor(unrestricted float r, unrestricted float g, unrestricted float b, unrestricted float a);
void setFillColor(unrestricted float c, unrestricted float m, unrestricted float y, unrestricted float k, unrestricted float a);
@@ -160,7 +160,7 @@
optional DOMString compositeOperation = "");
void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur,
- [StrictTypeChecking] optional DOMString color, optional unrestricted float alpha);
+ optional DOMString color, optional unrestricted float alpha);
void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, unrestricted float grayLevel,
optional unrestricted float alpha = 1);
void setShadow(unrestricted float width, unrestricted float height, unrestricted float blur, unrestricted float r,