Title: [261426] trunk/LayoutTests
- Revision
- 261426
- Author
- [email protected]
- Date
- 2020-05-08 17:02:41 -0700 (Fri, 08 May 2020)
Log Message
Overflow scrollers in iframes don't get mouseMovedInContentArea()
https://bugs.webkit.org/show_bug.cgi?id=211347
<rdar://problem/62784560>
Reviewed by Tim Horton.
Land some tests that were missing from r261382.
* fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered-expected.txt: Added.
* fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html: Added.
* fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal-expected.txt: Added.
* fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (261425 => 261426)
--- trunk/LayoutTests/ChangeLog 2020-05-09 00:00:39 UTC (rev 261425)
+++ trunk/LayoutTests/ChangeLog 2020-05-09 00:02:41 UTC (rev 261426)
@@ -1,3 +1,18 @@
+2020-05-08 Simon Fraser <[email protected]>
+
+ Overflow scrollers in iframes don't get mouseMovedInContentArea()
+ https://bugs.webkit.org/show_bug.cgi?id=211347
+ <rdar://problem/62784560>
+
+ Reviewed by Tim Horton.
+
+ Land some tests that were missing from r261382.
+
+ * fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered-expected.txt: Added.
+ * fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html: Added.
+ * fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal-expected.txt: Added.
+ * fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal.html: Added.
+
2020-05-08 Ryan Haddad <[email protected]>
[LFC][TFC] The fixed logical width should be used as the max width for a cell
Added: trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered-expected.txt (0 => 261426)
--- trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered-expected.txt 2020-05-09 00:02:41 UTC (rev 261426)
@@ -0,0 +1,16 @@
+
+Test maybegin and cancelled on overflow inside an iframe
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Initial state
+enabled
+Hovering vertical scrollbar should show expanded scrollbar
+PASS Scrollbar state: enabled,expanded,visible_track,visible_thumb
+Unhovering vertical scrollbar should hide it
+PASS Thumb and track hidden
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html (0 => 261426)
--- trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html (rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html 2020-05-09 00:02:41 UTC (rev 261426)
@@ -0,0 +1,102 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:useMockScrollbars=false internal:AsyncOverflowScrollingEnabled=true internal:AsyncFrameScrollingEnabled=true ] -->
+<html>
+<head>
+ <style>
+ body {
+ height: 1000px;
+ }
+ iframe {
+ width: 400px;
+ height: 250px;
+ border: 1px solid gray;
+ }
+ </style>
+ <script src=""
+ <script src=""
+
+ <script>
+ jsTestIsAsync = true;
+
+ if (window.internals)
+ internals.setUsesOverlayScrollbars(true);
+
+ async function doTest()
+ {
+ description('Test maybegin and cancelled on overflow inside an iframe');
+
+ const iframe = document.getElementsByTagName('iframe')[0];
+ const iframeWindow = iframe.contentWindow;
+ const iframeBounds = iframe.getBoundingClientRect();
+
+ const scroller = iframe.contentDocument.querySelector('.scroller');
+ const scrollerBounds = scroller.getBoundingClientRect();
+
+ const x = iframeBounds.left + scrollerBounds.right - 8;
+ const y = iframeBounds.top + scrollerBounds.top + 10;
+
+ if (!window.internals) {
+ finishJSTest();
+ return;
+ }
+
+ iframeWindow.internals.setUsesOverlayScrollbars(true);
+
+ debug('Initial state');
+ debug(iframeWindow.internals.verticalScrollbarState(scroller));
+
+ debug('Hovering vertical scrollbar should show expanded scrollbar');
+ await UIHelper.mouseWheelScrollAt(x, y);
+ await UIHelper.waitForCondition(() => {
+ let state = iframeWindow.internals.verticalScrollbarState(scroller);
+ let expanded = state.indexOf('expanded') != -1;
+ if (expanded)
+ testPassed('Scrollbar state: ' + state);
+ return expanded;
+ });
+
+ debug('Unhovering vertical scrollbar should hide it');
+ await UIHelper.moveMouseAndWaitForFrame(x - 10, y);
+ await UIHelper.moveMouseAndWaitForFrame(x - 20, y);
+ await UIHelper.waitForCondition(() => {
+ let state = iframeWindow.internals.verticalScrollbarState(scroller);
+ let thumbHidden = state.indexOf('visible_thumb') == -1;
+ let trackHidden = state.indexOf('visible_track') == -1;
+ if (thumbHidden && trackHidden)
+ testPassed('Thumb and track hidden');
+ return thumbHidden && trackHidden;
+ });
+
+ finishJSTest();
+ }
+
+ window.addEventListener('load', () => {
+ doTest();
+ }, false);
+ </script>
+</head>
+<body>
+ <iframe srcdoc="
+ <style>
+ body {
+ height: 1000px;
+ }
+ .scroller {
+ margin: 10px;
+ width: 200px;
+ height: 200px;
+ border: 1px solid black;
+ overflow: auto;
+ }
+ .contents {
+ width: 100%;
+ height: 200%;
+ }
+ </style>
+ <div class='scroller'>
+ <div class='contents'></div>
+ </div>
+ "></iframe>
+ <div id="console"></div>
+ <script src=""
+</body>
+</html>
Added: trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal-expected.txt (0 => 261426)
--- trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal-expected.txt 2020-05-09 00:02:41 UTC (rev 261426)
@@ -0,0 +1,16 @@
+
+Test maybegin and cancelled on overflow inside an iframe
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Initial state
+enabled
+MayBegin should show the scrollbar
+PASS Scrollbar state: enabled,visible_thumb
+Cancelled should hide the scrollbar
+PASS Scrollbar state: enabled
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal.html (0 => 261426)
--- trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal.html (rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal.html 2020-05-09 00:02:41 UTC (rev 261426)
@@ -0,0 +1,101 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:useMockScrollbars=false internal:AsyncOverflowScrollingEnabled=true internal:AsyncFrameScrollingEnabled=true ] -->
+<html>
+<head>
+ <style>
+ body {
+ height: 1000px;
+ }
+ iframe {
+ width: 400px;
+ height: 250px;
+ border: 1px solid gray;
+ }
+ </style>
+ <script src=""
+ <script src=""
+
+ <script>
+ jsTestIsAsync = true;
+
+ if (window.internals)
+ internals.setUsesOverlayScrollbars(true);
+
+ async function doTest()
+ {
+ description('Test maybegin and cancelled on overflow inside an iframe');
+
+ const iframe = document.getElementsByTagName('iframe')[0];
+ const iframeWindow = iframe.contentWindow;
+ const iframeBounds = iframe.getBoundingClientRect();
+
+ const scroller = iframe.contentDocument.querySelector('.scroller');
+ const scrollerBounds = scroller.getBoundingClientRect();
+
+ const x = iframeBounds.left + scrollerBounds.left + 10;
+ const y = iframeBounds.top + scrollerBounds.top + 10;
+
+ if (!window.internals) {
+ finishJSTest();
+ return;
+ }
+
+ iframeWindow.internals.setUsesOverlayScrollbars(true);
+
+ debug('Initial state');
+ debug(iframeWindow.internals.verticalScrollbarState(scroller));
+
+ debug('MayBegin should show the scrollbar');
+ await UIHelper.mouseWheelMayBeginAt(x, y);
+ await UIHelper.waitForCondition(() => {
+ let state = iframeWindow.internals.verticalScrollbarState(scroller);
+ let visible = state.indexOf('visible_thumb') != -1;
+ if (visible)
+ testPassed('Scrollbar state: ' + state);
+ return visible;
+ });
+
+ debug('Cancelled should hide the scrollbar');
+ await UIHelper.mouseWheelCancelAt(x, y);
+
+ await UIHelper.waitForCondition(() => {
+ let state = iframeWindow.internals.verticalScrollbarState(scroller);
+ let hidden = state.indexOf('visible_thumb') == -1;
+ if (hidden)
+ testPassed('Scrollbar state: ' + state);
+ return hidden;
+ });
+
+ finishJSTest();
+ }
+
+ window.addEventListener('load', () => {
+ doTest();
+ }, false);
+ </script>
+</head>
+<body>
+ <iframe srcdoc="
+ <style>
+ body {
+ height: 1000px;
+ }
+ .scroller {
+ margin: 10px;
+ width: 200px;
+ height: 200px;
+ border: 1px solid black;
+ overflow: auto;
+ }
+ .contents {
+ width: 100%;
+ height: 200%;
+ }
+ </style>
+ <div class='scroller'>
+ <div class='contents'></div>
+ </div>
+ "></iframe>
+ <div id="console"></div>
+ <script src=""
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes