Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (196893 => 196894)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-02-22 06:28:42 UTC (rev 196894)
@@ -1,5 +1,18 @@
2016-02-21 Chris Dumez <[email protected]>
+ HTMLScriptElement.crossOrigin / HTMLImageElement.crossOrigin should only return known values
+ https://bugs.webkit.org/show_bug.cgi?id=154502
+
+ Reviewed by Darin Adler.
+
+ Rebaseline now that more checks are passing.
+
+ * web-platform-tests/html/dom/interfaces-expected.txt:
+ * web-platform-tests/html/dom/reflection-embedded-expected.txt:
+ * web-platform-tests/html/dom/reflection-misc-expected.txt:
+
+2016-02-21 Chris Dumez <[email protected]>
+
Make HTMLSelectElement.size behave as per the specification
https://bugs.webkit.org/show_bug.cgi?id=154504
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt (196893 => 196894)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt 2016-02-22 06:28:42 UTC (rev 196894)
@@ -850,133 +850,133 @@
PASS img.srcset: IDL set to object "test-valueOf" should not throw
PASS img.srcset: IDL set to object "test-valueOf" followed by getAttribute()
PASS img.srcset: IDL set to object "test-valueOf" followed by IDL get
-FAIL img.crossOrigin: typeof IDL attribute assert_equals: expected "object" but got "string"
-FAIL img.crossOrigin: IDL get with DOM attribute unset assert_equals: expected (object) null but got (string) ""
+PASS img.crossOrigin: typeof IDL attribute
+PASS img.crossOrigin: IDL get with DOM attribute unset
PASS img.crossOrigin: setAttribute() to "" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "" followed by IDL get assert_equals: expected "anonymous" but got ""
+PASS img.crossOrigin: setAttribute() to "" followed by IDL get
PASS img.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get assert_equals: expected "anonymous" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo "
+PASS img.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get
PASS img.crossOrigin: setAttribute() to undefined followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to undefined followed by IDL get assert_equals: expected "anonymous" but got "undefined"
+PASS img.crossOrigin: setAttribute() to undefined followed by IDL get
PASS img.crossOrigin: setAttribute() to 7 followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to 7 followed by IDL get assert_equals: expected "anonymous" but got "7"
+PASS img.crossOrigin: setAttribute() to 7 followed by IDL get
PASS img.crossOrigin: setAttribute() to 1.5 followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to 1.5 followed by IDL get assert_equals: expected "anonymous" but got "1.5"
+PASS img.crossOrigin: setAttribute() to 1.5 followed by IDL get
PASS img.crossOrigin: setAttribute() to true followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to true followed by IDL get assert_equals: expected "anonymous" but got "true"
+PASS img.crossOrigin: setAttribute() to true followed by IDL get
PASS img.crossOrigin: setAttribute() to false followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to false followed by IDL get assert_equals: expected "anonymous" but got "false"
+PASS img.crossOrigin: setAttribute() to false followed by IDL get
PASS img.crossOrigin: setAttribute() to object "[object Object]" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to object "[object Object]" followed by IDL get assert_equals: expected "anonymous" but got "[object Object]"
+PASS img.crossOrigin: setAttribute() to object "[object Object]" followed by IDL get
PASS img.crossOrigin: setAttribute() to NaN followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to NaN followed by IDL get assert_equals: expected "anonymous" but got "NaN"
+PASS img.crossOrigin: setAttribute() to NaN followed by IDL get
PASS img.crossOrigin: setAttribute() to Infinity followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to Infinity followed by IDL get assert_equals: expected "anonymous" but got "Infinity"
+PASS img.crossOrigin: setAttribute() to Infinity followed by IDL get
PASS img.crossOrigin: setAttribute() to -Infinity followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to -Infinity followed by IDL get assert_equals: expected "anonymous" but got "-Infinity"
+PASS img.crossOrigin: setAttribute() to -Infinity followed by IDL get
PASS img.crossOrigin: setAttribute() to "\0" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "\0" followed by IDL get assert_equals: expected "anonymous" but got "\0"
+PASS img.crossOrigin: setAttribute() to "\0" followed by IDL get
PASS img.crossOrigin: setAttribute() to null followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to null followed by IDL get assert_equals: expected "anonymous" but got "null"
+PASS img.crossOrigin: setAttribute() to null followed by IDL get
PASS img.crossOrigin: setAttribute() to object "test-toString" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to object "test-toString" followed by IDL get assert_equals: expected "anonymous" but got "test-toString"
+PASS img.crossOrigin: setAttribute() to object "test-toString" followed by IDL get
PASS img.crossOrigin: setAttribute() to object "test-valueOf" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to object "test-valueOf" followed by IDL get assert_equals: expected "anonymous" but got "test-valueOf"
+PASS img.crossOrigin: setAttribute() to object "test-valueOf" followed by IDL get
PASS img.crossOrigin: setAttribute() to "anonymous" followed by getAttribute()
PASS img.crossOrigin: setAttribute() to "anonymous" followed by IDL get
PASS img.crossOrigin: setAttribute() to "xanonymous" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "xanonymous" followed by IDL get assert_equals: expected "anonymous" but got "xanonymous"
+PASS img.crossOrigin: setAttribute() to "xanonymous" followed by IDL get
PASS img.crossOrigin: setAttribute() to "anonymous\0" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "anonymous\0" followed by IDL get assert_equals: expected "anonymous" but got "anonymous\0"
+PASS img.crossOrigin: setAttribute() to "anonymous\0" followed by IDL get
PASS img.crossOrigin: setAttribute() to "nonymous" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "nonymous" followed by IDL get assert_equals: expected "anonymous" but got "nonymous"
+PASS img.crossOrigin: setAttribute() to "nonymous" followed by IDL get
PASS img.crossOrigin: setAttribute() to "ANONYMOUS" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "ANONYMOUS" followed by IDL get assert_equals: expected "anonymous" but got "ANONYMOUS"
+PASS img.crossOrigin: setAttribute() to "ANONYMOUS" followed by IDL get
PASS img.crossOrigin: setAttribute() to "use-credentials" followed by getAttribute()
PASS img.crossOrigin: setAttribute() to "use-credentials" followed by IDL get
PASS img.crossOrigin: setAttribute() to "xuse-credentials" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "xuse-credentials" followed by IDL get assert_equals: expected "anonymous" but got "xuse-credentials"
+PASS img.crossOrigin: setAttribute() to "xuse-credentials" followed by IDL get
PASS img.crossOrigin: setAttribute() to "use-credentials\0" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "use-credentials\0" followed by IDL get assert_equals: expected "anonymous" but got "use-credentials\0"
+PASS img.crossOrigin: setAttribute() to "use-credentials\0" followed by IDL get
PASS img.crossOrigin: setAttribute() to "se-credentials" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "se-credentials" followed by IDL get assert_equals: expected "anonymous" but got "se-credentials"
+PASS img.crossOrigin: setAttribute() to "se-credentials" followed by IDL get
PASS img.crossOrigin: setAttribute() to "USE-CREDENTIALS" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "USE-CREDENTIALS" followed by IDL get assert_equals: expected "use-credentials" but got "USE-CREDENTIALS"
+PASS img.crossOrigin: setAttribute() to "USE-CREDENTIALS" followed by IDL get
PASS img.crossOrigin: IDL set to "" should not throw
PASS img.crossOrigin: IDL set to "" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "" followed by IDL get assert_equals: expected "anonymous" but got ""
+PASS img.crossOrigin: IDL set to "" followed by IDL get
PASS img.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " should not throw
PASS img.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute()
-FAIL img.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get assert_equals: expected "anonymous" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo "
+PASS img.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get
PASS img.crossOrigin: IDL set to undefined should not throw
-FAIL img.crossOrigin: IDL set to undefined followed by getAttribute() assert_equals: expected (object) null but got (string) "undefined"
-FAIL img.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected (object) null but got (string) "undefined"
+PASS img.crossOrigin: IDL set to undefined followed by getAttribute()
+PASS img.crossOrigin: IDL set to undefined followed by IDL get
PASS img.crossOrigin: IDL set to 7 should not throw
PASS img.crossOrigin: IDL set to 7 followed by getAttribute()
-FAIL img.crossOrigin: IDL set to 7 followed by IDL get assert_equals: expected "anonymous" but got "7"
+PASS img.crossOrigin: IDL set to 7 followed by IDL get
PASS img.crossOrigin: IDL set to 1.5 should not throw
PASS img.crossOrigin: IDL set to 1.5 followed by getAttribute()
-FAIL img.crossOrigin: IDL set to 1.5 followed by IDL get assert_equals: expected "anonymous" but got "1.5"
+PASS img.crossOrigin: IDL set to 1.5 followed by IDL get
PASS img.crossOrigin: IDL set to true should not throw
PASS img.crossOrigin: IDL set to true followed by getAttribute()
-FAIL img.crossOrigin: IDL set to true followed by IDL get assert_equals: expected "anonymous" but got "true"
+PASS img.crossOrigin: IDL set to true followed by IDL get
PASS img.crossOrigin: IDL set to false should not throw
PASS img.crossOrigin: IDL set to false followed by getAttribute()
-FAIL img.crossOrigin: IDL set to false followed by IDL get assert_equals: expected "anonymous" but got "false"
+PASS img.crossOrigin: IDL set to false followed by IDL get
PASS img.crossOrigin: IDL set to object "[object Object]" should not throw
PASS img.crossOrigin: IDL set to object "[object Object]" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to object "[object Object]" followed by IDL get assert_equals: expected "anonymous" but got "[object Object]"
+PASS img.crossOrigin: IDL set to object "[object Object]" followed by IDL get
PASS img.crossOrigin: IDL set to NaN should not throw
PASS img.crossOrigin: IDL set to NaN followed by getAttribute()
-FAIL img.crossOrigin: IDL set to NaN followed by IDL get assert_equals: expected "anonymous" but got "NaN"
+PASS img.crossOrigin: IDL set to NaN followed by IDL get
PASS img.crossOrigin: IDL set to Infinity should not throw
PASS img.crossOrigin: IDL set to Infinity followed by getAttribute()
-FAIL img.crossOrigin: IDL set to Infinity followed by IDL get assert_equals: expected "anonymous" but got "Infinity"
+PASS img.crossOrigin: IDL set to Infinity followed by IDL get
PASS img.crossOrigin: IDL set to -Infinity should not throw
PASS img.crossOrigin: IDL set to -Infinity followed by getAttribute()
-FAIL img.crossOrigin: IDL set to -Infinity followed by IDL get assert_equals: expected "anonymous" but got "-Infinity"
+PASS img.crossOrigin: IDL set to -Infinity followed by IDL get
PASS img.crossOrigin: IDL set to "\0" should not throw
PASS img.crossOrigin: IDL set to "\0" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "\0" followed by IDL get assert_equals: expected "anonymous" but got "\0"
+PASS img.crossOrigin: IDL set to "\0" followed by IDL get
PASS img.crossOrigin: IDL set to null should not throw
-FAIL img.crossOrigin: IDL set to null followed by getAttribute() assert_equals: expected (object) null but got (string) "null"
-FAIL img.crossOrigin: IDL set to null followed by IDL get assert_equals: expected (object) null but got (string) "null"
+PASS img.crossOrigin: IDL set to null followed by getAttribute()
+PASS img.crossOrigin: IDL set to null followed by IDL get
PASS img.crossOrigin: IDL set to object "test-toString" should not throw
PASS img.crossOrigin: IDL set to object "test-toString" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to object "test-toString" followed by IDL get assert_equals: expected "anonymous" but got "test-toString"
+PASS img.crossOrigin: IDL set to object "test-toString" followed by IDL get
PASS img.crossOrigin: IDL set to object "test-valueOf" should not throw
PASS img.crossOrigin: IDL set to object "test-valueOf" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to object "test-valueOf" followed by IDL get assert_equals: expected "anonymous" but got "test-valueOf"
+PASS img.crossOrigin: IDL set to object "test-valueOf" followed by IDL get
PASS img.crossOrigin: IDL set to "anonymous" should not throw
PASS img.crossOrigin: IDL set to "anonymous" followed by getAttribute()
PASS img.crossOrigin: IDL set to "anonymous" followed by IDL get
PASS img.crossOrigin: IDL set to "xanonymous" should not throw
PASS img.crossOrigin: IDL set to "xanonymous" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "xanonymous" followed by IDL get assert_equals: expected "anonymous" but got "xanonymous"
+PASS img.crossOrigin: IDL set to "xanonymous" followed by IDL get
PASS img.crossOrigin: IDL set to "anonymous\0" should not throw
PASS img.crossOrigin: IDL set to "anonymous\0" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "anonymous\0" followed by IDL get assert_equals: expected "anonymous" but got "anonymous\0"
+PASS img.crossOrigin: IDL set to "anonymous\0" followed by IDL get
PASS img.crossOrigin: IDL set to "nonymous" should not throw
PASS img.crossOrigin: IDL set to "nonymous" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "nonymous" followed by IDL get assert_equals: expected "anonymous" but got "nonymous"
+PASS img.crossOrigin: IDL set to "nonymous" followed by IDL get
PASS img.crossOrigin: IDL set to "ANONYMOUS" should not throw
PASS img.crossOrigin: IDL set to "ANONYMOUS" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "ANONYMOUS" followed by IDL get assert_equals: expected "anonymous" but got "ANONYMOUS"
+PASS img.crossOrigin: IDL set to "ANONYMOUS" followed by IDL get
PASS img.crossOrigin: IDL set to "use-credentials" should not throw
PASS img.crossOrigin: IDL set to "use-credentials" followed by getAttribute()
PASS img.crossOrigin: IDL set to "use-credentials" followed by IDL get
PASS img.crossOrigin: IDL set to "xuse-credentials" should not throw
PASS img.crossOrigin: IDL set to "xuse-credentials" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "xuse-credentials" followed by IDL get assert_equals: expected "anonymous" but got "xuse-credentials"
+PASS img.crossOrigin: IDL set to "xuse-credentials" followed by IDL get
PASS img.crossOrigin: IDL set to "use-credentials\0" should not throw
PASS img.crossOrigin: IDL set to "use-credentials\0" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "use-credentials\0" followed by IDL get assert_equals: expected "anonymous" but got "use-credentials\0"
+PASS img.crossOrigin: IDL set to "use-credentials\0" followed by IDL get
PASS img.crossOrigin: IDL set to "se-credentials" should not throw
PASS img.crossOrigin: IDL set to "se-credentials" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "se-credentials" followed by IDL get assert_equals: expected "anonymous" but got "se-credentials"
+PASS img.crossOrigin: IDL set to "se-credentials" followed by IDL get
PASS img.crossOrigin: IDL set to "USE-CREDENTIALS" should not throw
PASS img.crossOrigin: IDL set to "USE-CREDENTIALS" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "USE-CREDENTIALS" followed by IDL get assert_equals: expected "use-credentials" but got "USE-CREDENTIALS"
+PASS img.crossOrigin: IDL set to "USE-CREDENTIALS" followed by IDL get
PASS img.useMap: typeof IDL attribute
PASS img.useMap: IDL get with DOM attribute unset
PASS img.useMap: setAttribute() to "" followed by getAttribute()
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt (196893 => 196894)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt 2016-02-22 06:28:42 UTC (rev 196894)
@@ -1760,133 +1760,133 @@
PASS script.defer: IDL set to object "test-valueOf" should not throw
PASS script.defer: IDL set to object "test-valueOf" followed by hasAttribute()
PASS script.defer: IDL set to object "test-valueOf" followed by IDL get
-FAIL script.crossOrigin: typeof IDL attribute assert_equals: expected "object" but got "string"
-FAIL script.crossOrigin: IDL get with DOM attribute unset assert_equals: expected (object) null but got (string) ""
+PASS script.crossOrigin: typeof IDL attribute
+PASS script.crossOrigin: IDL get with DOM attribute unset
PASS script.crossOrigin: setAttribute() to "" followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to "" followed by IDL get assert_equals: expected "anonymous" but got ""
+PASS script.crossOrigin: setAttribute() to "" followed by IDL get
PASS script.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get assert_equals: expected "anonymous" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo "
+PASS script.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get
PASS script.crossOrigin: setAttribute() to undefined followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to undefined followed by IDL get assert_equals: expected "anonymous" but got "undefined"
+PASS script.crossOrigin: setAttribute() to undefined followed by IDL get
PASS script.crossOrigin: setAttribute() to 7 followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to 7 followed by IDL get assert_equals: expected "anonymous" but got "7"
+PASS script.crossOrigin: setAttribute() to 7 followed by IDL get
PASS script.crossOrigin: setAttribute() to 1.5 followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to 1.5 followed by IDL get assert_equals: expected "anonymous" but got "1.5"
+PASS script.crossOrigin: setAttribute() to 1.5 followed by IDL get
PASS script.crossOrigin: setAttribute() to true followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to true followed by IDL get assert_equals: expected "anonymous" but got "true"
+PASS script.crossOrigin: setAttribute() to true followed by IDL get
PASS script.crossOrigin: setAttribute() to false followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to false followed by IDL get assert_equals: expected "anonymous" but got "false"
+PASS script.crossOrigin: setAttribute() to false followed by IDL get
PASS script.crossOrigin: setAttribute() to object "[object Object]" followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to object "[object Object]" followed by IDL get assert_equals: expected "anonymous" but got "[object Object]"
+PASS script.crossOrigin: setAttribute() to object "[object Object]" followed by IDL get
PASS script.crossOrigin: setAttribute() to NaN followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to NaN followed by IDL get assert_equals: expected "anonymous" but got "NaN"
+PASS script.crossOrigin: setAttribute() to NaN followed by IDL get
PASS script.crossOrigin: setAttribute() to Infinity followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to Infinity followed by IDL get assert_equals: expected "anonymous" but got "Infinity"
+PASS script.crossOrigin: setAttribute() to Infinity followed by IDL get
PASS script.crossOrigin: setAttribute() to -Infinity followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to -Infinity followed by IDL get assert_equals: expected "anonymous" but got "-Infinity"
+PASS script.crossOrigin: setAttribute() to -Infinity followed by IDL get
PASS script.crossOrigin: setAttribute() to "\0" followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to "\0" followed by IDL get assert_equals: expected "anonymous" but got "\0"
+PASS script.crossOrigin: setAttribute() to "\0" followed by IDL get
PASS script.crossOrigin: setAttribute() to null followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to null followed by IDL get assert_equals: expected "anonymous" but got "null"
+PASS script.crossOrigin: setAttribute() to null followed by IDL get
PASS script.crossOrigin: setAttribute() to object "test-toString" followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to object "test-toString" followed by IDL get assert_equals: expected "anonymous" but got "test-toString"
+PASS script.crossOrigin: setAttribute() to object "test-toString" followed by IDL get
PASS script.crossOrigin: setAttribute() to object "test-valueOf" followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to object "test-valueOf" followed by IDL get assert_equals: expected "anonymous" but got "test-valueOf"
+PASS script.crossOrigin: setAttribute() to object "test-valueOf" followed by IDL get
PASS script.crossOrigin: setAttribute() to "anonymous" followed by getAttribute()
PASS script.crossOrigin: setAttribute() to "anonymous" followed by IDL get
PASS script.crossOrigin: setAttribute() to "xanonymous" followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to "xanonymous" followed by IDL get assert_equals: expected "anonymous" but got "xanonymous"
+PASS script.crossOrigin: setAttribute() to "xanonymous" followed by IDL get
PASS script.crossOrigin: setAttribute() to "anonymous\0" followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to "anonymous\0" followed by IDL get assert_equals: expected "anonymous" but got "anonymous\0"
+PASS script.crossOrigin: setAttribute() to "anonymous\0" followed by IDL get
PASS script.crossOrigin: setAttribute() to "nonymous" followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to "nonymous" followed by IDL get assert_equals: expected "anonymous" but got "nonymous"
+PASS script.crossOrigin: setAttribute() to "nonymous" followed by IDL get
PASS script.crossOrigin: setAttribute() to "ANONYMOUS" followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to "ANONYMOUS" followed by IDL get assert_equals: expected "anonymous" but got "ANONYMOUS"
+PASS script.crossOrigin: setAttribute() to "ANONYMOUS" followed by IDL get
PASS script.crossOrigin: setAttribute() to "use-credentials" followed by getAttribute()
PASS script.crossOrigin: setAttribute() to "use-credentials" followed by IDL get
PASS script.crossOrigin: setAttribute() to "xuse-credentials" followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to "xuse-credentials" followed by IDL get assert_equals: expected "anonymous" but got "xuse-credentials"
+PASS script.crossOrigin: setAttribute() to "xuse-credentials" followed by IDL get
PASS script.crossOrigin: setAttribute() to "use-credentials\0" followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to "use-credentials\0" followed by IDL get assert_equals: expected "anonymous" but got "use-credentials\0"
+PASS script.crossOrigin: setAttribute() to "use-credentials\0" followed by IDL get
PASS script.crossOrigin: setAttribute() to "se-credentials" followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to "se-credentials" followed by IDL get assert_equals: expected "anonymous" but got "se-credentials"
+PASS script.crossOrigin: setAttribute() to "se-credentials" followed by IDL get
PASS script.crossOrigin: setAttribute() to "USE-CREDENTIALS" followed by getAttribute()
-FAIL script.crossOrigin: setAttribute() to "USE-CREDENTIALS" followed by IDL get assert_equals: expected "use-credentials" but got "USE-CREDENTIALS"
+PASS script.crossOrigin: setAttribute() to "USE-CREDENTIALS" followed by IDL get
PASS script.crossOrigin: IDL set to "" should not throw
PASS script.crossOrigin: IDL set to "" followed by getAttribute()
-FAIL script.crossOrigin: IDL set to "" followed by IDL get assert_equals: expected "anonymous" but got ""
+PASS script.crossOrigin: IDL set to "" followed by IDL get
PASS script.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " should not throw
PASS script.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute()
-FAIL script.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get assert_equals: expected "anonymous" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo "
+PASS script.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get
PASS script.crossOrigin: IDL set to undefined should not throw
-FAIL script.crossOrigin: IDL set to undefined followed by getAttribute() assert_equals: expected (object) null but got (string) "undefined"
-FAIL script.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected (object) null but got (string) "undefined"
+PASS script.crossOrigin: IDL set to undefined followed by getAttribute()
+PASS script.crossOrigin: IDL set to undefined followed by IDL get
PASS script.crossOrigin: IDL set to 7 should not throw
PASS script.crossOrigin: IDL set to 7 followed by getAttribute()
-FAIL script.crossOrigin: IDL set to 7 followed by IDL get assert_equals: expected "anonymous" but got "7"
+PASS script.crossOrigin: IDL set to 7 followed by IDL get
PASS script.crossOrigin: IDL set to 1.5 should not throw
PASS script.crossOrigin: IDL set to 1.5 followed by getAttribute()
-FAIL script.crossOrigin: IDL set to 1.5 followed by IDL get assert_equals: expected "anonymous" but got "1.5"
+PASS script.crossOrigin: IDL set to 1.5 followed by IDL get
PASS script.crossOrigin: IDL set to true should not throw
PASS script.crossOrigin: IDL set to true followed by getAttribute()
-FAIL script.crossOrigin: IDL set to true followed by IDL get assert_equals: expected "anonymous" but got "true"
+PASS script.crossOrigin: IDL set to true followed by IDL get
PASS script.crossOrigin: IDL set to false should not throw
PASS script.crossOrigin: IDL set to false followed by getAttribute()
-FAIL script.crossOrigin: IDL set to false followed by IDL get assert_equals: expected "anonymous" but got "false"
+PASS script.crossOrigin: IDL set to false followed by IDL get
PASS script.crossOrigin: IDL set to object "[object Object]" should not throw
PASS script.crossOrigin: IDL set to object "[object Object]" followed by getAttribute()
-FAIL script.crossOrigin: IDL set to object "[object Object]" followed by IDL get assert_equals: expected "anonymous" but got "[object Object]"
+PASS script.crossOrigin: IDL set to object "[object Object]" followed by IDL get
PASS script.crossOrigin: IDL set to NaN should not throw
PASS script.crossOrigin: IDL set to NaN followed by getAttribute()
-FAIL script.crossOrigin: IDL set to NaN followed by IDL get assert_equals: expected "anonymous" but got "NaN"
+PASS script.crossOrigin: IDL set to NaN followed by IDL get
PASS script.crossOrigin: IDL set to Infinity should not throw
PASS script.crossOrigin: IDL set to Infinity followed by getAttribute()
-FAIL script.crossOrigin: IDL set to Infinity followed by IDL get assert_equals: expected "anonymous" but got "Infinity"
+PASS script.crossOrigin: IDL set to Infinity followed by IDL get
PASS script.crossOrigin: IDL set to -Infinity should not throw
PASS script.crossOrigin: IDL set to -Infinity followed by getAttribute()
-FAIL script.crossOrigin: IDL set to -Infinity followed by IDL get assert_equals: expected "anonymous" but got "-Infinity"
+PASS script.crossOrigin: IDL set to -Infinity followed by IDL get
PASS script.crossOrigin: IDL set to "\0" should not throw
PASS script.crossOrigin: IDL set to "\0" followed by getAttribute()
-FAIL script.crossOrigin: IDL set to "\0" followed by IDL get assert_equals: expected "anonymous" but got "\0"
+PASS script.crossOrigin: IDL set to "\0" followed by IDL get
PASS script.crossOrigin: IDL set to null should not throw
-FAIL script.crossOrigin: IDL set to null followed by getAttribute() assert_equals: expected (object) null but got (string) "null"
-FAIL script.crossOrigin: IDL set to null followed by IDL get assert_equals: expected (object) null but got (string) "null"
+PASS script.crossOrigin: IDL set to null followed by getAttribute()
+PASS script.crossOrigin: IDL set to null followed by IDL get
PASS script.crossOrigin: IDL set to object "test-toString" should not throw
PASS script.crossOrigin: IDL set to object "test-toString" followed by getAttribute()
-FAIL script.crossOrigin: IDL set to object "test-toString" followed by IDL get assert_equals: expected "anonymous" but got "test-toString"
+PASS script.crossOrigin: IDL set to object "test-toString" followed by IDL get
PASS script.crossOrigin: IDL set to object "test-valueOf" should not throw
PASS script.crossOrigin: IDL set to object "test-valueOf" followed by getAttribute()
-FAIL script.crossOrigin: IDL set to object "test-valueOf" followed by IDL get assert_equals: expected "anonymous" but got "test-valueOf"
+PASS script.crossOrigin: IDL set to object "test-valueOf" followed by IDL get
PASS script.crossOrigin: IDL set to "anonymous" should not throw
PASS script.crossOrigin: IDL set to "anonymous" followed by getAttribute()
PASS script.crossOrigin: IDL set to "anonymous" followed by IDL get
PASS script.crossOrigin: IDL set to "xanonymous" should not throw
PASS script.crossOrigin: IDL set to "xanonymous" followed by getAttribute()
-FAIL script.crossOrigin: IDL set to "xanonymous" followed by IDL get assert_equals: expected "anonymous" but got "xanonymous"
+PASS script.crossOrigin: IDL set to "xanonymous" followed by IDL get
PASS script.crossOrigin: IDL set to "anonymous\0" should not throw
PASS script.crossOrigin: IDL set to "anonymous\0" followed by getAttribute()
-FAIL script.crossOrigin: IDL set to "anonymous\0" followed by IDL get assert_equals: expected "anonymous" but got "anonymous\0"
+PASS script.crossOrigin: IDL set to "anonymous\0" followed by IDL get
PASS script.crossOrigin: IDL set to "nonymous" should not throw
PASS script.crossOrigin: IDL set to "nonymous" followed by getAttribute()
-FAIL script.crossOrigin: IDL set to "nonymous" followed by IDL get assert_equals: expected "anonymous" but got "nonymous"
+PASS script.crossOrigin: IDL set to "nonymous" followed by IDL get
PASS script.crossOrigin: IDL set to "ANONYMOUS" should not throw
PASS script.crossOrigin: IDL set to "ANONYMOUS" followed by getAttribute()
-FAIL script.crossOrigin: IDL set to "ANONYMOUS" followed by IDL get assert_equals: expected "anonymous" but got "ANONYMOUS"
+PASS script.crossOrigin: IDL set to "ANONYMOUS" followed by IDL get
PASS script.crossOrigin: IDL set to "use-credentials" should not throw
PASS script.crossOrigin: IDL set to "use-credentials" followed by getAttribute()
PASS script.crossOrigin: IDL set to "use-credentials" followed by IDL get
PASS script.crossOrigin: IDL set to "xuse-credentials" should not throw
PASS script.crossOrigin: IDL set to "xuse-credentials" followed by getAttribute()
-FAIL script.crossOrigin: IDL set to "xuse-credentials" followed by IDL get assert_equals: expected "anonymous" but got "xuse-credentials"
+PASS script.crossOrigin: IDL set to "xuse-credentials" followed by IDL get
PASS script.crossOrigin: IDL set to "use-credentials\0" should not throw
PASS script.crossOrigin: IDL set to "use-credentials\0" followed by getAttribute()
-FAIL script.crossOrigin: IDL set to "use-credentials\0" followed by IDL get assert_equals: expected "anonymous" but got "use-credentials\0"
+PASS script.crossOrigin: IDL set to "use-credentials\0" followed by IDL get
PASS script.crossOrigin: IDL set to "se-credentials" should not throw
PASS script.crossOrigin: IDL set to "se-credentials" followed by getAttribute()
-FAIL script.crossOrigin: IDL set to "se-credentials" followed by IDL get assert_equals: expected "anonymous" but got "se-credentials"
+PASS script.crossOrigin: IDL set to "se-credentials" followed by IDL get
PASS script.crossOrigin: IDL set to "USE-CREDENTIALS" should not throw
PASS script.crossOrigin: IDL set to "USE-CREDENTIALS" followed by getAttribute()
-FAIL script.crossOrigin: IDL set to "USE-CREDENTIALS" followed by IDL get assert_equals: expected "use-credentials" but got "USE-CREDENTIALS"
+PASS script.crossOrigin: IDL set to "USE-CREDENTIALS" followed by IDL get
FAIL script.itemScope: typeof IDL attribute assert_equals: expected "boolean" but got "undefined"
FAIL script.itemScope: IDL get with DOM attribute unset assert_equals: expected (boolean) false but got (undefined) undefined
PASS script.itemScope: setAttribute() to "" followed by getAttribute()
Modified: trunk/Source/WebCore/ChangeLog (196893 => 196894)
--- trunk/Source/WebCore/ChangeLog 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/ChangeLog 2016-02-22 06:28:42 UTC (rev 196894)
@@ -1,5 +1,48 @@
2016-02-21 Chris Dumez <[email protected]>
+ HTMLScriptElement.crossOrigin / HTMLImageElement.crossOrigin should only return known values
+ https://bugs.webkit.org/show_bug.cgi?id=154502
+
+ Reviewed by Darin Adler.
+
+ HTMLScriptElement.crossOrigin / HTMLImageElement.crossOrigin should only
+ return known values and should be nullable as per the specification:
+ - https://html.spec.whatwg.org/multipage/scripting.html#attr-script-crossorigin
+ - https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-crossorigin
+ - https://html.spec.whatwg.org/multipage/infrastructure.html#cors-settings-attribute
+
+ This aligns our behavior with the HTML specification and Firefox.
+
+ No new tests, already covered by existing tests.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ Add support for nullable DOMString attributes. If such attribute is
+ marked as nullable:
+ - A null string is passed to the implementation if the setter is called
+ with null/undefined.
+ - null is returned to the _javascript_ if the getter implementation
+ returns a null string.
+
+ * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
+ * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ * bindings/scripts/test/ObjC/DOMTestObj.h:
+ * bindings/scripts/test/ObjC/DOMTestObj.mm:
+ * bindings/scripts/test/TestObj.idl:
+ Add test coverage for nullable DOMString attributes
+ and rebaseline bindings tests.
+
+ * html/HTMLImageElement.cpp:
+ * html/HTMLImageElement.h:
+ * html/HTMLImageElement.idl:
+ * html/HTMLScriptElement.cpp:
+ * html/HTMLScriptElement.h:
+ * html/HTMLScriptElement.idl:
+ * html/parser/HTMLParserIdioms.cpp:
+ * html/parser/HTMLParserIdioms.h:
+
+2016-02-21 Chris Dumez <[email protected]>
+
Make HTMLSelectElement.size behave as per the specification
https://bugs.webkit.org/show_bug.cgi?id=154504
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (196893 => 196894)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-02-22 06:28:42 UTC (rev 196894)
@@ -4075,6 +4075,9 @@
if ($signature->extendedAttributes->{"TreatNullAs"} and $signature->extendedAttributes->{"TreatNullAs"} eq "NullString") {
return "valueToStringWithNullCheck(state, $value)"
}
+ if ($signature->isNullable) {
+ return "valueToStringWithUndefinedOrNullCheck(state, $value)";
+ }
if ($signature->extendedAttributes->{"AtomicString"}) {
return "$value.toString(state)->toAtomicString(state)";
}
@@ -4190,6 +4193,7 @@
die "Unknown value for TreatReturnedNullStringAs extended attribute";
}
+ return "jsStringOrNull(state, $value)" if $signature->isNullable;
AddToImplIncludes("<runtime/JSString.h>", $conditional);
return "jsStringWithCache(state, $value)";
}
Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (196893 => 196894)
--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2016-02-22 06:28:42 UTC (rev 196894)
@@ -137,6 +137,7 @@
PROP_NULLABLE_BOOLEAN_ATTRIBUTE,
PROP_NULLABLE_STRING_ATTRIBUTE,
PROP_NULLABLE_LONG_SETTABLE_ATTRIBUTE,
+ PROP_NULLABLE_STRING_SETTABLE_ATTRIBUTE,
PROP_NULLABLE_STRING_VALUE,
PROP_ATTRIBUTE,
PROP_PUT_FORWARDS_ATTRIBUTE,
@@ -251,6 +252,9 @@
case PROP_NULLABLE_LONG_SETTABLE_ATTRIBUTE:
webkit_dom_test_obj_set_nullable_long_settable_attribute(self, g_value_get_long(value));
break;
+ case PROP_NULLABLE_STRING_SETTABLE_ATTRIBUTE:
+ webkit_dom_test_obj_set_nullable_string_settable_attribute(self, g_value_get_string(value));
+ break;
case PROP_NULLABLE_STRING_VALUE:
webkit_dom_test_obj_set_nullable_string_value(self, g_value_get_long(value));
break;
@@ -442,6 +446,9 @@
case PROP_NULLABLE_LONG_SETTABLE_ATTRIBUTE:
g_value_set_long(value, webkit_dom_test_obj_get_nullable_long_settable_attribute(self));
break;
+ case PROP_NULLABLE_STRING_SETTABLE_ATTRIBUTE:
+ g_value_take_string(value, webkit_dom_test_obj_get_nullable_string_settable_attribute(self));
+ break;
case PROP_NULLABLE_STRING_VALUE:
g_value_set_long(value, webkit_dom_test_obj_get_nullable_string_value(self, nullptr));
break;
@@ -1072,6 +1079,16 @@
g_object_class_install_property(
gobjectClass,
+ PROP_NULLABLE_STRING_SETTABLE_ATTRIBUTE,
+ g_param_spec_string(
+ "nullable-string-settable-attribute",
+ "TestObj:nullable-string-settable-attribute",
+ "read-write gchar* TestObj:nullable-string-settable-attribute",
+ "",
+ WEBKIT_PARAM_READWRITE));
+
+ g_object_class_install_property(
+ gobjectClass,
PROP_NULLABLE_STRING_VALUE,
g_param_spec_long(
"nullable-string-value",
@@ -2604,6 +2621,25 @@
item->setNullableLongSettableAttribute(value);
}
+gchar* webkit_dom_test_obj_get_nullable_string_settable_attribute(WebKitDOMTestObj* self)
+{
+ WebCore::JSMainThreadNullState state;
+ g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0);
+ WebCore::TestObj* item = WebKit::core(self);
+ gchar* result = convertToUTF8String(item->nullableStringSettableAttribute());
+ return result;
+}
+
+void webkit_dom_test_obj_set_nullable_string_settable_attribute(WebKitDOMTestObj* self, const gchar* value)
+{
+ WebCore::JSMainThreadNullState state;
+ g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+ g_return_if_fail(value);
+ WebCore::TestObj* item = WebKit::core(self);
+ WTF::String convertedValue = WTF::String::fromUTF8(value);
+ item->setNullableStringSettableAttribute(convertedValue);
+}
+
glong webkit_dom_test_obj_get_nullable_string_value(WebKitDOMTestObj* self, GError** error)
{
WebCore::JSMainThreadNullState state;
Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h (196893 => 196894)
--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h 2016-02-22 06:28:42 UTC (rev 196894)
@@ -1685,6 +1685,27 @@
webkit_dom_test_obj_set_nullable_long_settable_attribute(WebKitDOMTestObj* self, glong value);
/**
+ * webkit_dom_test_obj_get_nullable_string_settable_attribute:
+ * @self: A #WebKitDOMTestObj
+ *
+ * Returns: A #gchar
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API gchar*
+webkit_dom_test_obj_get_nullable_string_settable_attribute(WebKitDOMTestObj* self);
+
+/**
+ * webkit_dom_test_obj_set_nullable_string_settable_attribute:
+ * @self: A #WebKitDOMTestObj
+ * @value: A #gchar
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_set_nullable_string_settable_attribute(WebKitDOMTestObj* self, const gchar* value);
+
+/**
* webkit_dom_test_obj_get_nullable_string_value:
* @self: A #WebKitDOMTestObj
* @error: #GError
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (196893 => 196894)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2016-02-22 06:28:42 UTC (rev 196894)
@@ -325,6 +325,8 @@
JSC::EncodedJSValue jsTestObjNullableStringAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
+JSC::EncodedJSValue jsTestObjNullableStringSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+void setJSTestObjNullableStringSettableAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjNullableStringValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjNullableStringValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
@@ -587,6 +589,7 @@
{ "nullableBooleanAttribute", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableBooleanAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "nullableStringAttribute", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableStringAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "nullableLongSettableAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableLongSettableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableLongSettableAttribute) } },
+ { "nullableStringSettableAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableStringSettableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableStringSettableAttribute) } },
{ "nullableStringValue", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableStringValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableStringValue) } },
{ "attribute", ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
{ "attributeWithReservedEnumType", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttributeWithReservedEnumType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttributeWithReservedEnumType) } },
@@ -1861,7 +1864,7 @@
return throwGetterTypeError(*state, "TestObj", "nullableStringAttribute");
}
auto& impl = castedThis->wrapped();
- JSValue result = jsStringWithCache(state, impl.nullableStringAttribute());
+ JSValue result = jsStringOrNull(state, impl.nullableStringAttribute());
return JSValue::encode(result);
}
@@ -1881,6 +1884,21 @@
}
+EncodedJSValue jsTestObjNullableStringSettableAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+ UNUSED_PARAM(state);
+ UNUSED_PARAM(thisValue);
+ JSValue decodedThisValue = JSValue::decode(thisValue);
+ auto* castedThis = jsDynamicCast<JSTestObj*>(decodedThisValue);
+ if (UNLIKELY(!castedThis)) {
+ return throwGetterTypeError(*state, "TestObj", "nullableStringSettableAttribute");
+ }
+ auto& impl = castedThis->wrapped();
+ JSValue result = jsStringOrNull(state, impl.nullableStringSettableAttribute());
+ return JSValue::encode(result);
+}
+
+
EncodedJSValue jsTestObjNullableStringValue(ExecState* state, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(state);
@@ -2955,6 +2973,23 @@
}
+void setJSTestObjNullableStringSettableAttribute(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+ JSValue value = JSValue::decode(encodedValue);
+ UNUSED_PARAM(thisValue);
+ JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
+ if (UNLIKELY(!castedThis)) {
+ throwSetterTypeError(*state, "TestObj", "nullableStringSettableAttribute");
+ return;
+ }
+ auto& impl = castedThis->wrapped();
+ String nativeValue = valueToStringWithUndefinedOrNullCheck(state, value);
+ if (UNLIKELY(state->hadException()))
+ return;
+ impl.setNullableStringSettableAttribute(nativeValue);
+}
+
+
void setJSTestObjNullableStringValue(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h (196893 => 196894)
--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h 2016-02-22 06:28:42 UTC (rev 196894)
@@ -126,6 +126,7 @@
@property (readonly) BOOL nullableBooleanAttribute;
@property (readonly, copy) NSString *nullableStringAttribute;
@property int nullableLongSettableAttribute;
+@property (copy) NSString *nullableStringSettableAttribute;
@property int nullableStringValue;
@property (readonly, copy) NSString *attribute;
@property (readonly, strong) DOMTestNode *putForwardsAttribute;
Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm (196893 => 196894)
--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm 2016-02-22 06:28:42 UTC (rev 196894)
@@ -870,6 +870,18 @@
IMPL->setNullableLongSettableAttribute(newNullableLongSettableAttribute);
}
+- (NSString *)nullableStringSettableAttribute
+{
+ WebCore::JSMainThreadNullState state;
+ return IMPL->nullableStringSettableAttribute();
+}
+
+- (void)setNullableStringSettableAttribute:(NSString *)newNullableStringSettableAttribute
+{
+ WebCore::JSMainThreadNullState state;
+ IMPL->setNullableStringSettableAttribute(newNullableStringSettableAttribute);
+}
+
- (int)nullableStringValue
{
WebCore::JSMainThreadNullState state;
Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (196893 => 196894)
--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl 2016-02-22 06:28:42 UTC (rev 196894)
@@ -304,6 +304,7 @@
readonly attribute DOMString? nullableStringAttribute;
attribute long? nullableLongSettableAttribute;
+ attribute DOMString? nullableStringSettableAttribute;
[GetterRaisesException] attribute long? nullableStringValue;
Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (196893 => 196894)
--- trunk/Source/WebCore/html/HTMLImageElement.cpp 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp 2016-02-22 06:28:42 UTC (rev 196894)
@@ -567,6 +567,16 @@
return document().completeURL(stripLeadingAndTrailingHTMLSpaces(usemap)).isEmpty();
}
+void HTMLImageElement::setCrossOrigin(const AtomicString& value)
+{
+ setAttributeWithoutSynchronization(crossoriginAttr, value);
+}
+
+String HTMLImageElement::crossOrigin() const
+{
+ return parseCORSSettingsAttribute(fastGetAttribute(crossoriginAttr));
+}
+
#if ENABLE(SERVICE_CONTROLS)
void HTMLImageElement::updateImageControls()
{
Modified: trunk/Source/WebCore/html/HTMLImageElement.h (196893 => 196894)
--- trunk/Source/WebCore/html/HTMLImageElement.h 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/html/HTMLImageElement.h 2016-02-22 06:28:42 UTC (rev 196894)
@@ -69,6 +69,9 @@
URL src() const;
void setSrc(const String&);
+ void setCrossOrigin(const AtomicString&);
+ String crossOrigin() const;
+
void setWidth(int);
int x() const;
Modified: trunk/Source/WebCore/html/HTMLImageElement.idl (196893 => 196894)
--- trunk/Source/WebCore/html/HTMLImageElement.idl 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/html/HTMLImageElement.idl 2016-02-22 06:28:42 UTC (rev 196894)
@@ -25,7 +25,7 @@
[Reflect] attribute DOMString align;
[Reflect] attribute DOMString alt;
[Reflect] attribute DOMString border;
- [Reflect] attribute DOMString crossOrigin;
+ attribute DOMString? crossOrigin;
attribute long height;
[Reflect] attribute long hspace;
[Reflect] attribute boolean isMap;
Modified: trunk/Source/WebCore/html/HTMLScriptElement.cpp (196893 => 196894)
--- trunk/Source/WebCore/html/HTMLScriptElement.cpp 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/html/HTMLScriptElement.cpp 2016-02-22 06:28:42 UTC (rev 196894)
@@ -27,6 +27,7 @@
#include "Event.h"
#include "EventNames.h"
#include "HTMLNames.h"
+#include "HTMLParserIdioms.h"
#include "Text.h"
#include <wtf/Ref.h>
@@ -104,6 +105,16 @@
return fastHasAttribute(asyncAttr) || forceAsync();
}
+void HTMLScriptElement::setCrossOrigin(const AtomicString& value)
+{
+ setAttributeWithoutSynchronization(crossoriginAttr, value);
+}
+
+String HTMLScriptElement::crossOrigin() const
+{
+ return parseCORSSettingsAttribute(fastGetAttribute(crossoriginAttr));
+}
+
URL HTMLScriptElement::src() const
{
return document().completeURL(sourceAttributeValue());
Modified: trunk/Source/WebCore/html/HTMLScriptElement.h (196893 => 196894)
--- trunk/Source/WebCore/html/HTMLScriptElement.h 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/html/HTMLScriptElement.h 2016-02-22 06:28:42 UTC (rev 196894)
@@ -41,6 +41,9 @@
void setAsync(bool);
bool async() const;
+ void setCrossOrigin(const AtomicString&);
+ String crossOrigin() const;
+
private:
HTMLScriptElement(const QualifiedName&, Document&, bool wasInsertedByParser, bool alreadyStarted);
Modified: trunk/Source/WebCore/html/HTMLScriptElement.idl (196893 => 196894)
--- trunk/Source/WebCore/html/HTMLScriptElement.idl 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/html/HTMLScriptElement.idl 2016-02-22 06:28:42 UTC (rev 196894)
@@ -26,6 +26,6 @@
[Reflect] attribute boolean defer;
[Reflect, URL] attribute DOMString src;
[Reflect] attribute DOMString type;
- [Reflect] attribute DOMString crossOrigin;
+ attribute DOMString? crossOrigin;
[Reflect, Conditional=CSP_NEXT] attribute DOMString nonce;
};
Modified: trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp (196893 => 196894)
--- trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp 2016-02-22 06:28:42 UTC (rev 196894)
@@ -30,6 +30,7 @@
#include "URL.h"
#include <limits>
#include <wtf/MathExtras.h>
+#include <wtf/NeverDestroyed.h>
#include <wtf/text/StringBuilder.h>
namespace WebCore {
@@ -290,4 +291,13 @@
return threadSafeEqual(*a.localName().impl(), *b.localName().impl());
}
+String parseCORSSettingsAttribute(const AtomicString& value)
+{
+ if (value.isNull())
+ return String();
+ if (equalIgnoringASCIICase(value, "use-credentials"))
+ return ASCIILiteral("use-credentials");
+ return ASCIILiteral("anonymous");
}
+
+}
Modified: trunk/Source/WebCore/html/parser/HTMLParserIdioms.h (196893 => 196894)
--- trunk/Source/WebCore/html/parser/HTMLParserIdioms.h 2016-02-22 05:52:07 UTC (rev 196893)
+++ trunk/Source/WebCore/html/parser/HTMLParserIdioms.h 2016-02-22 06:28:42 UTC (rev 196894)
@@ -62,6 +62,9 @@
// http://www.whatwg.org/specs/web-apps/current-work/#rules-for-parsing-non-negative-integers
bool parseHTMLNonNegativeInteger(const String&, unsigned int&);
+// https://html.spec.whatwg.org/multipage/infrastructure.html#cors-settings-attribute
+String parseCORSSettingsAttribute(const AtomicString&);
+
bool threadSafeMatch(const QualifiedName&, const QualifiedName&);
// Inline implementations of some of the functions declared above.