Title: [243678] trunk
- Revision
- 243678
- Author
- [email protected]
- Date
- 2019-03-30 07:09:23 -0700 (Sat, 30 Mar 2019)
Log Message
[ContentChangeObserver] Add iFrame elements to the list of "considered clickable" elements.
https://bugs.webkit.org/show_bug.cgi?id=196410
<rdar://problem/49436828>
Reviewed by Simon Fraser.
Source/WebCore:
163.com constructs an iFrame to display the login pane on hover. This patch ensures that we take iFrames into account while observing for visible content change by considering iFrame elements "clickable".
(While iFrames don't necessarily have clickable content, we can't just sit and wait until they are fully loaded.)
Test: fast/events/touch/ios/content-observation/iframe-is-shown-on-hover.html
* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::StyleChangeScope::isConsideredClickable const):
LayoutTests:
* fast/events/touch/ios/content-observation/iframe-is-shown-on-hover-expected.txt: Added.
* fast/events/touch/ios/content-observation/iframe-is-shown-on-hover.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (243677 => 243678)
--- trunk/LayoutTests/ChangeLog 2019-03-30 13:47:42 UTC (rev 243677)
+++ trunk/LayoutTests/ChangeLog 2019-03-30 14:09:23 UTC (rev 243678)
@@ -1,5 +1,16 @@
2019-03-30 Zalan Bujtas <[email protected]>
+ [ContentChangeObserver] Add iFrame elements to the list of "considered clickable" elements.
+ https://bugs.webkit.org/show_bug.cgi?id=196410
+ <rdar://problem/49436828>
+
+ Reviewed by Simon Fraser.
+
+ * fast/events/touch/ios/content-observation/iframe-is-shown-on-hover-expected.txt: Added.
+ * fast/events/touch/ios/content-observation/iframe-is-shown-on-hover.html: Added.
+
+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>
Added: trunk/LayoutTests/fast/events/touch/ios/content-observation/iframe-is-shown-on-hover-expected.txt (0 => 243678)
--- trunk/LayoutTests/fast/events/touch/ios/content-observation/iframe-is-shown-on-hover-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/touch/ios/content-observation/iframe-is-shown-on-hover-expected.txt 2019-03-30 14:09:23 UTC (rev 243678)
@@ -0,0 +1,3 @@
+PASS if 'clicked' text is not shown below.
+
+
Added: trunk/LayoutTests/fast/events/touch/ios/content-observation/iframe-is-shown-on-hover.html (0 => 243678)
--- trunk/LayoutTests/fast/events/touch/ios/content-observation/iframe-is-shown-on-hover.html (rev 0)
+++ trunk/LayoutTests/fast/events/touch/ios/content-observation/iframe-is-shown-on-hover.html 2019-03-30 14:09:23 UTC (rev 243678)
@@ -0,0 +1,60 @@
+<html>
+<head>
+<title>This tests the case when iframe is display as the result of a hover.</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>
+<iframe id=becomesVisible src="" content"></iframe>
+<pre id=result></pre>
+<script>
+tapthis.addEventListener("mouseover", function( event ) {
+ 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/WebCore/ChangeLog (243677 => 243678)
--- trunk/Source/WebCore/ChangeLog 2019-03-30 13:47:42 UTC (rev 243677)
+++ trunk/Source/WebCore/ChangeLog 2019-03-30 14:09:23 UTC (rev 243678)
@@ -1,3 +1,19 @@
+2019-03-30 Zalan Bujtas <[email protected]>
+
+ [ContentChangeObserver] Add iFrame elements to the list of "considered clickable" elements.
+ https://bugs.webkit.org/show_bug.cgi?id=196410
+ <rdar://problem/49436828>
+
+ Reviewed by Simon Fraser.
+
+ 163.com constructs an iFrame to display the login pane on hover. This patch ensures that we take iFrames into account while observing for visible content change by considering iFrame elements "clickable".
+ (While iFrames don't necessarily have clickable content, we can't just sit and wait until they are fully loaded.)
+
+ Test: fast/events/touch/ios/content-observation/iframe-is-shown-on-hover.html
+
+ * page/ios/ContentChangeObserver.cpp:
+ (WebCore::ContentChangeObserver::StyleChangeScope::isConsideredClickable const):
+
2019-03-30 Antti Koivisto <[email protected]>
Try to fix Windows build.
Modified: trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp (243677 => 243678)
--- trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp 2019-03-30 13:47:42 UTC (rev 243677)
+++ trunk/Source/WebCore/page/ios/ContentChangeObserver.cpp 2019-03-30 14:09:23 UTC (rev 243678)
@@ -30,6 +30,7 @@
#include "ChromeClient.h"
#include "DOMTimer.h"
#include "Document.h"
+#include "HTMLIFrameElement.h"
#include "HTMLImageElement.h"
#include "Logging.h"
#include "NodeRenderStyle.h"
@@ -486,6 +487,9 @@
return false;
auto& element = const_cast<Element&>(m_element);
+ if (is<HTMLIFrameElement>(element))
+ return true;
+
if (is<HTMLImageElement>(element)) {
// This is required to avoid HTMLImageElement's touch callout override logic. See rdar://problem/48937767.
return element.Element::willRespondToMouseClickEvents();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes