naver.com: Video stops when tapping on the video to use buttons
https://bugs.webkit.org/show_bug.cgi?id=199784
<rdar://problem/48068610>

Reviewed by Maciej Stachowiak.

Opt out of simulated mouse event sending for tv.naver.com.
When tv.naver.com receives the simulated mouseUp at touchEnd, it pauses the video right away and calls preventDefault()
which prevents us from running the hover heuristics.

* page/Quirks.cpp:
(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@247429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 9292f7b..af26e65 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2019-07-15  Zalan Bujtas  <zalan@apple.com>
+
+        naver.com: Video stops when tapping on the video to use buttons
+        https://bugs.webkit.org/show_bug.cgi?id=199784
+        <rdar://problem/48068610>
+
+        Reviewed by Maciej Stachowiak.
+
+        Opt out of simulated mouse event sending for tv.naver.com.
+        When tv.naver.com receives the simulated mouseUp at touchEnd, it pauses the video right away and calls preventDefault()
+        which prevents us from running the hover heuristics.
+
+        * page/Quirks.cpp:
+        (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
+
 2019-07-15  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         [GTK] GitHub breaks on FreeBSD because of "unsupported browser"
diff --git a/Source/WebCore/page/Quirks.cpp b/Source/WebCore/page/Quirks.cpp
index 4507418..bbae28d 100644
--- a/Source/WebCore/page/Quirks.cpp
+++ b/Source/WebCore/page/Quirks.cpp
@@ -290,8 +290,11 @@
         return true;
     if (equalLettersIgnoringASCIICase(host, "trailers.apple.com"))
         return true;
-    if (equalLettersIgnoringASCIICase(host, "naver.com") || host.endsWithIgnoringASCIICase(".naver.com"))
+    if (equalLettersIgnoringASCIICase(host, "naver.com"))
         return true;
+    // Disable the quirk for tv.naver.com subdomain to be able to simulate hover on videos.
+    if (host.endsWithIgnoringASCIICase(".naver.com"))
+        return !equalLettersIgnoringASCIICase(host, "tv.naver.com");
     return false;
 }