Title: [238273] trunk
- Revision
- 238273
- Author
- [email protected]
- Date
- 2018-11-15 21:46:48 -0800 (Thu, 15 Nov 2018)
Log Message
[iOS] Do not get stuck in indeterminate content observation state.
https://bugs.webkit.org/show_bug.cgi?id=191719
Reviewed by Simon Fraser.
Source/WebCore:
Reset the _WKContentChange flag to WKContentNoChange when the last observing timer is removed and we are in
the "can't decide yet if it's a hover or click" state.
This bug prevents us from firing click event when JS installs and removes the same set of timer(s) during mouse-move dispatch.
Test: fast/events/touch/ios/stuck-with-hover-state.html
* platform/ios/wak/WKContentObservation.cpp:
(WebThreadRemoveObservedContentModifier):
LayoutTests:
* fast/events/touch/ios/stuck-with-hover-state-expected.txt: Added.
* fast/events/touch/ios/stuck-with-hover-state.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (238272 => 238273)
--- trunk/LayoutTests/ChangeLog 2018-11-16 05:42:40 UTC (rev 238272)
+++ trunk/LayoutTests/ChangeLog 2018-11-16 05:46:48 UTC (rev 238273)
@@ -1,3 +1,13 @@
+2018-11-15 Zalan Bujtas <[email protected]>
+
+ [iOS] Do not get stuck in indeterminate content observation state.
+ https://bugs.webkit.org/show_bug.cgi?id=191719
+
+ Reviewed by Simon Fraser.
+
+ * fast/events/touch/ios/stuck-with-hover-state-expected.txt: Added.
+ * fast/events/touch/ios/stuck-with-hover-state.html: Added.
+
2018-11-15 Simon Fraser <[email protected]>
Add layout test for iframe contents disappearing on view unparent/reparent
Added: trunk/LayoutTests/fast/events/touch/ios/stuck-with-hover-state-expected.txt (0 => 238273)
--- trunk/LayoutTests/fast/events/touch/ios/stuck-with-hover-state-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/touch/ios/stuck-with-hover-state-expected.txt 2018-11-16 05:46:48 UTC (rev 238273)
@@ -0,0 +1,2 @@
+PASS if clicked.
+clicked
Added: trunk/LayoutTests/fast/events/touch/ios/stuck-with-hover-state.html (0 => 238273)
--- trunk/LayoutTests/fast/events/touch/ios/stuck-with-hover-state.html (rev 0)
+++ trunk/LayoutTests/fast/events/touch/ios/stuck-with-hover-state.html 2018-11-16 05:46:48 UTC (rev 238273)
@@ -0,0 +1,43 @@
+<html>
+<head>
+<title>This test that we trigger click when hover would not display non-clickable content.</title>
+<script src=""
+<style>
+#tapthis {
+ width: 400px;
+ height: 400px;
+ border: 1px solid green;
+}
+</style>
+<script>
+async function test() {
+ if (!window.testRunner || !testRunner.runUIScript)
+ return;
+
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+
+ let rect = tapthis.getBoundingClientRect();
+ let x = rect.left + rect.width / 2;
+ let y = rect.top + rect.height / 2;
+
+ await tapAtPoint(x, y);
+
+ testRunner.notifyDone();
+}
+</script>
+</head>
+<body _onload_="test()">
+<div id=tapthis>PASS if clicked.</div>
+<pre id=result></pre>
+<script>
+tapthis.addEventListener("mouseover", function( event ) {
+ clearTimeout(setTimeout(function() { tapthis.innerHTML = "should not see this"; }, 50));
+}, false);
+
+tapthis.addEventListener("click", function( event ) {
+ result.innerHTML = "clicked";
+}, false);
+</script>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (238272 => 238273)
--- trunk/Source/WebCore/ChangeLog 2018-11-16 05:42:40 UTC (rev 238272)
+++ trunk/Source/WebCore/ChangeLog 2018-11-16 05:46:48 UTC (rev 238273)
@@ -1,3 +1,19 @@
+2018-11-15 Zalan Bujtas <[email protected]>
+
+ [iOS] Do not get stuck in indeterminate content observation state.
+ https://bugs.webkit.org/show_bug.cgi?id=191719
+
+ Reviewed by Simon Fraser.
+
+ Reset the _WKContentChange flag to WKContentNoChange when the last observing timer is removed and we are in
+ the "can't decide yet if it's a hover or click" state.
+ This bug prevents us from firing click event when JS installs and removes the same set of timer(s) during mouse-move dispatch.
+
+ Test: fast/events/touch/ios/stuck-with-hover-state.html
+
+ * platform/ios/wak/WKContentObservation.cpp:
+ (WebThreadRemoveObservedContentModifier):
+
2018-11-15 Simon Fraser <[email protected]>
REGRESSION (r238090) Composited iframes that resize from zero don't show
Modified: trunk/Source/WebCore/platform/ios/wak/WKContentObservation.cpp (238272 => 238273)
--- trunk/Source/WebCore/platform/ios/wak/WKContentObservation.cpp 2018-11-16 05:42:40 UTC (rev 238272)
+++ trunk/Source/WebCore/platform/ios/wak/WKContentObservation.cpp 2018-11-16 05:46:48 UTC (rev 238273)
@@ -106,6 +106,12 @@
void WebThreadRemoveObservedContentModifier(void * aContentModifier)
{
WebThreadGetObservedContentModifiers()->remove(aContentModifier);
+ // Force reset the content change flag when the last observed content modifier is removed. We should not be in indeterminate state anymore.
+ if (WebThreadCountOfObservedContentModifiers())
+ return;
+ if (WKObservedContentChange() != WKContentIndeterminateChange)
+ return;
+ _WKContentChange = WKContentNoChange;
}
#endif // PLATFORM(IOS_FAMILY)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes