Title: [243677] trunk
- Revision
- 243677
- Author
- [email protected]
- Date
- 2019-03-30 06:47:42 -0700 (Sat, 30 Mar 2019)
Log Message
[ContentChangeObserver] Subframe load should not reset content observation on the mainframe
https://bugs.webkit.org/show_bug.cgi?id=196408
<rdar://problem/49436797>
Reviewed by Simon Fraser.
Source/WebKit:
Hover intent fails when an unrelated frame commits a load the same time.
cancelPotentialTapInFrame is called from didCommitLoad, but what we are looking for here is the user initiated cancel of a tap (cancelPotentialTap).
(If the current frame navigates away, willDetachPage takes care of canceling the observation.)
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::cancelPotentialTap):
(WebKit::WebPage::cancelPotentialTapInFrame):
LayoutTests:
* fast/events/touch/ios/content-observation/hover-while-loading-subframe-expected.txt: Added.
* fast/events/touch/ios/content-observation/hover-while-loading-subframe.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (243676 => 243677)
--- trunk/LayoutTests/ChangeLog 2019-03-30 11:09:44 UTC (rev 243676)
+++ trunk/LayoutTests/ChangeLog 2019-03-30 13:47:42 UTC (rev 243677)
@@ -1,3 +1,14 @@
+2019-03-30 Zalan Bujtas <[email protected]>
+
+ [ContentChangeObserver] Subframe load should not reset content observation on the mainframe
+ https://bugs.webkit.org/show_bug.cgi?id=196408
+ <rdar://problem/49436797>
+
+ Reviewed by Simon Fraser.
+
+ * fast/events/touch/ios/content-observation/hover-while-loading-subframe-expected.txt: Added.
+ * fast/events/touch/ios/content-observation/hover-while-loading-subframe.html: Added.
+
2019-03-30 Antti Koivisto <[email protected]>
Hit-testing of boxes over scrollers should account for border-radius
Added: trunk/LayoutTests/fast/events/touch/ios/content-observation/hover-while-loading-subframe-expected.txt (0 => 243677)
--- trunk/LayoutTests/fast/events/touch/ios/content-observation/hover-while-loading-subframe-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/touch/ios/content-observation/hover-while-loading-subframe-expected.txt 2019-03-30 13:47:42 UTC (rev 243677)
@@ -0,0 +1,2 @@
+PASS if 'clicked' text is not shown below.
+
Added: trunk/LayoutTests/fast/events/touch/ios/content-observation/hover-while-loading-subframe.html (0 => 243677)
--- trunk/LayoutTests/fast/events/touch/ios/content-observation/hover-while-loading-subframe.html (rev 0)
+++ trunk/LayoutTests/fast/events/touch/ios/content-observation/hover-while-loading-subframe.html 2019-03-30 13:47:42 UTC (rev 243677)
@@ -0,0 +1,62 @@
+<html>
+<head>
+<title>This tests the case when a subframe is getting loaded while hovering.</title>
+<script src=""
+<style>
+#tapthis {
+ width: 400px;
+ height: 400px;
+ border: 1px solid green;
+}
+
+#becomesVisible {
+ display: none;
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ overflow: hidden;
+}
+
+</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>
+<iframe id=iframe src=""
+<script>
+tapthis.addEventListener("mouseover", function( event ) {
+ iframe.src = "" content";
+ becomesVisible.style.display = "block";
+ document.body.offsetHeight;
+ if (window.testRunner)
+ testRunner.notifyDone();
+}, false);
+
+becomesVisible.addEventListener("click", function( event ) {
+ result.innerHTML = "clicked hidden";
+}, false);
+
+tapthis.addEventListener("click", function( event ) {
+ result.innerHTML = "clicked";
+}, false);
+</script>
+</body>
+</html>
Modified: trunk/Source/WebKit/ChangeLog (243676 => 243677)
--- trunk/Source/WebKit/ChangeLog 2019-03-30 11:09:44 UTC (rev 243676)
+++ trunk/Source/WebKit/ChangeLog 2019-03-30 13:47:42 UTC (rev 243677)
@@ -1,3 +1,19 @@
+2019-03-30 Zalan Bujtas <[email protected]>
+
+ [ContentChangeObserver] Subframe load should not reset content observation on the mainframe
+ https://bugs.webkit.org/show_bug.cgi?id=196408
+ <rdar://problem/49436797>
+
+ Reviewed by Simon Fraser.
+
+ Hover intent fails when an unrelated frame commits a load the same time.
+ cancelPotentialTapInFrame is called from didCommitLoad, but what we are looking for here is the user initiated cancel of a tap (cancelPotentialTap).
+ (If the current frame navigates away, willDetachPage takes care of canceling the observation.)
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::cancelPotentialTap):
+ (WebKit::WebPage::cancelPotentialTapInFrame):
+
2019-03-29 John Wilander <[email protected]>
Move WebResourceLoadStatisticsStore IPC calls from the UI process to the network process
Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (243676 => 243677)
--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2019-03-30 11:09:44 UTC (rev 243676)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2019-03-30 13:47:42 UTC (rev 243677)
@@ -910,6 +910,8 @@
void WebPage::cancelPotentialTap()
{
+ if (m_potentialTapNode)
+ m_potentialTapNode->document().contentChangeObserver().willNotProceedWithClick();
cancelPotentialTapInFrame(*m_mainFrame);
}
@@ -916,7 +918,6 @@
void WebPage::cancelPotentialTapInFrame(WebFrame& frame)
{
if (m_potentialTapNode) {
- m_potentialTapNode->document().contentChangeObserver().willNotProceedWithClick();
auto* potentialTapFrame = m_potentialTapNode->document().frame();
if (potentialTapFrame && !potentialTapFrame->tree().isDescendantOf(frame.coreFrame()))
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes