Title: [189282] trunk
Revision
189282
Author
[email protected]
Date
2015-09-03 13:12:17 -0700 (Thu, 03 Sep 2015)

Log Message

document.createEvent("eventname") should do a case-insensitive match on the event name
https://bugs.webkit.org/show_bug.cgi?id=148738
<rdar://problem/22558709>

Reviewed by Andreas Kling.

Source/WebCore:

document.createEvent("eventname") should do a case-insensitive match on the event name:
https://dom.spec.whatwg.org/#dom-document-createevent

WebKit was doing a case-sensitive match. Firefox and Chrome match the specification.

No new tests, already covered by:
http/tests/w3c/dom/nodes/Document-createEvent.html (rebaselined)

* dom/make_event_factory.pl:
(generateImplementation):

LayoutTests:

Rebaseline test now that some checks are passing.

* http/tests/w3c/dom/nodes/Document-createEvent-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (189281 => 189282)


--- trunk/LayoutTests/ChangeLog	2015-09-03 20:03:44 UTC (rev 189281)
+++ trunk/LayoutTests/ChangeLog	2015-09-03 20:12:17 UTC (rev 189282)
@@ -1,3 +1,15 @@
+2015-09-03  Chris Dumez  <[email protected]>
+
+        document.createEvent("eventname") should do a case-insensitive match on the event name
+        https://bugs.webkit.org/show_bug.cgi?id=148738
+        <rdar://problem/22558709>
+
+        Reviewed by Andreas Kling.
+
+        Rebaseline test now that some checks are passing.
+
+        * http/tests/w3c/dom/nodes/Document-createEvent-expected.txt:
+
 2015-09-03  Saam barati  <[email protected]>
 
         Block scoped variables should be visible across scripts

Modified: trunk/LayoutTests/http/tests/w3c/dom/nodes/Document-createEvent-expected.txt (189281 => 189282)


--- trunk/LayoutTests/http/tests/w3c/dom/nodes/Document-createEvent-expected.txt	2015-09-03 20:03:44 UTC (rev 189281)
+++ trunk/LayoutTests/http/tests/w3c/dom/nodes/Document-createEvent-expected.txt	2015-09-03 20:12:17 UTC (rev 189282)
@@ -1,34 +1,34 @@
 
 PASS CustomEvent should be an alias for CustomEvent. 
 FAIL createEvent('CustomEvent') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
-FAIL customevent should be an alias for CustomEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('customevent') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
-FAIL CUSTOMEVENT should be an alias for CustomEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('CUSTOMEVENT') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
+PASS customevent should be an alias for CustomEvent. 
+FAIL createEvent('customevent') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
+PASS CUSTOMEVENT should be an alias for CustomEvent. 
+FAIL createEvent('CUSTOMEVENT') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
 PASS Event should be an alias for Event. 
 FAIL createEvent('Event') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
-FAIL event should be an alias for Event. NotSupportedError: DOM Exception 9
-FAIL createEvent('event') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
-FAIL EVENT should be an alias for Event. NotSupportedError: DOM Exception 9
-FAIL createEvent('EVENT') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
+PASS event should be an alias for Event. 
+FAIL createEvent('event') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
+PASS EVENT should be an alias for Event. 
+FAIL createEvent('EVENT') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
 PASS Events should be an alias for Event. 
 FAIL createEvent('Events') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
-FAIL events should be an alias for Event. NotSupportedError: DOM Exception 9
-FAIL createEvent('events') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
-FAIL EVENTS should be an alias for Event. NotSupportedError: DOM Exception 9
-FAIL createEvent('EVENTS') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
+PASS events should be an alias for Event. 
+FAIL createEvent('events') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
+PASS EVENTS should be an alias for Event. 
+FAIL createEvent('EVENTS') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
 PASS HTMLEvents should be an alias for Event. 
 FAIL createEvent('HTMLEvents') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
-FAIL htmlevents should be an alias for Event. NotSupportedError: DOM Exception 9
-FAIL createEvent('htmlevents') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
-FAIL HTMLEVENTS should be an alias for Event. NotSupportedError: DOM Exception 9
-FAIL createEvent('HTMLEVENTS') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
+PASS htmlevents should be an alias for Event. 
+FAIL createEvent('htmlevents') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
+PASS HTMLEVENTS should be an alias for Event. 
+FAIL createEvent('HTMLEVENTS') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
 PASS KeyboardEvent should be an alias for KeyboardEvent. 
 FAIL createEvent('KeyboardEvent') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
-FAIL keyboardevent should be an alias for KeyboardEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('keyboardevent') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
-FAIL KEYBOARDEVENT should be an alias for KeyboardEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('KEYBOARDEVENT') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
+PASS keyboardevent should be an alias for KeyboardEvent. 
+FAIL createEvent('keyboardevent') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
+PASS KEYBOARDEVENT should be an alias for KeyboardEvent. 
+FAIL createEvent('KEYBOARDEVENT') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
 FAIL KeyEvents should be an alias for KeyboardEvent. NotSupportedError: DOM Exception 9
 FAIL createEvent('KeyEvents') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
 FAIL keyevents should be an alias for KeyboardEvent. NotSupportedError: DOM Exception 9
@@ -37,22 +37,22 @@
 FAIL createEvent('KEYEVENTS') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
 PASS MessageEvent should be an alias for MessageEvent. 
 FAIL createEvent('MessageEvent') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
-FAIL messageevent should be an alias for MessageEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('messageevent') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
-FAIL MESSAGEEVENT should be an alias for MessageEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('MESSAGEEVENT') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
+PASS messageevent should be an alias for MessageEvent. 
+FAIL createEvent('messageevent') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
+PASS MESSAGEEVENT should be an alias for MessageEvent. 
+FAIL createEvent('MESSAGEEVENT') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
 PASS MouseEvent should be an alias for MouseEvent. 
 FAIL createEvent('MouseEvent') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
-FAIL mouseevent should be an alias for MouseEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('mouseevent') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
-FAIL MOUSEEVENT should be an alias for MouseEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('MOUSEEVENT') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
+PASS mouseevent should be an alias for MouseEvent. 
+FAIL createEvent('mouseevent') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
+PASS MOUSEEVENT should be an alias for MouseEvent. 
+FAIL createEvent('MOUSEEVENT') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
 PASS MouseEvents should be an alias for MouseEvent. 
 FAIL createEvent('MouseEvents') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
-FAIL mouseevents should be an alias for MouseEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('mouseevents') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
-FAIL MOUSEEVENTS should be an alias for MouseEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('MOUSEEVENTS') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
+PASS mouseevents should be an alias for MouseEvent. 
+FAIL createEvent('mouseevents') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
+PASS MOUSEEVENTS should be an alias for MouseEvent. 
+FAIL createEvent('MOUSEEVENTS') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
 FAIL TouchEvent should be an alias for TouchEvent. NotSupportedError: DOM Exception 9
 FAIL createEvent('TouchEvent') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
 FAIL touchevent should be an alias for TouchEvent. NotSupportedError: DOM Exception 9
@@ -61,15 +61,15 @@
 FAIL createEvent('TOUCHEVENT') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
 PASS UIEvent should be an alias for UIEvent. 
 FAIL createEvent('UIEvent') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
-FAIL uievent should be an alias for UIEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('uievent') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
-FAIL UIEVENT should be an alias for UIEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('UIEVENT') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
+PASS uievent should be an alias for UIEvent. 
+FAIL createEvent('uievent') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
+PASS UIEVENT should be an alias for UIEvent. 
+FAIL createEvent('UIEVENT') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
 PASS UIEvents should be an alias for UIEvent. 
 FAIL createEvent('UIEvents') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
-FAIL uievents should be an alias for UIEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('uievents') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
-FAIL UIEVENTS should be an alias for UIEvent. NotSupportedError: DOM Exception 9
-FAIL createEvent('UIEVENTS') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
+PASS uievents should be an alias for UIEvent. 
+FAIL createEvent('uievents') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
+PASS UIEVENTS should be an alias for UIEvent. 
+FAIL createEvent('UIEVENTS') should be initialized correctly. assert_equals: isTrusted should be initialized to false expected (boolean) false but got (undefined) undefined
 PASS Should throw NOT_SUPPORTED_ERR for unrecognized arguments 
 

Modified: trunk/Source/WebCore/ChangeLog (189281 => 189282)


--- trunk/Source/WebCore/ChangeLog	2015-09-03 20:03:44 UTC (rev 189281)
+++ trunk/Source/WebCore/ChangeLog	2015-09-03 20:12:17 UTC (rev 189282)
@@ -1,3 +1,22 @@
+2015-09-03  Chris Dumez  <[email protected]>
+
+        document.createEvent("eventname") should do a case-insensitive match on the event name
+        https://bugs.webkit.org/show_bug.cgi?id=148738
+        <rdar://problem/22558709>
+
+        Reviewed by Andreas Kling.
+
+        document.createEvent("eventname") should do a case-insensitive match on the event name:
+        https://dom.spec.whatwg.org/#dom-document-createevent
+
+        WebKit was doing a case-sensitive match. Firefox and Chrome match the specification.
+
+        No new tests, already covered by:
+        http/tests/w3c/dom/nodes/Document-createEvent.html (rebaselined)
+
+        * dom/make_event_factory.pl:
+        (generateImplementation):
+
 2015-09-02  Ryosuke Niwa  <[email protected]>
 
         MutationObserver should accept attributeFilter, attributeOldValue, and characterDataOldValue on their own

Modified: trunk/Source/WebCore/dom/make_event_factory.pl (189281 => 189282)


--- trunk/Source/WebCore/dom/make_event_factory.pl	2015-09-03 20:03:44 UTC (rev 189281)
+++ trunk/Source/WebCore/dom/make_event_factory.pl	2015-09-03 20:12:17 UTC (rev 189282)
@@ -100,7 +100,7 @@
 
         print F "#if ENABLE($conditional)\n" if $conditional;
         # FIXEME JSC should support RuntimeEnabledFeatures
-        print F "    if (type == \"$eventName\")\n";
+        print F "    if (equalIgnoringASCIICase(type, \"$eventName\"))\n";
         print F "        return ${interfaceName}::create();\n";
         print F "#endif\n" if $conditional;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to