REGRESSION (r203941): iAd Producer widgets fail to play in iBooks
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Apr 2017 02:23:12 +0000 (02:23 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Apr 2017 02:23:12 +0000 (02:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=170635
<rdar://problem/30797958>

Reviewed by Daniel Bates.

Extend the MouseEvent::initMouseEvent() workaround we added for iAd Producer
to iBooks since the iBooks widgets generated by iAd Producer contain the same
bug.

* dom/MouseEvent.cpp:
(WebCore::MouseEvent::initMouseEventQuirk):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215137 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/MouseEvent.cpp

index 3946b8e..f3e0852 100644 (file)
@@ -1,5 +1,20 @@
 2017-04-07  Chris Dumez  <cdumez@apple.com>
 
+        REGRESSION (r203941): iAd Producer widgets fail to play in iBooks
+        https://bugs.webkit.org/show_bug.cgi?id=170635
+        <rdar://problem/30797958>
+
+        Reviewed by Daniel Bates.
+
+        Extend the MouseEvent::initMouseEvent() workaround we added for iAd Producer
+        to iBooks since the iBooks widgets generated by iAd Producer contain the same
+        bug.
+
+        * dom/MouseEvent.cpp:
+        (WebCore::MouseEvent::initMouseEventQuirk):
+
+2017-04-07  Chris Dumez  <cdumez@apple.com>
+
         Start using MonotonicTime / Seconds in Timer class
         https://bugs.webkit.org/show_bug.cgi?id=170625
 
index 14d3a7b..2ec6843 100644 (file)
@@ -157,7 +157,8 @@ void MouseEvent::initMouseEventQuirk(ExecState& state, ScriptExecutionContext& s
 {
     EventTarget* relatedTarget = nullptr;
 #if PLATFORM(MAC)
-    if (MacApplication::isIAdProducer()) {
+    // Impacts iBooks too because of widgets generated by iAd Producer (rdar://problem/30797958).
+    if (MacApplication::isIAdProducer() || MacApplication::isIBooks()) {
         // jsEventTargetCast() does not throw and will silently convert bad input to nullptr.
         auto jsRelatedTarget = jsEventTargetCast(state.vm(), relatedTargetValue);
         if (!jsRelatedTarget && !relatedTargetValue.isUndefinedOrNull())