Title: [210034] trunk/Source/WebCore
Revision
210034
Author
[email protected]
Date
2016-12-20 13:41:14 -0800 (Tue, 20 Dec 2016)

Log Message

Fix yet another app that uses initEvent with fewer than 3 parameters
https://bugs.webkit.org/show_bug.cgi?id=166257
<rdar://problem/29420268>

Reviewed by Sam Weinig.

* dom/Event.cpp:
(WebCore::Event::initEventForBindings):
* platform/RuntimeApplicationChecks.h:
* platform/RuntimeApplicationChecks.mm:
(WebCore::IOSApplication::isAutoNaviAMap):
AutoNavi amap has content that uses initEvent with one parameter. This quirk is needed here, too.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (210033 => 210034)


--- trunk/Source/WebCore/ChangeLog	2016-12-20 21:41:03 UTC (rev 210033)
+++ trunk/Source/WebCore/ChangeLog	2016-12-20 21:41:14 UTC (rev 210034)
@@ -1,3 +1,18 @@
+2016-12-20  Alex Christensen  <[email protected]>
+
+        Fix yet another app that uses initEvent with fewer than 3 parameters
+        https://bugs.webkit.org/show_bug.cgi?id=166257
+        <rdar://problem/29420268>
+
+        Reviewed by Sam Weinig.
+
+        * dom/Event.cpp:
+        (WebCore::Event::initEventForBindings):
+        * platform/RuntimeApplicationChecks.h:
+        * platform/RuntimeApplicationChecks.mm:
+        (WebCore::IOSApplication::isAutoNaviAMap):
+        AutoNavi amap has content that uses initEvent with one parameter. This quirk is needed here, too.
+
 2016-12-20  Dean Jackson  <[email protected]>
 
         Remove INDIE_UI

Modified: trunk/Source/WebCore/dom/Event.cpp (210033 => 210034)


--- trunk/Source/WebCore/dom/Event.cpp	2016-12-20 21:41:03 UTC (rev 210033)
+++ trunk/Source/WebCore/dom/Event.cpp	2016-12-20 21:41:14 UTC (rev 210034)
@@ -95,7 +95,8 @@
 #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).
-    if (IOSApplication::isBaiduNuomi() || IOSApplication::isFlipboard()) {
+    // 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 { };

Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (210033 => 210034)


--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2016-12-20 21:41:03 UTC (rev 210033)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2016-12-20 21:41:14 UTC (rev 210034)
@@ -78,6 +78,7 @@
 WEBCORE_EXPORT bool isTheSecretSocietyHiddenMystery();
 bool isBaiduNuomi();
 bool isFlipboard();
+bool isAutoNaviAMap();
 
 } // IOSApplication
 

Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.mm (210033 => 210034)


--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.mm	2016-12-20 21:41:03 UTC (rev 210033)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.mm	2016-12-20 21:41:14 UTC (rev 210034)
@@ -259,6 +259,12 @@
     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");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to