[ContentChangeObserver] Hover menus do not function on fidelity.com
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Apr 2019 21:11:50 +0000 (21:11 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Apr 2019 21:11:50 +0000 (21:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196507
<rdar://problem/49496520>

Reviewed by Simon Fraser.

Source/WebCore:

fidelity.com has 400ms hover intent timer to bring up the main menus.

Test: fast/events/touch/ios/content-observation/400ms-hover-intent.html

* page/ios/ContentChangeObserver.cpp:

LayoutTests:

* fast/events/touch/ios/content-observation/400ms-hover-intent-expected.txt: Added.
* fast/events/touch/ios/content-observation/400ms-hover-intent.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/fast/events/touch/ios/content-observation/400ms-hover-intent-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/content-observation/400ms-hover-intent.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/ios/ContentChangeObserver.cpp

index ed24b39..1417584 100644 (file)
@@ -1,3 +1,14 @@
+2019-04-02  Zalan Bujtas  <zalan@apple.com>
+
+        [ContentChangeObserver] Hover menus do not function on fidelity.com
+        https://bugs.webkit.org/show_bug.cgi?id=196507
+        <rdar://problem/49496520>
+
+        Reviewed by Simon Fraser.
+
+        * fast/events/touch/ios/content-observation/400ms-hover-intent-expected.txt: Added.
+        * fast/events/touch/ios/content-observation/400ms-hover-intent.html: Added.
+
 2019-04-02  Chris Dumez  <cdumez@apple.com>
 
         Unreviewed, rolling out r243551.
diff --git a/LayoutTests/fast/events/touch/ios/content-observation/400ms-hover-intent-expected.txt b/LayoutTests/fast/events/touch/ios/content-observation/400ms-hover-intent-expected.txt
new file mode 100644 (file)
index 0000000..66db4c9
--- /dev/null
@@ -0,0 +1,2 @@
+PASS if 'clicked' text is not shown below.
+
diff --git a/LayoutTests/fast/events/touch/ios/content-observation/400ms-hover-intent.html b/LayoutTests/fast/events/touch/ios/content-observation/400ms-hover-intent.html
new file mode 100644 (file)
index 0000000..f01488a
--- /dev/null
@@ -0,0 +1,59 @@
+<html>
+<head>
+<title>This tests the case when the visible content change happens on a 400ms timer.</title>
+<script src="../../../../../resources/basic-gestures.js"></script>
+<style>
+#tapthis {
+    width: 400px;
+    height: 400px;
+    border: 1px solid green;
+}
+
+#becomesVisible {
+    display: none;
+    width: 100px;
+    height: 100px;
+    background-color: green;
+}
+</style>
+<script>
+async function test() {
+    if (!window.testRunner || !testRunner.runUIScript)
+        return;
+    if (window.internals)
+        internals.settings.setContentChangeObserverEnabled(true);
+
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+
+    let rect = tapthis.getBoundingClientRect();
+    let x = rect.left + rect.width / 2;
+    let y = rect.top + rect.height / 2;
+
+    await tapAtPoint(x, y);
+}
+</script>
+</head>
+<body onload="test()">
+<div id=tapthis>PASS if 'clicked' text is not shown below.</div>
+<div id=becomesVisible></div>
+<pre id=result></pre>
+<script>
+tapthis.addEventListener("mousemove", function( event ) {
+    setTimeout(function() {
+        becomesVisible.style.display = "block";
+        if (window.testRunner)
+             testRunner.notifyDone();
+    }, 400);
+}, false);
+
+becomesVisible.addEventListener("click", function( event ) {   
+    result.innerHTML = "clicked hidden";
+}, false);
+
+tapthis.addEventListener("click", function( event ) {   
+    result.innerHTML = "clicked";
+}, false);
+</script>
+</body>
+</html>
index 0a9e043..00b1893 100644 (file)
@@ -1,3 +1,17 @@
+2019-04-02  Zalan Bujtas  <zalan@apple.com>
+
+        [ContentChangeObserver] Hover menus do not function on fidelity.com
+        https://bugs.webkit.org/show_bug.cgi?id=196507
+        <rdar://problem/49496520>
+
+        Reviewed by Simon Fraser.
+
+        fidelity.com has 400ms hover intent timer to bring up the main menus.
+
+        Test: fast/events/touch/ios/content-observation/400ms-hover-intent.html
+
+        * page/ios/ContentChangeObserver.cpp:
+
 2019-04-02  Timothy Hatcher  <timothy@apple.com>
 
         NSAttributedString crashes when encoding text attachment cell for missing image.
index 5f08a28..ffd7a74 100644 (file)
@@ -40,7 +40,7 @@
 
 namespace WebCore {
 
-static const Seconds maximumDelayForTimers { 350_ms };
+static const Seconds maximumDelayForTimers { 400_ms };
 static const Seconds maximumDelayForTransitions { 300_ms };
 
 static bool isConsideredHidden(const Element& element)