Title: [210332] branches/safari-603-branch

Diff

Modified: branches/safari-603-branch/LayoutTests/imported/w3c/ChangeLog (210331 => 210332)


--- branches/safari-603-branch/LayoutTests/imported/w3c/ChangeLog	2017-01-05 17:08:20 UTC (rev 210331)
+++ branches/safari-603-branch/LayoutTests/imported/w3c/ChangeLog	2017-01-05 17:08:24 UTC (rev 210332)
@@ -1,3 +1,17 @@
+2017-01-04  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r210045. rdar://problem/29560853
+
+    2016-12-20  Alex Christensen  <achristen...@webkit.org>
+
+            Remove initEvent quirk
+            https://bugs.webkit.org/show_bug.cgi?id=166284
+
+            Reviewed by Dan Bernstein.
+
+            * web-platform-tests/dom/interfaces-expected.txt:
+            We regress conformance, but a change has been proposed to the spec. Hopefully this will be a temporary regression.
+
 2016-12-16  Youenn Fablet  <you...@apple.com>
 
         [Fetch API] Improve resource loading console logging

Modified: branches/safari-603-branch/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt (210331 => 210332)


--- branches/safari-603-branch/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt	2017-01-05 17:08:20 UTC (rev 210331)
+++ branches/safari-603-branch/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt	2017-01-05 17:08:24 UTC (rev 210332)
@@ -46,7 +46,9 @@
 PASS Event interface: document.createEvent("Event") must have own property "isTrusted" 
 PASS Event interface: document.createEvent("Event") must inherit property "timeStamp" with the proper type (15) 
 PASS Event interface: document.createEvent("Event") must inherit property "initEvent" with the proper type (16) 
-PASS Event interface: calling initEvent(DOMString,boolean,boolean) on document.createEvent("Event") with too few arguments must throw TypeError 
+FAIL Event interface: calling initEvent(DOMString,boolean,boolean) on document.createEvent("Event") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
+            fn.apply(obj, args);
+        }" did not throw
 PASS Event must be primary interface of new Event("foo") 
 PASS Stringification of new Event("foo") 
 PASS Event interface: new Event("foo") must inherit property "type" with the proper type (0) 
@@ -66,7 +68,9 @@
 PASS Event interface: new Event("foo") must have own property "isTrusted" 
 PASS Event interface: new Event("foo") must inherit property "timeStamp" with the proper type (15) 
 PASS Event interface: new Event("foo") must inherit property "initEvent" with the proper type (16) 
-PASS Event interface: calling initEvent(DOMString,boolean,boolean) on new Event("foo") with too few arguments must throw TypeError 
+FAIL Event interface: calling initEvent(DOMString,boolean,boolean) on new Event("foo") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
+            fn.apply(obj, args);
+        }" did not throw
 PASS CustomEvent interface: existence and properties of interface object 
 PASS CustomEvent interface object length 
 PASS CustomEvent interface object name 
@@ -96,7 +100,9 @@
 PASS Event interface: new CustomEvent("foo") must have own property "isTrusted" 
 PASS Event interface: new CustomEvent("foo") must inherit property "timeStamp" with the proper type (15) 
 PASS Event interface: new CustomEvent("foo") must inherit property "initEvent" with the proper type (16) 
-PASS Event interface: calling initEvent(DOMString,boolean,boolean) on new CustomEvent("foo") with too few arguments must throw TypeError 
+FAIL Event interface: calling initEvent(DOMString,boolean,boolean) on new CustomEvent("foo") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
+            fn.apply(obj, args);
+        }" did not throw
 PASS EventTarget interface: existence and properties of interface object 
 PASS EventTarget interface object length 
 PASS EventTarget interface object name 

Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (210331 => 210332)


--- branches/safari-603-branch/Source/WebCore/ChangeLog	2017-01-05 17:08:20 UTC (rev 210331)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog	2017-01-05 17:08:24 UTC (rev 210332)
@@ -1,5 +1,31 @@
 2017-01-04  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r210045. rdar://problem/29560853
+
+    2016-12-20  Alex Christensen  <achristen...@webkit.org>
+
+            Remove initEvent quirk
+            https://bugs.webkit.org/show_bug.cgi?id=166284
+
+            Reviewed by Dan Bernstein.
+
+            We added this quirk in r207908 and expanded it in r209946 and r210034.
+            Many web compatibility issues have been found, which leads us to believe that many more exist.
+            This reverts the behavior to match how it was before r203848.
+            This change was proposed to the spec in https://github.com/whatwg/dom/issues/387
+
+            * dom/Event.cpp:
+            (WebCore::Event::initEventForBindings): Deleted.
+            * dom/Event.h:
+            * dom/Event.idl:
+            * platform/RuntimeApplicationChecks.h:
+            * platform/RuntimeApplicationChecks.mm:
+            (WebCore::IOSApplication::isBaiduNuomi): Deleted.
+            (WebCore::IOSApplication::isAutoNaviAMap): Deleted.
+            (WebCore::IOSApplication::isFlipboard): Deleted.
+
+2017-01-04  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r210034. rdar://problem/29560853
 
     2016-12-20  Alex Christensen  <achristen...@webkit.org>

Modified: branches/safari-603-branch/Source/WebCore/dom/Event.cpp (210331 => 210332)


--- branches/safari-603-branch/Source/WebCore/dom/Event.cpp	2017-01-05 17:08:20 UTC (rev 210331)
+++ branches/safari-603-branch/Source/WebCore/dom/Event.cpp	2017-01-05 17:08:24 UTC (rev 210332)
@@ -26,7 +26,6 @@
 #include "EventNames.h"
 #include "EventPath.h"
 #include "EventTarget.h"
-#include "RuntimeApplicationChecks.h"
 #include "UserGestureIndicator.h"
 #include <wtf/CurrentTime.h>
 
@@ -90,25 +89,6 @@
     m_cancelable = cancelableArg;
 }
 
-ExceptionOr<void> Event::initEventForBindings(ScriptExecutionContext& scriptExecutionContext, const AtomicString& type, bool bubbles)
-{
-#if PLATFORM(IOS)
-    // FIXME: Temporary quirk for Baidu Nuomi App which calls initEvent() with too few parameters (rdar://problem/28707838).
-    // FIXME: Quirk also needed for Flipboard for same reason (rdar://problem/28264190).
-    // FIXME: We really ought to consider if this is web compatible. AutoNavi also uses initEvent with one parameter. rdar://problem/29420268
-    if (IOSApplication::isBaiduNuomi() || IOSApplication::isFlipboard() || IOSApplication::isAutoNaviAMap()) {
-        scriptExecutionContext.addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Calling Event.prototype.initEvent() with less than 3 parameters is deprecated."));
-        initEvent(type, bubbles, false);
-        return { };
-    }
-#else
-    UNUSED_PARAM(scriptExecutionContext);
-    UNUSED_PARAM(type);
-    UNUSED_PARAM(bubbles);
-#endif
-    return Exception { TypeError, ASCIILiteral("Not enough arguments") };
-}
-
 bool Event::composed() const
 {
     if (m_composed)

Modified: branches/safari-603-branch/Source/WebCore/dom/Event.h (210331 => 210332)


--- branches/safari-603-branch/Source/WebCore/dom/Event.h	2017-01-05 17:08:20 UTC (rev 210331)
+++ branches/safari-603-branch/Source/WebCore/dom/Event.h	2017-01-05 17:08:24 UTC (rev 210332)
@@ -96,7 +96,6 @@
     virtual ~Event();
 
     WEBCORE_EXPORT void initEvent(const AtomicString& type, bool canBubble, bool cancelable);
-    ExceptionOr<void> initEventForBindings(ScriptExecutionContext&, const AtomicString& type, bool bubbles); // Quirk.
 
     bool isInitialized() const { return m_isInitialized; }
 

Modified: branches/safari-603-branch/Source/WebCore/dom/Event.idl (210331 => 210332)


--- branches/safari-603-branch/Source/WebCore/dom/Event.idl	2017-01-05 17:08:20 UTC (rev 210331)
+++ branches/safari-603-branch/Source/WebCore/dom/Event.idl	2017-01-05 17:08:24 UTC (rev 210332)
@@ -66,8 +66,7 @@
     void stopPropagation();
     void preventDefault();
 
-    void initEvent(DOMString type, boolean bubbles, boolean cancelable); // Standard.
-    [MayThrowException, ImplementedAs=initEventForBindings, CallWith=ScriptExecutionContext] void initEvent(DOMString type, optional boolean bubbles = false); // Quirk.
+    void initEvent(optional DOMString type = "undefined", optional boolean bubbles = false, optional boolean cancelable = false);
 
     readonly attribute boolean defaultPrevented;
     void stopImmediatePropagation();

Modified: branches/safari-603-branch/Source/WebCore/platform/RuntimeApplicationChecks.h (210331 => 210332)


--- branches/safari-603-branch/Source/WebCore/platform/RuntimeApplicationChecks.h	2017-01-05 17:08:20 UTC (rev 210331)
+++ branches/safari-603-branch/Source/WebCore/platform/RuntimeApplicationChecks.h	2017-01-05 17:08:24 UTC (rev 210332)
@@ -76,9 +76,6 @@
 WEBCORE_EXPORT bool isWebProcess();
 bool isIBooks();
 WEBCORE_EXPORT bool isTheSecretSocietyHiddenMystery();
-bool isBaiduNuomi();
-bool isFlipboard();
-bool isAutoNaviAMap();
 
 } // IOSApplication
 

Modified: branches/safari-603-branch/Source/WebCore/platform/RuntimeApplicationChecks.mm (210331 => 210332)


--- branches/safari-603-branch/Source/WebCore/platform/RuntimeApplicationChecks.mm	2017-01-05 17:08:20 UTC (rev 210331)
+++ branches/safari-603-branch/Source/WebCore/platform/RuntimeApplicationChecks.mm	2017-01-05 17:08:24 UTC (rev 210332)
@@ -253,24 +253,6 @@
     return isTheSecretSocietyHiddenMystery;
 }
 
-bool IOSApplication::isBaiduNuomi()
-{
-    static bool isBaiduNuomi = applicationBundleIsEqualTo("com.renren-inc.nuomi");
-    return isBaiduNuomi;
-}
-
-bool IOSApplication::isAutoNaviAMap()
-{
-    static bool isBaiduNuomi = applicationBundleIsEqualTo("com.autonavi.amap");
-    return isBaiduNuomi;
-}
-
-bool IOSApplication::isFlipboard()
-{
-    static bool isFlipboard = applicationBundleIsEqualTo("com.flipboard.flipboard-ipad");
-    return isFlipboard;
-}
-
 #endif
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to