Diff
Modified: trunk/LayoutTests/ChangeLog (258560 => 258561)
--- trunk/LayoutTests/ChangeLog 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/ChangeLog 2020-03-17 18:07:55 UTC (rev 258561)
@@ -1,3 +1,32 @@
+2020-03-16 Simon Fraser <simon.fra...@apple.com>
+
+ Clean up some latching tests
+ https://bugs.webkit.org/show_bug.cgi?id=209170
+
+ Reviewed by Antti Koivisto.
+
+ These tests were weird in various ways:
+ - <table>s to take up space when a simple <div> would do
+ - Mixture of js-test-pre/post and waitUntilDone/notifyDone
+ - JS in script tag at the start of the body
+
+ Fix these things.
+
+ * tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt:
+ * tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt:
+ * tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html:
+ * tiled-drawing/scrolling/fast-scroll-div-latched-div.html:
+ * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt:
+ * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html:
+ * tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html:
+ * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
+ * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
+ * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html:
+ * tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html:
+ * tiled-drawing/scrolling/fast-scroll-mainframe-zoom-expected.txt:
+ * tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html:
+ * tiled-drawing/scrolling/scrolling-no-iframe-latching.html:
+
2020-03-17 Jacob Uphoff <jacob_uph...@apple.com>
Unreviewed, reverting r257844.
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt 2020-03-17 18:07:55 UTC (rev 258561)
@@ -1,61 +1,19 @@
Put mouse here and flick downwards
Scrollable Region
-Count DATA Rev Count
-TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP
-1 0.1100 40
-2 0.1155 39
-3 0.2200 38
-4 0.2255 37
-5 0.3300 36
-6 0.3355 35
-7 0.4400 34
-8 0.4455 33
-9 0.5500 32
-10 0.5555 31
-11 0.6600 30
-12 0.6655 29
-13 0.7700 28
-14 0.7755 27
-15 0.8800 26
-16 0.8855 25
-17 0.9900 24
-18 0.9955 23
-19 0.9999 22
-20 1.0000 21
-21 1.0000 20
-22 0.9999 19
-23 0.9955 18
-24 0.9900 17
-25 0.8855 16
-26 0.8800 15
-27 0.7755 14
-28 0.7700 13
-29 0.6655 12
-30 0.6600 11
-31 0.5555 10
-32 0.5500 9
-33 0.4455 8
-34 0.4400 7
-35 0.3355 6
-36 0.3300 5
-37 0.2255 4
-38 0.2200 3
-39 0.1155 2
-40 0.1100 1
-END END END END END END END END END END END END END END END
+Scrolled content
Tests that a scrollable div doesn't pass wheel events to main frame when scrolling at bottom
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS Page did not receive wheel events.
PASS successfullyParsed is true
TEST COMPLETE
-PASS Page did not receive wheel events.
(GraphicsLayer
(anchor 0.00 0.00)
- (bounds 2008.00 2266.00)
+ (bounds 2008.00 2221.00)
(visible rect 0.00, 0.00 785.00 x 585.00)
(coverage rect 0.00, 0.00 785.00 x 585.00)
(intersects coverage rect 1)
@@ -62,7 +20,7 @@
(contentsScale 1.00)
(children 1
(GraphicsLayer
- (bounds 2008.00 2266.00)
+ (bounds 2008.00 2221.00)
(contentsOpaque 1)
(visible rect 0.00, 0.00 785.00 x 585.00)
(coverage rect 0.00, 0.00 1570.00 x 1755.00)
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt 2020-03-17 18:07:55 UTC (rev 258561)
@@ -1,61 +1,19 @@
Put mouse here and flick downwards
Scrollable Region
-Count DATA Rev Count
-TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP
-1 0.1100 40
-2 0.1155 39
-3 0.2200 38
-4 0.2255 37
-5 0.3300 36
-6 0.3355 35
-7 0.4400 34
-8 0.4455 33
-9 0.5500 32
-10 0.5555 31
-11 0.6600 30
-12 0.6655 29
-13 0.7700 28
-14 0.7755 27
-15 0.8800 26
-16 0.8855 25
-17 0.9900 24
-18 0.9955 23
-19 0.9999 22
-20 1.0000 21
-21 1.0000 20
-22 0.9999 19
-23 0.9955 18
-24 0.9900 17
-25 0.8855 16
-26 0.8800 15
-27 0.7755 14
-28 0.7700 13
-29 0.6655 12
-30 0.6600 11
-31 0.5555 10
-32 0.5500 9
-33 0.4455 8
-34 0.4400 7
-35 0.3355 6
-36 0.3300 5
-37 0.2255 4
-38 0.2200 3
-39 0.1155 2
-40 0.1100 1
-END END END END END END END END END END END END END END END
+Scrolled content
Tests that a scrollable div doesn't pass wheel events to main frame when scrolling at bottom
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS Page did not receive wheel events.
PASS successfullyParsed is true
TEST COMPLETE
-PASS Page did not receive wheel events.
(GraphicsLayer
(anchor 0.00 0.00)
- (bounds 2008.00 2266.00)
+ (bounds 2008.00 2221.00)
(visible rect 0.00, 0.00 785.00 x 585.00)
(coverage rect 0.00, 0.00 785.00 x 585.00)
(intersects coverage rect 1)
@@ -62,7 +20,7 @@
(contentsScale 1.00)
(children 1
(GraphicsLayer
- (bounds 2008.00 2266.00)
+ (bounds 2008.00 2221.00)
(contentsOpaque 1)
(visible rect 0.00, 0.00 785.00 x 585.00)
(coverage rect 0.00, 0.00 1570.00 x 1755.00)
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html 2020-03-17 18:07:55 UTC (rev 258561)
@@ -6,107 +6,91 @@
width: 680px;
}
-.table td, .table th {
- padding: 2px;
+.scrolled-content {
+ height: 1036px;
+ width: 100%;
+ background-image: repeating-linear-gradient(silver, white 120px);
}
-
-.table th {
- height: 20px;
- text-align: left;
- font-weight: strong;
-}
-
-.table tr:nth-child(odd) {
- background: #f3f3f3;
-}
-
-.scrollable_select option:nth-child(odd) {
- background: #f3f3f3;
-}
-
</style>
<script src=""
<script>
-var wheelCount = 0;
-function onScrollWheel(evt) {
- wheelCount = wheelCount + 1;
-}
+ window.jsTestIsAsync = true;
-function onLoad() {
- document.addEventListener("mousewheel", onScrollWheel);
- setupTopLevel();
-}
-</script>
-</head>
-<body _onload_="onLoad();">
-<script>
+ var divTarget;
+ var pageScrollPositionBefore;
+ var divScrollPositionBefore;
+ var continueCount = 5;
-var divTarget;
-var pageScrollPositionBefore;
-var divScrollPositionBefore;
-var continueCount = 5;
+ var wheelCount = 0;
+ function onScrollWheel(evt)
+ {
+ wheelCount = wheelCount + 1;
+ }
-function checkForScroll()
-{
- // The div should not have scrolled at all.
- var pageScrollPositionAfter = document.scrollingElement.scrollTop;
- var divScrollPositionAfter = divTarget.scrollTop;
+ function checkForScroll()
+ {
+ // The div should not have scrolled at all.
+ var pageScrollPositionAfter = document.scrollingElement.scrollTop;
+ var divScrollPositionAfter = divTarget.scrollTop;
- if (pageScrollPositionBefore != pageScrollPositionAfter)
- testFailed("Page received wheel events.");
- else
- testPassed("Page did not receive wheel events.");
+ if (pageScrollPositionBefore != pageScrollPositionAfter)
+ testFailed("Page received wheel events.");
+ else
+ testPassed("Page did not receive wheel events.");
- if (window.internals) {
- document.getElementById('layers').innerText = internals.layerTreeAsText(document,
- internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ if (window.internals) {
+ document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+ internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ }
+
+ finishJSTest();
}
- testRunner.notifyDone();
-}
+ function scrollTest()
+ {
+ pageScrollPositionBefore = document.scrollingElement.scrollTop;
-function scrollTest()
-{
- pageScrollPositionBefore = document.scrollingElement.scrollTop;
+ divTarget = document.getElementById('target');
+ divTarget.scrollTop = divTarget.scrollHeight - divTarget.clientHeight - 100;
- divTarget = document.getElementById('target');
- divTarget.scrollTop = divTarget.scrollHeight - divTarget.clientHeight - 100;
+ divScrollPositionBefore = divTarget.scrollTop;
- divScrollPositionBefore = divTarget.scrollTop;
+ // Scroll the #source until we reach the #target.
+ var startPosX = Math.round(divTarget.offsetLeft) + 20;
+ var startPosY = Math.round(divTarget.offsetTop) + 100; // One wheel turn before end.
+ eventSender.mouseMoveTo(startPosX, startPosY);
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+ eventSender.callAfterScrollingCompletes(checkForScroll);
+ }
- // Scroll the #source until we reach the #target.
- var startPosX = Math.round(divTarget.offsetLeft) + 20;
- var startPosY = Math.round(divTarget.offsetTop) + 100; // One wheel turn before end.
- eventSender.mouseMoveTo(startPosX, startPosY);
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
- eventSender.callAfterScrollingCompletes(checkForScroll);
-}
-
-function setupTopLevel()
-{
- if (window.eventSender) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-
- eventSender.monitorWheelEvents();
- setTimeout(scrollTest, 0);
- } else {
- var messageLocation = document.getElementById('parent');
- var message = document.createElement('div');
- message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
- + "near the bottom of the scrollable region, and then use the mouse wheel or a two-finger swipe to scroll up.<br/></br/>"
- + "The page should not scroll.</p>";
- messageLocation.appendChild(message);
+ function setupTopLevel()
+ {
+ if (window.eventSender) {
+ eventSender.monitorWheelEvents();
+ setTimeout(scrollTest, 0);
+ } else {
+ var messageLocation = document.getElementById('parent');
+ var message = document.createElement('div');
+ message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
+ + "near the bottom of the scrollable region, and then use the mouse wheel or a two-finger swipe to scroll up.<br/></br/>"
+ + "The page should not scroll.</p>";
+ messageLocation.appendChild(message);
+ }
}
-}
+ window.addEventListener('load', () => {
+ document.addEventListener("mousewheel", onScrollWheel);
+ setupTopLevel();
+ }, false);
</script>
+</head>
+<body>
<div id="parent" style="height: 2000px; width: 2000px;">
<div id="source" style="height: 100px; width: 500px;">
Put mouse here and flick downwards
@@ -114,51 +98,7 @@
<div class="scrollable_region">
<h3>Scrollable Region</h3>
<div id="target" style='overflow-y: auto; overflow-x: hidden; max-height: 350px;'>
- <table class="table" style='width: 99%'>
- <tr><th>Count</th><th>DATA</th><th>Rev Count</th></tr>
- <tr><td>TOP TOP TOP TOP TOP</td><td>TOP TOP TOP TOP TOP</td><td>TOP TOP TOP TOP TOP</td></tr>
- <tr><td>1</td><td>0.1100</td><td>40</td></tr>
- <tr><td>2</td><td>0.1155</td><td>39</td></tr>
- <tr><td>3</td><td>0.2200</td><td>38</td></tr>
- <tr><td>4</td><td>0.2255</td><td>37</td></tr>
- <tr><td>5</td><td>0.3300</td><td>36</td></tr>
- <tr><td>6</td><td>0.3355</td><td>35</td></tr>
- <tr><td>7</td><td>0.4400</td><td>34</td></tr>
- <tr><td>8</td><td>0.4455</td><td>33</td></tr>
- <tr><td>9</td><td>0.5500</td><td>32</td></tr>
- <tr><td>10</td><td>0.5555</td><td>31</td></tr>
- <tr><td>11</td><td>0.6600</td><td>30</td></tr>
- <tr><td>12</td><td>0.6655</td><td>29</td></tr>
- <tr><td>13</td><td>0.7700</td><td>28</td></tr>
- <tr><td>14</td><td>0.7755</td><td>27</td></tr>
- <tr><td>15</td><td>0.8800</td><td>26</td></tr>
- <tr><td>16</td><td>0.8855</td><td>25</td></tr>
- <tr><td>17</td><td>0.9900</td><td>24</td></tr>
- <tr><td>18</td><td>0.9955</td><td>23</td></tr>
- <tr><td>19</td><td>0.9999</td><td>22</td></tr>
- <tr><td>20</td><td>1.0000</td><td>21</td></tr>
- <tr><td>21</td><td>1.0000</td><td>20</td></tr>
- <tr><td>22</td><td>0.9999</td><td>19</td></tr>
- <tr><td>23</td><td>0.9955</td><td>18</td></tr>
- <tr><td>24</td><td>0.9900</td><td>17</td></tr>
- <tr><td>25</td><td>0.8855</td><td>16</td></tr>
- <tr><td>26</td><td>0.8800</td><td>15</td></tr>
- <tr><td>27</td><td>0.7755</td><td>14</td></tr>
- <tr><td>28</td><td>0.7700</td><td>13</td></tr>
- <tr><td>29</td><td>0.6655</td><td>12</td></tr>
- <tr><td>30</td><td>0.6600</td><td>11</td></tr>
- <tr><td>31</td><td>0.5555</td><td>10</td></tr>
- <tr><td>32</td><td>0.5500</td><td>9</td></tr>
- <tr><td>33</td><td>0.4455</td><td>8</td></tr>
- <tr><td>34</td><td>0.4400</td><td>7</td></tr>
- <tr><td>35</td><td>0.3355</td><td>6</td></tr>
- <tr><td>36</td><td>0.3300</td><td>5</td></tr>
- <tr><td>37</td><td>0.2255</td><td>4</td></tr>
- <tr><td>38</td><td>0.2200</td><td>3</td></tr>
- <tr><td>39</td><td>0.1155</td><td>2</td></tr>
- <tr><td>40</td><td>0.1100</td><td>1</td></tr>
- <tr><td>END END END END END</td><td>END END END END END</td><td>END END END END END</td></tr>
- </table>
+ <div class="scrolled-content">Scrolled content</div>
</div>
</div>
</div>
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div.html (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div.html 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div.html 2020-03-17 18:07:55 UTC (rev 258561)
@@ -6,101 +6,82 @@
width: 680px;
}
-.table td, .table th {
- padding: 2px;
+.scrolled-content {
+ height: 1036px;
+ width: 100%;
+ background-image: repeating-linear-gradient(silver, white 120px);
}
-
-.table th {
- height: 20px;
- text-align: left;
- font-weight: strong;
-}
-
-.table tr:nth-child(odd) {
- background: #f3f3f3;
-}
-
-.scrollable_select option:nth-child(odd) {
- background: #f3f3f3;
-}
-
</style>
<script src=""
<script>
-function onLoad() {
- setupTopLevel();
-}
-</script>
-</head>
-<body _onload_="onLoad();">
-<script>
+ window.jsTestIsAsync = true;
-var divTarget;
-var pageScrollPositionBefore;
-var divScrollPositionBefore;
-var continueCount = 5;
+ var divTarget;
+ var pageScrollPositionBefore;
+ var divScrollPositionBefore;
+ var continueCount = 5;
-function checkForScroll()
-{
- // The div should not have scrolled at all.
- var pageScrollPositionAfter = document.scrollingElement.scrollTop;
- var divScrollPositionAfter = divTarget.scrollTop;
+ function checkForScroll()
+ {
+ // The div should not have scrolled at all.
+ var pageScrollPositionAfter = document.scrollingElement.scrollTop;
+ var divScrollPositionAfter = divTarget.scrollTop;
- if (pageScrollPositionBefore != pageScrollPositionAfter)
- testFailed("Page received wheel events.");
- else
- testPassed("Page did not receive wheel events.");
+ if (pageScrollPositionBefore != pageScrollPositionAfter)
+ testFailed("Page received wheel events.");
+ else
+ testPassed("Page did not receive wheel events.");
- if (window.internals) {
- document.getElementById('layers').innerText = internals.layerTreeAsText(document,
- internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ if (window.internals) {
+ document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+ internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ }
+
+ finishJSTest();
}
- testRunner.notifyDone();
-}
+ function scrollTest()
+ {
+ pageScrollPositionBefore = document.scrollingElement.scrollTop;
-function scrollTest()
-{
- pageScrollPositionBefore = document.scrollingElement.scrollTop;
+ divTarget = document.getElementById('target');
+ divTarget.scrollTop = divTarget.scrollHeight - divTarget.clientHeight - 100;
- divTarget = document.getElementById('target');
- divTarget.scrollTop = divTarget.scrollHeight - divTarget.clientHeight - 100;
+ divScrollPositionBefore = divTarget.scrollTop;
- divScrollPositionBefore = divTarget.scrollTop;
+ // Scroll the #source until we reach the #target.
+ var startPosX = Math.round(divTarget.offsetLeft) + 20;
+ var startPosY = Math.round(divTarget.offsetTop) + 100; // One wheel turn before end.
+ eventSender.mouseMoveTo(startPosX, startPosY);
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+ eventSender.callAfterScrollingCompletes(checkForScroll);
+ }
- // Scroll the #source until we reach the #target.
- var startPosX = Math.round(divTarget.offsetLeft) + 20;
- var startPosY = Math.round(divTarget.offsetTop) + 100; // One wheel turn before end.
- eventSender.mouseMoveTo(startPosX, startPosY);
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
- eventSender.callAfterScrollingCompletes(checkForScroll);
-}
-
-function setupTopLevel()
-{
- if (window.eventSender) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-
- eventSender.monitorWheelEvents();
- setTimeout(scrollTest, 0);
- } else {
- var messageLocation = document.getElementById('parent');
- var message = document.createElement('div');
- message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
- + "near the bottom of the scrollable region and scroll up.<br/><br/>"
- + "The page should not scroll.</p>";
- messageLocation.appendChild(message);
+ function setupTopLevel()
+ {
+ if (window.eventSender) {
+ eventSender.monitorWheelEvents();
+ setTimeout(scrollTest, 0);
+ } else {
+ var messageLocation = document.getElementById('parent');
+ var message = document.createElement('div');
+ message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
+ + "near the bottom of the scrollable region and scroll up.<br/><br/>"
+ + "The page should not scroll.</p>";
+ messageLocation.appendChild(message);
+ }
}
-}
+ window.addEventListener('load', setupTopLevel, false);
</script>
+</head>
+<body>
<div id="parent" style="height: 2000px; width: 2000px;">
<div id="source" style="height: 100px; width: 500px;">
Put mouse here and flick downwards
@@ -108,51 +89,7 @@
<div class="scrollable_region">
<h3>Scrollable Region</h3>
<div id="target" style='overflow-y: auto; overflow-x: hidden; max-height: 350px;'>
- <table class="table" style='width: 99%'>
- <tr><th>Count</th><th>DATA</th><th>Rev Count</th></tr>
- <tr><td>TOP TOP TOP TOP TOP</td><td>TOP TOP TOP TOP TOP</td><td>TOP TOP TOP TOP TOP</td></tr>
- <tr><td>1</td><td>0.1100</td><td>40</td></tr>
- <tr><td>2</td><td>0.1155</td><td>39</td></tr>
- <tr><td>3</td><td>0.2200</td><td>38</td></tr>
- <tr><td>4</td><td>0.2255</td><td>37</td></tr>
- <tr><td>5</td><td>0.3300</td><td>36</td></tr>
- <tr><td>6</td><td>0.3355</td><td>35</td></tr>
- <tr><td>7</td><td>0.4400</td><td>34</td></tr>
- <tr><td>8</td><td>0.4455</td><td>33</td></tr>
- <tr><td>9</td><td>0.5500</td><td>32</td></tr>
- <tr><td>10</td><td>0.5555</td><td>31</td></tr>
- <tr><td>11</td><td>0.6600</td><td>30</td></tr>
- <tr><td>12</td><td>0.6655</td><td>29</td></tr>
- <tr><td>13</td><td>0.7700</td><td>28</td></tr>
- <tr><td>14</td><td>0.7755</td><td>27</td></tr>
- <tr><td>15</td><td>0.8800</td><td>26</td></tr>
- <tr><td>16</td><td>0.8855</td><td>25</td></tr>
- <tr><td>17</td><td>0.9900</td><td>24</td></tr>
- <tr><td>18</td><td>0.9955</td><td>23</td></tr>
- <tr><td>19</td><td>0.9999</td><td>22</td></tr>
- <tr><td>20</td><td>1.0000</td><td>21</td></tr>
- <tr><td>21</td><td>1.0000</td><td>20</td></tr>
- <tr><td>22</td><td>0.9999</td><td>19</td></tr>
- <tr><td>23</td><td>0.9955</td><td>18</td></tr>
- <tr><td>24</td><td>0.9900</td><td>17</td></tr>
- <tr><td>25</td><td>0.8855</td><td>16</td></tr>
- <tr><td>26</td><td>0.8800</td><td>15</td></tr>
- <tr><td>27</td><td>0.7755</td><td>14</td></tr>
- <tr><td>28</td><td>0.7700</td><td>13</td></tr>
- <tr><td>29</td><td>0.6655</td><td>12</td></tr>
- <tr><td>30</td><td>0.6600</td><td>11</td></tr>
- <tr><td>31</td><td>0.5555</td><td>10</td></tr>
- <tr><td>32</td><td>0.5500</td><td>9</td></tr>
- <tr><td>33</td><td>0.4455</td><td>8</td></tr>
- <tr><td>34</td><td>0.4400</td><td>7</td></tr>
- <tr><td>35</td><td>0.3355</td><td>6</td></tr>
- <tr><td>36</td><td>0.3300</td><td>5</td></tr>
- <tr><td>37</td><td>0.2255</td><td>4</td></tr>
- <tr><td>38</td><td>0.2200</td><td>3</td></tr>
- <tr><td>39</td><td>0.1155</td><td>2</td></tr>
- <tr><td>40</td><td>0.1100</td><td>1</td></tr>
- <tr><td>END END END END END</td><td>END END END END END</td><td>END END END END END</td></tr>
- </table>
+ <div class="scrolled-content">Scrolled content</div>
</div>
</div>
</div>
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt 2020-03-17 18:07:55 UTC (rev 258561)
@@ -1,56 +1,14 @@
Put mouse here and flick downwards
Scrollable Region
-Count DATA Rev Count
-TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP
-1 0.1100 40
-2 0.1155 39
-3 0.2200 38
-4 0.2255 37
-5 0.3300 36
-6 0.3355 35
-7 0.4400 34
-8 0.4455 33
-9 0.5500 32
-10 0.5555 31
-11 0.6600 30
-12 0.6655 29
-13 0.7700 28
-14 0.7755 27
-15 0.8800 26
-16 0.8855 25
-17 0.9900 24
-18 0.9955 23
-19 0.9999 22
-20 1.0000 21
-21 1.0000 20
-22 0.9999 19
-23 0.9955 18
-24 0.9900 17
-25 0.8855 16
-26 0.8800 15
-27 0.7755 14
-28 0.7700 13
-29 0.6655 12
-30 0.6600 11
-31 0.5555 10
-32 0.5500 9
-33 0.4455 8
-34 0.4400 7
-35 0.3355 6
-36 0.3300 5
-37 0.2255 4
-38 0.2200 3
-39 0.1155 2
-40 0.1100 1
-END END END END END END END END END END END END END END END
+Scrolled content
Tests that a scrollable div doesn't consume wheel events when scroll is latched to main frame.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS Scrollable div did not receive wheel events.
PASS successfullyParsed is true
TEST COMPLETE
-PASS Scrollable div did not receive wheel events.
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html 2020-03-17 18:07:55 UTC (rev 258561)
@@ -6,123 +6,110 @@
width: 680px;
}
-.table td, .table th {
- padding: 2px;
+.scrolled-content {
+ height: 1036px;
+ width: 100%;
+ background-image: repeating-linear-gradient(silver, white 120px);
}
-
-.table th {
- height: 20px;
- text-align: left;
- font-weight: strong;
-}
-
-.table tr:nth-child(odd) {
- background: #f3f3f3;
-}
-
-.scrollable_select option:nth-child(odd) {
- background: #f3f3f3;
-}
-
</style>
<script src=""
<script>
-var wheelCount = 0;
-function onScrollWheel(evt) {
- wheelCount = wheelCount + 1;
-}
+ window.jsTestIsAsync = true;
-function onLoad() {
- document.addEventListener("mousewheel", onScrollWheel);
- window.addEventListener("scroll", onPageScroll);
- setupTopLevel();
-}
-</script>
-</head>
-<body _onload_="onLoad();">
-<script>
+ var divTarget;
+ var pageScrollPositionBefore;
+ var divScrollPositionBefore;
+ var continueCount = 5;
-var divTarget;
-var pageScrollPositionBefore;
-var divScrollPositionBefore;
-var continueCount = 5;
+ var wheelCount = 0;
+ function onScrollWheel(evt)
+ {
+ wheelCount = wheelCount + 1;
+ }
-function onPageScroll()
-{
- if (document.scrollingElement.scrollTop >= 70)
- checkForScroll();
-}
+ function onPageScroll()
+ {
+ if (document.scrollingElement.scrollTop >= 70)
+ checkForScroll();
+ }
-let didCheckForScroll = false;
-function checkForScroll()
-{
- if (didCheckForScroll)
- return;
- didCheckForScroll = true;
+ let didCheckForScroll = false;
+ function checkForScroll()
+ {
+ if (didCheckForScroll)
+ return;
+ didCheckForScroll = true;
- // The div should not have scrolled at all.
- var pageScrollPositionAfter = document.scrollingElement.scrollTop;
- var divScrollPositionAfter = divTarget.scrollTop;
+ // The div should not have scrolled at all.
+ var pageScrollPositionAfter = document.scrollingElement.scrollTop;
+ var divScrollPositionAfter = divTarget.scrollTop;
- if (divScrollPositionBefore != divScrollPositionAfter)
- testFailed("Scrollable div consumed wheel events.");
- else
- testPassed("Scrollable div did not receive wheel events.");
+ if (divScrollPositionBefore != divScrollPositionAfter)
+ testFailed("Scrollable div consumed wheel events.");
+ else
+ testPassed("Scrollable div did not receive wheel events.");
- if (window.internals) {
- document.getElementById('layers').innerText = internals.layerTreeAsText(document,
- internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ if (window.internals) {
+ document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+ internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ }
+
+ finishJSTest();
}
- testRunner.notifyDone();
-}
+ function scrollTest()
+ {
+ pageScrollPositionBefore = document.scrollingElement.scrollTop;
-function scrollTest()
-{
- pageScrollPositionBefore = document.scrollingElement.scrollTop;
+ divTarget = document.getElementById('target');
- divTarget = document.getElementById('target');
+ divScrollPositionBefore = divTarget.scrollTop;
- divScrollPositionBefore = divTarget.scrollTop;
+ // Scroll the #source until we reach the #target.
+ var startPosX = Math.round(divTarget.offsetLeft) + 20;
+ var startPosY = Math.round(divTarget.offsetTop) - 42;
+ eventSender.mouseMoveTo(startPosX, startPosY);
+ debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+ eventSender.callAfterScrollingCompletes(() => {
+ requestAnimationFrame(checkForScroll);
+ });
+ // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
+ }
- // Scroll the #source until we reach the #target.
- var startPosX = Math.round(divTarget.offsetLeft) + 20;
- var startPosY = Math.round(divTarget.offsetTop) - 42;
- eventSender.mouseMoveTo(startPosX, startPosY);
- debug("Mouse moved to (" + startPosX + ", " + startPosY + ")");
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
- eventSender.callAfterScrollingCompletes(() => {
- requestAnimationFrame(checkForScroll);
- });
- // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
-}
+ function setupTopLevel()
+ {
+ if (window.eventSender) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
-function setupTopLevel()
-{
- if (window.eventSender) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-
- eventSender.monitorWheelEvents();
- setTimeout(scrollTest, 0);
- } else {
- var messageLocation = document.getElementById('parent');
- var message = document.createElement('div');
- message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
- + "at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll the<br/>"
- + "down past the div.<br/><br/>"
- + "The scrollable region should not scroll.</p>";
- messageLocation.appendChild(message);
+ eventSender.monitorWheelEvents();
+ setTimeout(scrollTest, 0);
+ } else {
+ var messageLocation = document.getElementById('parent');
+ var message = document.createElement('div');
+ message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
+ + "at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll the<br/>"
+ + "down past the div.<br/><br/>"
+ + "The scrollable region should not scroll.</p>";
+ messageLocation.appendChild(message);
+ }
}
-}
+ window.addEventListener('load', () => {
+ document.addEventListener("mousewheel", onScrollWheel);
+ window.addEventListener("scroll", onPageScroll);
+ setupTopLevel();
+ }, false);
</script>
+</head>
+<body>
<div id="parent" style="height: 2000px; width: 2000px;">
<div id="source" style="height: 100px; width: 500px;">
Put mouse here and flick downwards
@@ -130,51 +117,7 @@
<div class="scrollable_region">
<h3>Scrollable Region</h3>
<div id="target" style='overflow-y: auto; overflow-x: hidden; height: 350px;'>
- <table class="table" style='width: 99%'>
- <tr><th>Count</th><th>DATA</th><th>Rev Count</th></tr>
- <tr><td>TOP TOP TOP TOP TOP</td><td>TOP TOP TOP TOP TOP</td><td>TOP TOP TOP TOP TOP</td></tr>
- <tr><td>1</td><td>0.1100</td><td>40</td></tr>
- <tr><td>2</td><td>0.1155</td><td>39</td></tr>
- <tr><td>3</td><td>0.2200</td><td>38</td></tr>
- <tr><td>4</td><td>0.2255</td><td>37</td></tr>
- <tr><td>5</td><td>0.3300</td><td>36</td></tr>
- <tr><td>6</td><td>0.3355</td><td>35</td></tr>
- <tr><td>7</td><td>0.4400</td><td>34</td></tr>
- <tr><td>8</td><td>0.4455</td><td>33</td></tr>
- <tr><td>9</td><td>0.5500</td><td>32</td></tr>
- <tr><td>10</td><td>0.5555</td><td>31</td></tr>
- <tr><td>11</td><td>0.6600</td><td>30</td></tr>
- <tr><td>12</td><td>0.6655</td><td>29</td></tr>
- <tr><td>13</td><td>0.7700</td><td>28</td></tr>
- <tr><td>14</td><td>0.7755</td><td>27</td></tr>
- <tr><td>15</td><td>0.8800</td><td>26</td></tr>
- <tr><td>16</td><td>0.8855</td><td>25</td></tr>
- <tr><td>17</td><td>0.9900</td><td>24</td></tr>
- <tr><td>18</td><td>0.9955</td><td>23</td></tr>
- <tr><td>19</td><td>0.9999</td><td>22</td></tr>
- <tr><td>20</td><td>1.0000</td><td>21</td></tr>
- <tr><td>21</td><td>1.0000</td><td>20</td></tr>
- <tr><td>22</td><td>0.9999</td><td>19</td></tr>
- <tr><td>23</td><td>0.9955</td><td>18</td></tr>
- <tr><td>24</td><td>0.9900</td><td>17</td></tr>
- <tr><td>25</td><td>0.8855</td><td>16</td></tr>
- <tr><td>26</td><td>0.8800</td><td>15</td></tr>
- <tr><td>27</td><td>0.7755</td><td>14</td></tr>
- <tr><td>28</td><td>0.7700</td><td>13</td></tr>
- <tr><td>29</td><td>0.6655</td><td>12</td></tr>
- <tr><td>30</td><td>0.6600</td><td>11</td></tr>
- <tr><td>31</td><td>0.5555</td><td>10</td></tr>
- <tr><td>32</td><td>0.5500</td><td>9</td></tr>
- <tr><td>33</td><td>0.4455</td><td>8</td></tr>
- <tr><td>34</td><td>0.4400</td><td>7</td></tr>
- <tr><td>35</td><td>0.3355</td><td>6</td></tr>
- <tr><td>36</td><td>0.3300</td><td>5</td></tr>
- <tr><td>37</td><td>0.2255</td><td>4</td></tr>
- <tr><td>38</td><td>0.2200</td><td>3</td></tr>
- <tr><td>39</td><td>0.1155</td><td>2</td></tr>
- <tr><td>40</td><td>0.1100</td><td>1</td></tr>
- <tr><td>END END END END END</td><td>END END END END END</td><td>END END END END END</td></tr>
- </table>
+ <div class="scrolled-content">Scrolled content</div>
</div>
</div>
</div>
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html 2020-03-17 18:07:55 UTC (rev 258561)
@@ -6,111 +6,97 @@
width: 680px;
}
-.table td, .table th {
- padding: 2px;
+.scrolled-content {
+ height: 1036px;
+ width: 100%;
+ background-image: repeating-linear-gradient(silver, white 120px);
}
-
-.table th {
- height: 20px;
- text-align: left;
- font-weight: strong;
-}
-
-.table tr:nth-child(odd) {
- background: #f3f3f3;
-}
-
-.scrollable_select option:nth-child(odd) {
- background: #f3f3f3;
-}
-
</style>
<script src=""
<script>
-function onLoad() {
- setupTopLevel();
- window.addEventListener("scroll", onPageScroll);
-}
-</script>
-</head>
-<body _onload_="onLoad();">
-<script>
+ window.jsTestIsAsync = true;
-var divTarget;
-var pageScrollPositionBefore;
-var divScrollPositionBefore;
-var continueCount = 5;
+ var divTarget;
+ var pageScrollPositionBefore;
+ var divScrollPositionBefore;
+ var continueCount = 5;
-function onPageScroll()
-{
- if (document.scrollingElement.scrollTop >= 70)
- checkForScroll();
-}
+ function onPageScroll()
+ {
+ if (document.scrollingElement.scrollTop >= 70)
+ checkForScroll();
+ }
-let didCheck = false;
-function checkForScroll()
-{
- if (didCheck)
- return;
- didCheck = true;
+ let didCheck = false;
+ function checkForScroll()
+ {
+ if (didCheck)
+ return;
+ didCheck = true;
- // The div should not have scrolled at all.
- var pageScrollPositionAfter = document.scrollingElement.scrollTop;
- var divScrollPositionAfter = divTarget.scrollTop;
+ // The div should not have scrolled at all.
+ var pageScrollPositionAfter = document.scrollingElement.scrollTop;
+ var divScrollPositionAfter = divTarget.scrollTop;
- if (divScrollPositionBefore != divScrollPositionAfter)
- testFailed("Scrollable div consumed wheel events.");
- else
- testPassed("Scrollable div did not receive wheel events.");
+ if (divScrollPositionBefore != divScrollPositionAfter)
+ testFailed("Scrollable div consumed wheel events.");
+ else
+ testPassed("Scrollable div did not receive wheel events.");
- testRunner.notifyDone();
-}
+ finishJSTest();
+ }
-function scrollTest()
-{
- pageScrollPositionBefore = document.scrollingElement.scrollTop;
+ function scrollTest()
+ {
+ pageScrollPositionBefore = document.scrollingElement.scrollTop;
- divTarget = document.getElementById('target');
+ divTarget = document.getElementById('target');
- divScrollPositionBefore = divTarget.scrollTop;
+ divScrollPositionBefore = divTarget.scrollTop;
- // Scroll the #source until we reach the #target.
- var startPosX = Math.round(divTarget.offsetLeft) + 20;
- var startPosY = Math.round(divTarget.offsetTop) - 42;
- eventSender.mouseMoveTo(startPosX, startPosY);
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
- eventSender.callAfterScrollingCompletes(checkForScroll);
- // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
-}
+ // Scroll the #source until we reach the #target.
+ var startPosX = Math.round(divTarget.offsetLeft) + 20;
+ var startPosY = Math.round(divTarget.offsetTop) - 42;
+ eventSender.mouseMoveTo(startPosX, startPosY);
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -4, 'none', 'continue');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+ eventSender.callAfterScrollingCompletes(checkForScroll);
+ // We should finish via the scroll event; this will fire in the case of failure when the page doesn't scroll.
+ }
-function setupTopLevel()
-{
- if (window.eventSender) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
+ function setupTopLevel()
+ {
+ if (window.eventSender) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
- eventSender.monitorWheelEvents();
- requestIdleCallback(() => {
- setTimeout(scrollTest, 0);
- });
- } else {
- var messageLocation = document.getElementById('parent');
- var message = document.createElement('div');
- message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
- + "at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll the<br/>"
- + "down past the div.<br/><br/>"
- + "The scrollable region should not scroll.</p>";
- messageLocation.appendChild(message);
+ eventSender.monitorWheelEvents();
+ requestIdleCallback(() => {
+ setTimeout(scrollTest, 0);
+ });
+ } else {
+ var messageLocation = document.getElementById('parent');
+ var message = document.createElement('div');
+ message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
+ + "at the top of the page, and then use the mouse wheel or a two-finger swipe to scroll the<br/>"
+ + "down past the div.<br/><br/>"
+ + "The scrollable region should not scroll.</p>";
+ messageLocation.appendChild(message);
+ }
}
-}
+ window.addEventListener('load', () => {
+ setupTopLevel();
+ window.addEventListener("scroll", onPageScroll);
+ }, false);
</script>
+</head>
+<body>
<div id="parent" style="height: 2000px; width: 2000px;">
<div id="source" style="height: 100px; width: 500px;">
Put mouse here and flick downwards
@@ -118,51 +104,7 @@
<div class="scrollable_region">
<h3>Scrollable Region</h3>
<div id="target" style='overflow-y: auto; overflow-x: hidden; height: 350px;'>
- <table class="table" style='width: 99%'>
- <tr><th>Count</th><th>DATA</th><th>Rev Count</th></tr>
- <tr><td>TOP TOP TOP TOP TOP</td><td>TOP TOP TOP TOP TOP</td><td>TOP TOP TOP TOP TOP</td></tr>
- <tr><td>1</td><td>0.1100</td><td>40</td></tr>
- <tr><td>2</td><td>0.1155</td><td>39</td></tr>
- <tr><td>3</td><td>0.2200</td><td>38</td></tr>
- <tr><td>4</td><td>0.2255</td><td>37</td></tr>
- <tr><td>5</td><td>0.3300</td><td>36</td></tr>
- <tr><td>6</td><td>0.3355</td><td>35</td></tr>
- <tr><td>7</td><td>0.4400</td><td>34</td></tr>
- <tr><td>8</td><td>0.4455</td><td>33</td></tr>
- <tr><td>9</td><td>0.5500</td><td>32</td></tr>
- <tr><td>10</td><td>0.5555</td><td>31</td></tr>
- <tr><td>11</td><td>0.6600</td><td>30</td></tr>
- <tr><td>12</td><td>0.6655</td><td>29</td></tr>
- <tr><td>13</td><td>0.7700</td><td>28</td></tr>
- <tr><td>14</td><td>0.7755</td><td>27</td></tr>
- <tr><td>15</td><td>0.8800</td><td>26</td></tr>
- <tr><td>16</td><td>0.8855</td><td>25</td></tr>
- <tr><td>17</td><td>0.9900</td><td>24</td></tr>
- <tr><td>18</td><td>0.9955</td><td>23</td></tr>
- <tr><td>19</td><td>0.9999</td><td>22</td></tr>
- <tr><td>20</td><td>1.0000</td><td>21</td></tr>
- <tr><td>21</td><td>1.0000</td><td>20</td></tr>
- <tr><td>22</td><td>0.9999</td><td>19</td></tr>
- <tr><td>23</td><td>0.9955</td><td>18</td></tr>
- <tr><td>24</td><td>0.9900</td><td>17</td></tr>
- <tr><td>25</td><td>0.8855</td><td>16</td></tr>
- <tr><td>26</td><td>0.8800</td><td>15</td></tr>
- <tr><td>27</td><td>0.7755</td><td>14</td></tr>
- <tr><td>28</td><td>0.7700</td><td>13</td></tr>
- <tr><td>29</td><td>0.6655</td><td>12</td></tr>
- <tr><td>30</td><td>0.6600</td><td>11</td></tr>
- <tr><td>31</td><td>0.5555</td><td>10</td></tr>
- <tr><td>32</td><td>0.5500</td><td>9</td></tr>
- <tr><td>33</td><td>0.4455</td><td>8</td></tr>
- <tr><td>34</td><td>0.4400</td><td>7</td></tr>
- <tr><td>35</td><td>0.3355</td><td>6</td></tr>
- <tr><td>36</td><td>0.3300</td><td>5</td></tr>
- <tr><td>37</td><td>0.2255</td><td>4</td></tr>
- <tr><td>38</td><td>0.2200</td><td>3</td></tr>
- <tr><td>39</td><td>0.1155</td><td>2</td></tr>
- <tr><td>40</td><td>0.1100</td><td>1</td></tr>
- <tr><td>END END END END END</td><td>END END END END END</td><td>END END END END END</td></tr>
- </table>
+ <div class="scrolled-content">Scrolled content</div>
</div>
</div>
</div>
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt 2020-03-17 18:07:55 UTC (rev 258561)
@@ -5,13 +5,13 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS Page did not receive wheel events.
PASS successfullyParsed is true
TEST COMPLETE
-PASS Page did not receive wheel events.
(GraphicsLayer
(anchor 0.00 0.00)
- (bounds 785.00 2266.00)
+ (bounds 785.00 2221.00)
(visible rect 0.00, 0.00 785.00 x 600.00)
(coverage rect 0.00, 0.00 785.00 x 600.00)
(intersects coverage rect 1)
@@ -18,7 +18,7 @@
(contentsScale 1.00)
(children 1
(GraphicsLayer
- (bounds 785.00 2266.00)
+ (bounds 785.00 2221.00)
(contentsOpaque 1)
(visible rect 0.00, 0.00 785.00 x 600.00)
(coverage rect 0.00, 0.00 785.00 x 1800.00)
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt 2020-03-17 18:07:55 UTC (rev 258561)
@@ -5,13 +5,13 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS Page did not receive wheel events.
PASS successfullyParsed is true
TEST COMPLETE
-PASS Page did not receive wheel events.
(GraphicsLayer
(anchor 0.00 0.00)
- (bounds 785.00 2266.00)
+ (bounds 785.00 2221.00)
(visible rect 0.00, 0.00 785.00 x 600.00)
(coverage rect 0.00, 0.00 785.00 x 600.00)
(intersects coverage rect 1)
@@ -18,7 +18,7 @@
(contentsScale 1.00)
(children 1
(GraphicsLayer
- (bounds 785.00 2266.00)
+ (bounds 785.00 2221.00)
(contentsOpaque 1)
(visible rect 0.00, 0.00 785.00 x 600.00)
(coverage rect 0.00, 0.00 785.00 x 1800.00)
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html 2020-03-17 18:07:55 UTC (rev 258561)
@@ -4,88 +4,85 @@
<link rel="help" href=""
<script src=""
<script>
-var wheelCount = 0;
-function onScrollWheel(evt) {
- wheelCount = wheelCount + 1;
-}
+ window.jsTestIsAsync = true;
-function onLoad() {
- document.addEventListener("mousewheel", onScrollWheel);
-}
-</script>
-</head>
-<body _onload_="onLoad();">
-<script>
+ var iframeTarget;
+ var pageScrollPositionBefore;
+ var iFrameScrollPositionBefore;
+ var continueCount = 5;
-var iframeTarget;
-var pageScrollPositionBefore;
-var iFrameScrollPositionBefore;
-var continueCount = 5;
+ var wheelCount = 0;
+ function onScrollWheel(evt)
+ {
+ wheelCount = wheelCount + 1;
+ }
-function checkForScroll()
-{
- // The IFrame should not have scrolled at all.
- var pageScrollPositionAfter = document.scrollingElement.scrollTop;
- var iFrameScrollPositionAfter = window.frames['target'].document.scrollingElement.scrollTop;
+ function checkForScroll()
+ {
+ // The iframe should not have scrolled at all.
+ var pageScrollPositionAfter = document.scrollingElement.scrollTop;
+ var iFrameScrollPositionAfter = window.frames['target'].document.scrollingElement.scrollTop;
- if (pageScrollPositionBefore != pageScrollPositionAfter)
- testFailed("Page received wheel events.");
- else
- testPassed("Page did not receive wheel events.");
+ if (pageScrollPositionBefore != pageScrollPositionAfter)
+ testFailed("Page received wheel events.");
+ else
+ testPassed("Page did not receive wheel events.");
- if (window.internals) {
- document.getElementById('layers').innerText = internals.layerTreeAsText(document,
- internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ if (window.internals) {
+ document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+ internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ }
+
+ finishJSTest();
}
- testRunner.notifyDone();
-}
+ function scrollTest()
+ {
+ pageScrollPositionBefore = document.scrollingElement.scrollTop;
-function scrollTest()
-{
- pageScrollPositionBefore = document.scrollingElement.scrollTop;
+ iframeTarget = document.getElementById('target');
- iframeTarget = document.getElementById('target');
+ var iframeBody = window.frames['target'].document.body;
+ iframeBody.scrollTop = iframeBody.scrollHeight - iframeTarget.clientHeight - 100;
- var iFrameBody = window.frames['target'].document.body;
- iFrameBody.scrollTop = iFrameBody.scrollHeight - iframeTarget.clientHeight - 100;
+ iFrameScrollPositionBefore = iframeBody.scrollTop;
- iFrameScrollPositionBefore = iFrameBody.scrollTop;
+ // Scroll the #source until we reach the #target.
+ var startPosX = Math.round(iframeTarget.offsetLeft) + 20;
+ var startPosY = Math.round(iframeTarget.offsetTop) + 100;
+ eventSender.mouseMoveTo(startPosX, startPosY);
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+ eventSender.callAfterScrollingCompletes(checkForScroll);
+ }
- // Scroll the #source until we reach the #target.
- var startPosX = Math.round(iframeTarget.offsetLeft) + 20;
- var startPosY = Math.round(iframeTarget.offsetTop) + 100;
- eventSender.mouseMoveTo(startPosX, startPosY);
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
- eventSender.callAfterScrollingCompletes(checkForScroll);
-}
-
-function setupTopLevel()
-{
- if (window.eventSender) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-
- eventSender.monitorWheelEvents();
- setTimeout(scrollTest, 0);
- } else {
- var messageLocation = document.getElementById('parent');
- var message = document.createElement('div');
- message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
- + "inside the IFrame, then use the mouse wheel or a two-finger swipe to scroll the IFrame to the bottom (and beyond).<br/>"
- + "<br/><br/>"
- + "The test passes if you scroll far enough to see the row of END labels but the main page does not scroll.</p>";
- messageLocation.appendChild(message);
+ function setupTopLevel()
+ {
+ if (window.eventSender) {
+ eventSender.monitorWheelEvents();
+ setTimeout(scrollTest, 0);
+ } else {
+ var messageLocation = document.getElementById('parent');
+ var message = document.createElement('div');
+ message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
+ + "inside the iframe, then use the mouse wheel or a two-finger swipe to scroll the iframe to the bottom (and beyond).<br/>"
+ + "<br/><br/>"
+ + "The test passes if you scroll far enough to see the row of END labels but the main page does not scroll.</p>";
+ messageLocation.appendChild(message);
+ }
}
-}
-
+
+ window.addEventListener('load', () => {
+ document.addEventListener("mousewheel", onScrollWheel);
+ }, false);
</script>
+</head>
+<body>
<div id="parent" style="height: 2000px">
<div id="source" style="height: 100px">
Put mouse here and flick downwards
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html 2020-03-17 18:07:55 UTC (rev 258561)
@@ -3,79 +3,76 @@
<head>
<link rel="help" href=""
<script src=""
-</head>
-<body>
<script>
+ window.jsTestIsAsync = true;
+
+ var iframeTarget;
+ var pageScrollPositionBefore;
+ var iFrameScrollPositionBefore;
+ var continueCount = 5;
-var iframeTarget;
-var pageScrollPositionBefore;
-var iFrameScrollPositionBefore;
-var continueCount = 5;
+ function checkForScroll()
+ {
+ // The IFrame should not have scrolled at all.
+ var pageScrollPositionAfter = document.scrollingElement.scrollTop;
+ var iFrameScrollPositionAfter = window.frames['target'].document.scrollingElement.scrollTop;
-function checkForScroll()
-{
- // The IFrame should not have scrolled at all.
- var pageScrollPositionAfter = document.scrollingElement.scrollTop;
- var iFrameScrollPositionAfter = window.frames['target'].document.scrollingElement.scrollTop;
+ if (pageScrollPositionBefore != pageScrollPositionAfter)
+ testFailed("Page received wheel events.");
+ else
+ testPassed("Page did not receive wheel events.");
- if (pageScrollPositionBefore != pageScrollPositionAfter)
- testFailed("Page received wheel events.");
- else
- testPassed("Page did not receive wheel events.");
+ if (window.internals) {
+ document.getElementById('layers').innerText = internals.layerTreeAsText(document,
+ internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ }
- if (window.internals) {
- document.getElementById('layers').innerText = internals.layerTreeAsText(document,
- internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ finishJSTest();
}
- testRunner.notifyDone();
-}
+ function scrollTest()
+ {
+ pageScrollPositionBefore = document.scrollingElement.scrollTop;
-function scrollTest()
-{
- pageScrollPositionBefore = document.scrollingElement.scrollTop;
+ iframeTarget = document.getElementById('target');
- iframeTarget = document.getElementById('target');
+ var iFrameBody = window.frames['target'].document.body;
+ iFrameBody.scrollTop = iFrameBody.scrollHeight - iframeTarget.clientHeight - 100;
- var iFrameBody = window.frames['target'].document.body;
- iFrameBody.scrollTop = iFrameBody.scrollHeight - iframeTarget.clientHeight - 100;
+ iFrameScrollPositionBefore = iFrameBody.scrollTop;
- iFrameScrollPositionBefore = iFrameBody.scrollTop;
+ // Scroll the #source until we reach the #target.
+ var startPosX = Math.round(iframeTarget.offsetLeft) + 20;
+ var startPosY = Math.round(iframeTarget.offsetTop) + 100;
+ eventSender.mouseMoveTo(startPosX, startPosY);
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
+ eventSender.callAfterScrollingCompletes(checkForScroll);
+ }
- // Scroll the #source until we reach the #target.
- var startPosX = Math.round(iframeTarget.offsetLeft) + 20;
- var startPosY = Math.round(iframeTarget.offsetTop) + 100;
- eventSender.mouseMoveTo(startPosX, startPosY);
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'changed', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'begin');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'none', 'continue');
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end');
- eventSender.callAfterScrollingCompletes(checkForScroll);
-}
-
-function setupTopLevel()
-{
- if (window.eventSender) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-
- eventSender.monitorWheelEvents();
- setTimeout(scrollTest, 0);
- } else {
- var messageLocation = document.getElementById('parent');
- var message = document.createElement('div');
- message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
- + "inside the IFrame, then use the mouse wheel or a two-finger swipe to scroll the IFrame to the bottom (and beyond).<br/>"
- + "<br/><br/>"
- + "The test passes if you scroll far enough to see the row of END labels but the main page does not scroll.</p>";
- messageLocation.appendChild(message);
+ function setupTopLevel()
+ {
+ if (window.eventSender) {
+ eventSender.monitorWheelEvents();
+ setTimeout(scrollTest, 0);
+ } else {
+ var messageLocation = document.getElementById('parent');
+ var message = document.createElement('div');
+ message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
+ + "inside the IFrame, then use the mouse wheel or a two-finger swipe to scroll the IFrame to the bottom (and beyond).<br/>"
+ + "<br/><br/>"
+ + "The test passes if you scroll far enough to see the row of END labels but the main page does not scroll.</p>";
+ messageLocation.appendChild(message);
+ }
}
-}
-
</script>
+</head>
+<body>
<div id="parent" style="height: 2000px">
<div id="source" style="height: 100px">
Put mouse here and flick downwards
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-mainframe-zoom-expected.txt (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-mainframe-zoom-expected.txt 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-mainframe-zoom-expected.txt 2020-03-17 18:07:55 UTC (rev 258561)
@@ -2,14 +2,13 @@
Perform two text zooms (in). (Command+ in Safari)
Scroll down to the bottom. Be sure to scroll far enough that a rubberband animation is triggered.
Perform two text zooms (out). (Commmand- in Safari)
-TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOPEND END END END END END END END END END END END END
Tests that scroll dimensions return to correct size after rubber banding while zoomed.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS Page properly handled rubber banding state.
PASS successfullyParsed is true
TEST COMPLETE
-PASS Page properly handled rubber banding state.
This should be at the very bottom of the page.
Modified: trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html 2020-03-17 18:07:55 UTC (rev 258561)
@@ -1,107 +1,112 @@
<!DOCTYPE html>
<html>
- <head>
- <script src="" type="text/_javascript_"></script>
- </head>
- <body>
- <script type="text/_javascript_">
- var pageScrollPositionBefore;
- var pageScrollHeightBefore;
- var continueCount = 5;
+<head>
+<script src="" type="text/_javascript_"></script>
+<style>
+ #parent {
+ background-color: #eee;
+ }
+ #target {
+ background-color: silver;
+ }
+</style>
+<script>
+ window.jsTestIsAsync = true;
- function checkForScrollOffset()
- {
- var pageScrollPositionAfter = document.scrollingElement.scrollTop;
- var pageScrollHeightAfter = document.scrollingElement.scrollHeight;
+ var pageScrollPositionBefore;
+ var pageScrollHeightBefore;
+ var continueCount = 5;
- if (pageScrollPositionAfter + 100 >= pageScrollPositionBefore)
- testFailed("Page did not properly handle rubber banding state.");
- else
- testPassed("Page properly handled rubber banding state.");
+ function checkForScrollOffset()
+ {
+ var pageScrollPositionAfter = document.scrollingElement.scrollTop;
+ var pageScrollHeightAfter = document.scrollingElement.scrollHeight;
- testRunner.notifyDone();
- }
+ if (pageScrollPositionAfter + 100 >= pageScrollPositionBefore)
+ testFailed("Page did not properly handle rubber banding state.");
+ else
+ testPassed("Page properly handled rubber banding state.");
- var zoomOutCount = 0;
- function zoomPageOut()
- {
- if (!zoomOutCount) {
- pageScrollPositionBefore = document.scrollingElement.scrollTop;
- pageScrollHeightBefore = document.scrollingElement.scrollHeight;
- }
+ finishJSTest();
+ }
- eventSender.zoomPageOut();
- zoomOutCount = zoomOutCount + 1;
- if (zoomOutCount >= 2)
- setTimeout(checkForScrollOffset, 100);
- else
- setTimeout(zoomPageOut, 100);
- }
+ var zoomOutCount = 0;
+ function zoomPageOut()
+ {
+ if (!zoomOutCount) {
+ pageScrollPositionBefore = document.scrollingElement.scrollTop;
+ pageScrollHeightBefore = document.scrollingElement.scrollHeight;
+ }
- function scrollDown()
- {
- // Scroll the #source until we reach the #target.
- var selectTarget = document.getElementById('target');
- var startPosX = Math.round(selectTarget.offsetLeft) + 20;
- var startPosY = Math.round(selectTarget.offsetTop) - 42; // Slightly more than one wheel scroll away from the target div
- eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the target div
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
- for (var i = 0; i < 40; ++i) {
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'changed', 'none');
- }
- eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
-
- setTimeout(zoomPageOut, 700);
- }
+ eventSender.zoomPageOut();
+ zoomOutCount = zoomOutCount + 1;
+ if (zoomOutCount >= 2)
+ setTimeout(checkForScrollOffset, 100);
+ else
+ setTimeout(zoomPageOut, 100);
+ }
- var zoomInCount = 0;
- function zoomPageIn()
- {
- eventSender.zoomPageIn();
- zoomInCount = zoomInCount + 1;
- if (zoomInCount >= 2)
- setTimeout(scrollDown, 100);
- else
- setTimeout(zoomPageIn, 100);
- }
+ function scrollDown()
+ {
+ // Scroll the #source until we reach the #target.
+ var selectTarget = document.getElementById('target');
+ var startPosX = Math.round(selectTarget.offsetLeft) + 20;
+ var startPosY = Math.round(selectTarget.offsetTop) - 42; // Slightly more than one wheel scroll away from the target div
+ eventSender.mouseMoveTo(startPosX, startPosY); // Make sure we are just outside the target div
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, 'began', 'none');
+ for (var i = 0; i < 40; ++i) {
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -10, 'changed', 'none');
+ }
+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'ended', 'none');
+
+ setTimeout(zoomPageOut, 700);
+ }
- function startTest()
- {
- if (window.eventSender) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
+ var zoomInCount = 0;
+ function zoomPageIn()
+ {
+ eventSender.zoomPageIn();
+ zoomInCount = zoomInCount + 1;
+ if (zoomInCount >= 2)
+ setTimeout(scrollDown, 100);
+ else
+ setTimeout(zoomPageIn, 100);
+ }
- setTimeout(zoomPageIn, 0);
- } else {
- var messageLocation = document.getElementById('parent');
- var message = document.createElement('div');
- message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
- + "at the top of the page, perform two text zooms, scroll to the bottom of the page, then zoom back out.<br/>"
- + "The bottom of the test page should not be offset from the bottom of the web view.<\/p>";
- messageLocation.appendChild(message);
- }
- }
+ function startTest()
+ {
+ if (window.eventSender) {
+ setTimeout(zoomPageIn, 0);
+ } else {
+ var messageLocation = document.getElementById('parent');
+ var message = document.createElement('div');
+ message.innerHTML = "<p>This test is better run under DumpRenderTree. To manually test it, place the mouse pointer<br/>"
+ + "at the top of the page, perform two text zooms, scroll to the bottom of the page, then zoom back out.<br/>"
+ + "The bottom of the test page should not be offset from the bottom of the web view.<\/p>";
+ messageLocation.appendChild(message);
+ }
+ }
- window.addEventListener('load', startTest, false);
- </script>
- <div id="parent" style="height: 2000px;">
- <div id="source" style="height: 100px">
- Put mouse here and do the following:
- <ol>
- <li>Perform two text zooms (in). (Command+ in Safari)</li>
- <li>Scroll down to the bottom. Be sure to scroll far enough that a rubberband animation is triggered.</li>
- <li>Perform two text zooms (out). (Commmand- in Safari)</li>
- </ol>
- </div>
- <div id="target" style="height: 1000px; position: relative">
- <div style="position: absolute; top: 0">TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP TOP</div>
- <div style="position: absolute; bottom: 0">END END END END END END END END END END END END END</div>
- </div>
+ window.addEventListener('load', startTest, false);
+</script>
+</head>
+<body>
+ <div id="parent" style="height: 2000px;">
+ <div id="source" style="height: 100px">
+ Put mouse here and do the following:
+ <ol>
+ <li>Perform two text zooms (in). (Command+ in Safari)</li>
+ <li>Scroll down to the bottom. Be sure to scroll far enough that a rubberband animation is triggered.</li>
+ <li>Perform two text zooms (out). (Commmand- in Safari)</li>
+ </ol>
</div>
- <div id="console"></div><script type="text/_javascript_">
- description("Tests that scroll dimensions return to correct size after rubber banding while zoomed.");
- </script>
- <div id="bottom">This should be at the very bottom of the page.</div>
- <script src="" type="text/_javascript_"></script>
- </body>
+ <div id="target" style="height: 1000px; position: relative">
+ </div>
+ </div>
+ <div id="console"></div><script type="text/_javascript_">
+ description("Tests that scroll dimensions return to correct size after rubber banding while zoomed.");
+ </script>
+ <div id="bottom">This should be at the very bottom of the page.</div>
+ <script src="" type="text/_javascript_"></script>
+</body>
</html>
Modified: trunk/LayoutTests/tiled-drawing/scrolling/scrolling-no-iframe-latching.html (258560 => 258561)
--- trunk/LayoutTests/tiled-drawing/scrolling/scrolling-no-iframe-latching.html 2020-03-17 18:07:10 UTC (rev 258560)
+++ trunk/LayoutTests/tiled-drawing/scrolling/scrolling-no-iframe-latching.html 2020-03-17 18:07:55 UTC (rev 258561)
@@ -40,10 +40,8 @@
function setupTopLevel()
{
- if (window.eventSender) {
- testRunner.dumpAsText();
+ if (window.eventSender)
setTimeout(scrollTest, 0);
- }
setTimeout(checkForScroll, 1000);
}