Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[ContentChangeObserver] Subframe load should not reset content observ…
…ation 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. Canonical link: https://commits.webkit.org/210693@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
bc0a5c4
commit d4432dea150a8219e569b8d90d4d3d3d2dc42235
Showing
5 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
PASS if 'clicked' text is not shown below. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<html> | ||
<head> | ||
<title>This tests the case when a subframe is getting loaded while hovering.</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; | ||
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="foobar.html"></iframe> | ||
<script> | ||
tapthis.addEventListener("mouseover", function( event ) { | ||
iframe.src = "data:text/html;charset=utf-8,subframe 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters