Title: [247181] tags/Safari-608.1.34
- Revision
- 247181
- Author
- bshaf...@apple.com
- Date
- 2019-07-05 15:13:29 -0700 (Fri, 05 Jul 2019)
Log Message
Cherry-pick r247167. rdar://problem/52547473
[ContentChangeObserver] REGRESSION (r247015): facebook photo/video upload button is unresponsive to user interaction.
https://bugs.webkit.org/show_bug.cgi?id=199502
<rdar://problem/52547473>
Reviewed by Simon Fraser.
Source/WebKit:
Apparently it's a common practice to put transparent elements over visible click targets (button like divs) and use the invisible
elements to catch the user input (e.g. Facebook's Photo/Video button).
This patch modifies the original "do not trigger click on invisible targets" heuristic to a more restrictive "do not trigger
click if the click target was previously hidden and became visible through touch start".
If this still breaks some use cases, we could turn it into YouTube quirk.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleSyntheticClick):
LayoutTests:
* fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3-expected.txt: Added.
* fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: tags/Safari-608.1.34/LayoutTests/ChangeLog (247180 => 247181)
--- tags/Safari-608.1.34/LayoutTests/ChangeLog 2019-07-05 21:56:58 UTC (rev 247180)
+++ tags/Safari-608.1.34/LayoutTests/ChangeLog 2019-07-05 22:13:29 UTC (rev 247181)
@@ -1,5 +1,45 @@
2019-07-05 Babak Shafiei <bshaf...@apple.com>
+ Cherry-pick r247167. rdar://problem/52547473
+
+ [ContentChangeObserver] REGRESSION (r247015): facebook photo/video upload button is unresponsive to user interaction.
+ https://bugs.webkit.org/show_bug.cgi?id=199502
+ <rdar://problem/52547473>
+
+ Reviewed by Simon Fraser.
+
+ Source/WebKit:
+
+ Apparently it's a common practice to put transparent elements over visible click targets (button like divs) and use the invisible
+ elements to catch the user input (e.g. Facebook's Photo/Video button).
+ This patch modifies the original "do not trigger click on invisible targets" heuristic to a more restrictive "do not trigger
+ click if the click target was previously hidden and became visible through touch start".
+ If this still breaks some use cases, we could turn it into YouTube quirk.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::handleSyntheticClick):
+
+ LayoutTests:
+
+ * fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3-expected.txt: Added.
+ * fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-07-05 Zalan Bujtas <za...@apple.com>
+
+ [ContentChangeObserver] REGRESSION (r247015): facebook photo/video upload button is unresponsive to user interaction.
+ https://bugs.webkit.org/show_bug.cgi?id=199502
+ <rdar://problem/52547473>
+
+ Reviewed by Simon Fraser.
+
+ * fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3-expected.txt: Added.
+ * fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3.html: Added.
+
+2019-07-05 Babak Shafiei <bshaf...@apple.com>
+
Revert r247115. rdar://problem/51288898
2019-07-04 Zalan Bujtas <za...@apple.com>
Added: tags/Safari-608.1.34/LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3-expected.txt (0 => 247181)
--- tags/Safari-608.1.34/LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3-expected.txt (rev 0)
+++ tags/Safari-608.1.34/LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3-expected.txt 2019-07-05 22:13:29 UTC (rev 247181)
@@ -0,0 +1,3 @@
+
+PASS if 'clicked' text is shown below.
+clicked
Added: tags/Safari-608.1.34/LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3.html (0 => 247181)
--- tags/Safari-608.1.34/LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3.html (rev 0)
+++ tags/Safari-608.1.34/LayoutTests/fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3.html 2019-07-05 22:13:29 UTC (rev 247181)
@@ -0,0 +1,40 @@
+<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<head>
+<title>This tests the case when the touch target is hidden (hidden at the time of touch start and it does remain hidden throughout the hover heuristics).</title>
+<script src=""
+<style>
+#tapThis {
+ opacity: 0;
+ width: 400px;
+ height: 400px;
+ border: 1px solid green;
+}
+</style>
+<script>
+async function test() {
+ if (!window.testRunner || !testRunner.runUIScript)
+ return;
+ if (window.internals)
+ internals.settings.setContentChangeObserverEnabled(true);
+
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+
+ await UIHelper.activateElement(tapThis);
+}
+</script>
+</head>
+<body _onload_="test()">
+<button id=tapThis></button>
+<div>PASS if 'clicked' text is shown below.</div>
+<pre id=result></pre>
+<script>
+tapThis.addEventListener("click", function( event ) {
+ result.innerHTML = "clicked";
+ if (window.testRunner)
+ testRunner.notifyDone();
+}, false);
+</script>
+</body>
+</html>
Modified: tags/Safari-608.1.34/Source/WebKit/ChangeLog (247180 => 247181)
--- tags/Safari-608.1.34/Source/WebKit/ChangeLog 2019-07-05 21:56:58 UTC (rev 247180)
+++ tags/Safari-608.1.34/Source/WebKit/ChangeLog 2019-07-05 22:13:29 UTC (rev 247181)
@@ -1,3 +1,49 @@
+2019-07-05 Babak Shafiei <bshaf...@apple.com>
+
+ Cherry-pick r247167. rdar://problem/52547473
+
+ [ContentChangeObserver] REGRESSION (r247015): facebook photo/video upload button is unresponsive to user interaction.
+ https://bugs.webkit.org/show_bug.cgi?id=199502
+ <rdar://problem/52547473>
+
+ Reviewed by Simon Fraser.
+
+ Source/WebKit:
+
+ Apparently it's a common practice to put transparent elements over visible click targets (button like divs) and use the invisible
+ elements to catch the user input (e.g. Facebook's Photo/Video button).
+ This patch modifies the original "do not trigger click on invisible targets" heuristic to a more restrictive "do not trigger
+ click if the click target was previously hidden and became visible through touch start".
+ If this still breaks some use cases, we could turn it into YouTube quirk.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::handleSyntheticClick):
+
+ LayoutTests:
+
+ * fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3-expected.txt: Added.
+ * fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition3.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-07-05 Zalan Bujtas <za...@apple.com>
+
+ [ContentChangeObserver] REGRESSION (r247015): facebook photo/video upload button is unresponsive to user interaction.
+ https://bugs.webkit.org/show_bug.cgi?id=199502
+ <rdar://problem/52547473>
+
+ Reviewed by Simon Fraser.
+
+ Apparently it's a common practice to put transparent elements over visible click targets (button like divs) and use the invisible
+ elements to catch the user input (e.g. Facebook's Photo/Video button).
+ This patch modifies the original "do not trigger click on invisible targets" heuristic to a more restrictive "do not trigger
+ click if the click target was previously hidden and became visible through touch start".
+ If this still breaks some use cases, we could turn it into YouTube quirk.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::handleSyntheticClick):
+
2019-07-04 Chris Dumez <cdu...@apple.com>
Simplify logic that handles registering WebProcessProxy objects with their WebsiteDataStore
Modified: tags/Safari-608.1.34/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (247180 => 247181)
--- tags/Safari-608.1.34/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2019-07-05 21:56:58 UTC (rev 247180)
+++ tags/Safari-608.1.34/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2019-07-05 22:13:29 UTC (rev 247181)
@@ -666,7 +666,7 @@
auto& respondingDocument = nodeRespondingToClick.document();
auto& contentChangeObserver = respondingDocument.contentChangeObserver();
- auto targetNodeisConsideredHidden = contentChangeObserver.hiddenTouchTarget() == &nodeRespondingToClick || ContentChangeObserver::isConsideredHidden(nodeRespondingToClick);
+ auto targetNodeWentFromHiddenToVisible = contentChangeObserver.hiddenTouchTarget() == &nodeRespondingToClick && !ContentChangeObserver::isConsideredHidden(nodeRespondingToClick);
{
LOG_WITH_STREAM(ContentObservation, stream << "handleSyntheticClick: node(" << &nodeRespondingToClick << ") " << location);
ContentChangeObserver::MouseMovedScope observingScope(respondingDocument);
@@ -677,8 +677,8 @@
return;
}
- if (targetNodeisConsideredHidden) {
- LOG(ContentObservation, "handleSyntheticClick: target node is considered hidden -> hover.");
+ if (targetNodeWentFromHiddenToVisible) {
+ LOG(ContentObservation, "handleSyntheticClick: target node was hidden and now is visible -> hover.");
return;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes