REGRESSION (r203941): iAd Producer widgets fail to play in iBooks
[WebKit-https.git] / Source / WebCore / dom / MouseEvent.cpp
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())