WebKit Bugzilla
Attachment 349387 Details for
Bug 189495
: Modify more tests to use document.scrollingElement to access viewport scroll properties
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189495-20180911094410.patch (text/plain), 113.56 KB, created by
Frédéric Wang (:fredw)
on 2018-09-11 00:44:12 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-09-11 00:44:12 PDT
Size:
113.56 KB
patch
obsolete
>Subversion Revision: 235886 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 083fd489d92f35086ef5d8890afcdcfcbda76fd2..c52686e095b7f9dfe620d0b687166c27383c2ff9 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,129 @@ >+2018-09-10 Frederic Wang <fwang@igalia.com> >+ >+ Modify more tests to use document.scrollingElement to access viewport scroll properties >+ https://bugs.webkit.org/show_bug.cgi?id=189495 >+ >+ After r235806, it is wrong to use document.body to access scroll properties of the viewport >+ in standard mode. New tests added since r227781 are modified to use >+ document.scrollingElement instead and avoid flaky behavior. For consistency, we do the same >+ for old tests in quirks mode. Note that WPT tests as well as the following tests using >+ document.body on purpose are not modified: >+ - fast/dom/Element/* >+ - events/scroll-in-scaled-page-with-overflow-hidden.html >+ - compositing/ios/overflow-scroll-update-overlap.html >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * compositing/rtl/rtl-absolute-overflow-scrolled.html: >+ * compositing/rtl/rtl-fixed-overflow-scrolled.html: >+ * editing/caret/ios/absolute-caret-position-after-scroll.html: >+ * editing/caret/ios/fixed-caret-position-after-scroll.html: >+ * editing/execCommand/delete-no-scroll.html: >+ * editing/input/resources/reveal-utilities.js: >+ (performJumpAtTheEdgeTest): >+ * editing/pasteboard/copy-crash.html: >+ * editing/selection/ios/absolute-selection-after-scroll.html: >+ * editing/selection/ios/fixed-selection-after-scroll.html: >+ * fast/autoresize/autoresize-with-iframe-expected.txt: >+ * fast/autoresize/autoresize-with-iframe.html: >+ * fast/autoresize/basic-expected.txt: >+ * fast/autoresize/basic.html: >+ * fast/autoresize/turn-off-autoresize-expected.txt: >+ * fast/autoresize/turn-off-autoresize.html: >+ * fast/css/element-scrollByLines-scrollByPages-obsolete.html: >+ * fast/dom/non-numeric-values-numeric-parameters-expected.txt: >+ * fast/dom/non-numeric-values-numeric-parameters.html: >+ * fast/dom/resources/check-scroll-position-onload.html: >+ * fast/dom/scroll-position-for-new-loads.html: >+ * fast/events/attempt-scroll-with-no-scrollbars.html: >+ * fast/events/fire-scroll-event.html: >+ * fast/events/frame-scroll-fake-mouse-move.html: >+ * fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt: >+ * fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe.html: >+ * fast/events/ios/touch-events-during-scroll-deceleration-in-overflow.html: >+ * fast/events/mouse-cursor-image-set.html: >+ * fast/events/mouse-cursor-multiframecur.html: >+ * fast/events/mouse-cursor.html: >+ * fast/events/no-scroll-on-input-text-selection-expected.txt: >+ * fast/events/no-scroll-on-input-text-selection.html: >+ * fast/events/platform-wheelevent-paging-x-in-non-scrolling-page-expected.txt: >+ * fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html: >+ * fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt: >+ * fast/events/platform-wheelevent-paging-x-in-scrolling-page.html: >+ * fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt: >+ * fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html: >+ * fast/events/platform-wheelevent-paging-y-in-non-scrolling-page-expected.txt: >+ * fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html: >+ * fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt: >+ * fast/events/platform-wheelevent-paging-y-in-scrolling-page.html: >+ * fast/events/scale-and-scroll-body-expected.txt: >+ * fast/events/scale-and-scroll-body.html: >+ * fast/events/scale-and-scroll-window-expected.txt: >+ * fast/events/scale-and-scroll-window.html: >+ * fast/events/scroll-after-click-on-tab-index.html: >+ * fast/events/scroll-to-anchor-in-overflow-hidden.html: >+ * fast/events/touch/ios/touchmove-cancelable-after-touchstart-expected.txt: >+ * fast/events/touch/ios/touchmove-cancelable-after-touchstart.html: >+ * fast/forms/autofocus-opera-003.html: >+ * fast/forms/input-readonly-autoscroll.html: >+ * fast/forms/resources/common.js: >+ (getAbsoluteRect): >+ * fast/frames/iframe-scroll-page-up-down.html: >+ * fast/frames/transparent-scrollbar.html: >+ * fast/harness/results.html: >+ * fast/html/empty-fragment-id-goto-top-expected.txt: >+ * fast/html/empty-fragment-id-goto-top.html: >+ * fast/images/imagemap-scroll.html: >+ * fast/loader/scroll-position-restored-on-back-non-cached.html: >+ * fast/loader/scroll-position-restored-on-back.html: >+ * fast/multicol/body-stuck-with-dirty-bit-with-columns.html: >+ * fast/repaint/resources/iframe-scroll-repaint-iframe.html: >+ * fast/scrolling/ios/iframe-scroll-into-view.html: >+ * fast/scrolling/latching/scroll-div-latched-div.html: >+ * fast/scrolling/latching/scroll-div-latched-mainframe.html: >+ * fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html: >+ * fast/scrolling/latching/scroll-iframe-fragment.html: >+ * fast/scrolling/latching/scroll-iframe-latched-iframe.html: >+ * fast/scrolling/latching/scroll-iframe-latched-mainframe.html: >+ * fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html: >+ * fast/scrolling/latching/scroll-select-bottom-test.html: >+ * fast/scrolling/latching/scroll-select-latched-mainframe.html: >+ * fast/scrolling/latching/scroll-select-latched-select.html: >+ * fast/scrolling/rtl-point-in-iframe.html: >+ * fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html: >+ * fast/table/assert-when-visual-overflow-is-cleared.html: >+ * fast/transforms/selection-bounds-in-transformed-view.html: >+ * http/tests/navigation/anchor-frames-cross-origin-expected.txt: >+ * http/tests/navigation/resources/frame-with-anchor-cross-origin.html: >+ * jquery/resources/test/unit/offset.js: >+ * legacy-animation-engine/fast/harness/results.html: >+ * media/video-controls-to-not-scroll-page-on-load.html: >+ * media/video-main-content-allow-then-scroll-expected.txt: >+ * media/video-main-content-allow-then-scroll.html: >+ * scrollbars/scrollbar-large-overflow-rectangle.html: >+ * 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-with-handler.html: >+ * 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-iframe-latched-mainframe-with-handler.html: >+ * tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html: >+ * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html: >+ * tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html: >+ * tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html: >+ * tiled-drawing/scrolling/fast-scroll-select-latched-select.html: >+ * tiled-drawing/scrolling/latched-to-deleted-node.html: >+ * tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html: >+ * tiled-drawing/scrolling/non-fast-region/top-content-inset.html: >+ * tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html: >+ * tiled-drawing/scrolling/root-overflow-with-mousewheel.html: >+ * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html: >+ * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html: >+ * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html: >+ * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html: >+ * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html: >+ * tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe.html: >+ > 2018-09-10 Michael Saboff <msaboff@apple.com> > > Test262 failure with Named Capture Groups - using a reference before the group is defined >diff --git a/LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled.html b/LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled.html >index 0a70c0a6c7074c1ae5c228ba02b5726ae1cad7ef..7b21d354d7ac1389da4e85d8e3a0e7669a62de4a 100644 >--- a/LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled.html >+++ b/LayoutTests/compositing/rtl/rtl-absolute-overflow-scrolled.html >@@ -44,7 +44,7 @@ > } > > // The far left coordinate of the document varies by window width. >- var offset = document.body.clientWidth - document.body.scrollWidth + 1; >+ var offset = document.body.clientWidth - document.scrollingElement.scrollWidth + 1; > document.getElementById('layer').style.left = offset + 50; > document.getElementById('indicator').style.left = offset + 50; > >diff --git a/LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled.html b/LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled.html >index 0607e444574c4b1802eec14ab6c9cbda9fb5ad17..107615d8b2c9757d2c9b07f7046b8f926518becf 100644 >--- a/LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled.html >+++ b/LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled.html >@@ -45,7 +45,7 @@ > } > > // The far left coordinate of the document varies by window width. >- var offset = document.body.clientWidth - document.body.scrollWidth + 1; >+ var offset = document.body.clientWidth - document.scrollingElement.scrollWidth + 1; > > window.setTimeout(function() { > window.scrollTo(offset, 0); >diff --git a/LayoutTests/editing/caret/ios/absolute-caret-position-after-scroll.html b/LayoutTests/editing/caret/ios/absolute-caret-position-after-scroll.html >index a0ec9d0ca7362a40c223a56595339420987989ee..3474e027049cbf887e227ead3f83875e13b411a4 100644 >--- a/LayoutTests/editing/caret/ios/absolute-caret-position-after-scroll.html >+++ b/LayoutTests/editing/caret/ios/absolute-caret-position-after-scroll.html >@@ -45,7 +45,7 @@ jsTestIsAsync = true; > shouldBe("initialCaretRect.top", "21"); > shouldBe("initialCaretRect.width", "3"); > shouldBe("initialCaretRect.height", "15"); >- document.body.scrollTop += 5000; >+ document.scrollingElement.scrollTop += 5000; > return UIHelper.getUICaretRect(); > }) > .then((rect) => { >diff --git a/LayoutTests/editing/caret/ios/fixed-caret-position-after-scroll.html b/LayoutTests/editing/caret/ios/fixed-caret-position-after-scroll.html >index 80ae21c9687748ec7235a5e12b7e375df8f859e2..fa5b27a6f174cdb80653634ceb1102904e10fda5 100644 >--- a/LayoutTests/editing/caret/ios/fixed-caret-position-after-scroll.html >+++ b/LayoutTests/editing/caret/ios/fixed-caret-position-after-scroll.html >@@ -45,7 +45,7 @@ jsTestIsAsync = true; > shouldBe("initialCaretRect.top", "21"); > shouldBe("initialCaretRect.width", "3"); > shouldBe("initialCaretRect.height", "15"); >- document.body.scrollTop += 5000; >+ document.scrollingElement.scrollTop += 5000; > return UIHelper.getUICaretRect(); > }) > .then((rect) => { >diff --git a/LayoutTests/editing/execCommand/delete-no-scroll.html b/LayoutTests/editing/execCommand/delete-no-scroll.html >index 456ba4abeedec33016f66501c81db60b4a125351..28a0e10072caabb29ed11e0e4fb504f10df9dbdc 100644 >--- a/LayoutTests/editing/execCommand/delete-no-scroll.html >+++ b/LayoutTests/editing/execCommand/delete-no-scroll.html >@@ -24,7 +24,7 @@ > window.scrollTo(0, 1000); > document.execCommand("Delete"); > >- var result = (document.body.scrollTop == 1000) ? "SUCCESS" : "FAILURE"; >+ var result = (document.scrollingElement.scrollTop == 1000) ? "SUCCESS" : "FAILURE"; > if (window.testRunner) { > testRunner.notifyDone(); > document.write(result); >diff --git a/LayoutTests/editing/input/resources/reveal-utilities.js b/LayoutTests/editing/input/resources/reveal-utilities.js >index a2ef3667b3be094491e0b6ad46f4aa5b12859d94..53f2f159fdc1a8c13b679430ed2ac90182d1cd08 100644 >--- a/LayoutTests/editing/input/resources/reveal-utilities.js >+++ b/LayoutTests/editing/input/resources/reveal-utilities.js >@@ -73,9 +73,9 @@ function performJumpAtTheEdgeTest(useCtrlKeyModifier) > var previousScrollTop = 0, currentScrollTop = 0; > var jumpDetected = false; > for (var i = 0; i < 120; ++i) { >- previousScrollTop = document.body.scrollTop; >+ previousScrollTop = document.scrollingElement.scrollTop; > eventSender.keyDown("\r", useCtrlKeyModifier ? ["ctrlKey"] : []); >- currentScrollTop = document.body.scrollTop; >+ currentScrollTop = document.scrollingElement.scrollTop; > // Smooth scrolls are allowed. > if (Math.abs(previousScrollTop - currentScrollTop) > 24) { > jumpDetected = true; >diff --git a/LayoutTests/editing/pasteboard/copy-crash.html b/LayoutTests/editing/pasteboard/copy-crash.html >index 0670d05bb294c44cd371fe9bde76a20a0b03666f..d3d506e1570f398e145da5b80f76b0633a090d68 100644 >--- a/LayoutTests/editing/pasteboard/copy-crash.html >+++ b/LayoutTests/editing/pasteboard/copy-crash.html >@@ -104,7 +104,7 @@ > if (e.pageX) { > x = e.pageX; > } else if (e.clientX) { >- x = e.clientX + document.body.scrollLeft; >+ x = e.clientX + document.scrollingElement.scrollLeft; > } else { > x = 0; > } >@@ -117,7 +117,7 @@ > if (e.pageY) { > y = e.pageY; > } else if (e.clientY) { >- y = e.clientY + document.body.scrollTop; >+ y = e.clientY + document.scrollingElement.scrollTop; > } else { > y = 0; > } >diff --git a/LayoutTests/editing/selection/ios/absolute-selection-after-scroll.html b/LayoutTests/editing/selection/ios/absolute-selection-after-scroll.html >index a7c2bba9060208808dd755d67350146c9ebf1a5b..bd52ecf2fb002cad7fdf01886c3b8900dd670d8f 100644 >--- a/LayoutTests/editing/selection/ios/absolute-selection-after-scroll.html >+++ b/LayoutTests/editing/selection/ios/absolute-selection-after-scroll.html >@@ -54,7 +54,7 @@ > shouldBe("initialSelectionRects[0].top", "0"); > shouldBe("initialSelectionRects[0].width", "309"); > shouldBe("initialSelectionRects[0].height", "114"); >- document.body.scrollTop += 5000; >+ document.scrollingElement.scrollTop += 5000; > return UIHelper.getUISelectionRects(); > }) > .then((rects) => { >diff --git a/LayoutTests/editing/selection/ios/fixed-selection-after-scroll.html b/LayoutTests/editing/selection/ios/fixed-selection-after-scroll.html >index 8da8b39850c1c093bf06b21b8cf4aaa1bdbbcaa5..5076f52f8f2bb5c32daea69b9d80b743587a5a5d 100644 >--- a/LayoutTests/editing/selection/ios/fixed-selection-after-scroll.html >+++ b/LayoutTests/editing/selection/ios/fixed-selection-after-scroll.html >@@ -54,7 +54,7 @@ > shouldBe("initialSelectionRects[0].top", "0"); > shouldBe("initialSelectionRects[0].width", "309"); > shouldBe("initialSelectionRects[0].height", "114"); >- document.body.scrollTop += 5000; >+ document.scrollingElement.scrollTop += 5000; > return UIHelper.getUISelectionRects(); > }) > .then((rects) => { >diff --git a/LayoutTests/fast/autoresize/autoresize-with-iframe-expected.txt b/LayoutTests/fast/autoresize/autoresize-with-iframe-expected.txt >index 84cfad491460d2818a8db2aad578118a6189a0d7..834adc164e654ff96a987e0b2fb944f7ebe7e9c8 100644 >--- a/LayoutTests/fast/autoresize/autoresize-with-iframe-expected.txt >+++ b/LayoutTests/fast/autoresize/autoresize-with-iframe-expected.txt >@@ -4,7 +4,7 @@ > Frame: 'frame' > -------- > This test only works in DumpRenderTree since it relies on setting up autoresize from javascript. It verifies that iframes are sized correctly when the main window is autoresized. On success, you should see a series of PASS messages followed by a DONE. >-PASS: document.body.scrollWidth equaled 400 >-PASS: document.body.scrollHeight equaled 200 >+PASS: document.scrollingElement.scrollWidth equaled 400 >+PASS: document.scrollingElement.scrollHeight equaled 200 > DONE > >diff --git a/LayoutTests/fast/autoresize/autoresize-with-iframe.html b/LayoutTests/fast/autoresize/autoresize-with-iframe.html >index c1abe078944f3316498317b25fc094878cc69cab..4f5e1956b5c629787acde3490ad643745b6deb7f 100644 >--- a/LayoutTests/fast/autoresize/autoresize-with-iframe.html >+++ b/LayoutTests/fast/autoresize/autoresize-with-iframe.html >@@ -12,8 +12,8 @@ if (window.testRunner) { > function run() > { > var frameWindow = document.getElementById("frame").contentWindow; >- frameWindow.postMessage("shouldBe('document.body.scrollWidth', 400)", "*"); >- frameWindow.postMessage("shouldBe('document.body.scrollHeight', 200)", "*"); >+ frameWindow.postMessage("shouldBe('document.scrollingElement.scrollWidth', 400)", "*"); >+ frameWindow.postMessage("shouldBe('document.scrollingElement.scrollHeight', 200)", "*"); > frameWindow.postMessage("log('DONE'); if (window.testRunner) testRunner.notifyDone();", "*"); > } > </script> >diff --git a/LayoutTests/fast/autoresize/basic-expected.txt b/LayoutTests/fast/autoresize/basic-expected.txt >index b9d436eb3a971bf154302f928296a3c75aff2536..78f674c90f0ad0b65956db97dfe6174d662ba877 100644 >--- a/LayoutTests/fast/autoresize/basic-expected.txt >+++ b/LayoutTests/fast/autoresize/basic-expected.txt >@@ -4,8 +4,8 @@ When it succeeds, there should be a series of PASS messages followed by a DONE m > > PASS: document.body.clientWidth equaled window.innerWidth > PASS: document.body.clientHeight equaled window.innerHeight >-PASS: document.body.scrollWidth equaled window.innerWidth >-PASS: document.body.scrollHeight equaled window.innerHeight >+PASS: document.scrollingElement.scrollWidth equaled window.innerWidth >+PASS: document.scrollingElement.scrollHeight equaled window.innerHeight > PASS: window.innerWidth equaled window.outerWidth > PASS: window.innerHeight equaled window.outerHeight > DONE >diff --git a/LayoutTests/fast/autoresize/basic.html b/LayoutTests/fast/autoresize/basic.html >index 6e3771a6a20798425832cb3f89d83c5e64ab61ba..2eaf32dcbb590cf73d1dbfa90673439d60b78f7f 100644 >--- a/LayoutTests/fast/autoresize/basic.html >+++ b/LayoutTests/fast/autoresize/basic.html >@@ -10,8 +10,8 @@ function runTest() > } > shouldBe('document.body.clientWidth', 'window.innerWidth'); > shouldBe('document.body.clientHeight', 'window.innerHeight'); >- shouldBe('document.body.scrollWidth', 'window.innerWidth'); >- shouldBe('document.body.scrollHeight', 'window.innerHeight'); >+ shouldBe('document.scrollingElement.scrollWidth', 'window.innerWidth'); >+ shouldBe('document.scrollingElement.scrollHeight', 'window.innerHeight'); > shouldBe('window.innerWidth', 'window.outerWidth'); > shouldBe('window.innerHeight', 'window.outerHeight'); > log('DONE'); >diff --git a/LayoutTests/fast/autoresize/turn-off-autoresize-expected.txt b/LayoutTests/fast/autoresize/turn-off-autoresize-expected.txt >index 33d71a73e6c913dda635dab42b3444172580aac5..66227eab2688dd62ea6214f9d44503beeae1235c 100644 >--- a/LayoutTests/fast/autoresize/turn-off-autoresize-expected.txt >+++ b/LayoutTests/fast/autoresize/turn-off-autoresize-expected.txt >@@ -4,8 +4,8 @@ When it succeeds, there should be a series of PASS messages followed by a DONE m > > PASS: document.body.clientWidth equaled window.innerWidth > PASS: document.body.clientHeight equaled window.innerHeight >-PASS: document.body.scrollWidth equaled window.innerWidth >-PASS: document.body.scrollHeight equaled window.innerHeight >+PASS: document.scrollingElement.scrollWidth equaled window.innerWidth >+PASS: document.scrollingElement.scrollHeight equaled window.innerHeight > PASS: window.innerWidth equaled window.outerWidth > PASS: window.innerHeight equaled window.outerHeight > PASS: window.outerWidth equaled 200 >diff --git a/LayoutTests/fast/autoresize/turn-off-autoresize.html b/LayoutTests/fast/autoresize/turn-off-autoresize.html >index 27a419ae190fa59aaf8497f7fa074e9516e11b3f..5a7eed629c95e30f725786b237972523c8340b12 100644 >--- a/LayoutTests/fast/autoresize/turn-off-autoresize.html >+++ b/LayoutTests/fast/autoresize/turn-off-autoresize.html >@@ -10,8 +10,8 @@ function runTest() > } > shouldBe('document.body.clientWidth', 'window.innerWidth'); > shouldBe('document.body.clientHeight', 'window.innerHeight'); >- shouldBe('document.body.scrollWidth', 'window.innerWidth'); >- shouldBe('document.body.scrollHeight', 'window.innerHeight'); >+ shouldBe('document.scrollingElement.scrollWidth', 'window.innerWidth'); >+ shouldBe('document.scrollingElement.scrollHeight', 'window.innerHeight'); > shouldBe('window.innerWidth', 'window.outerWidth'); > shouldBe('window.innerHeight', 'window.outerHeight'); > if (window.testRunner) >diff --git a/LayoutTests/fast/css/element-scrollByLines-scrollByPages-obsolete.html b/LayoutTests/fast/css/element-scrollByLines-scrollByPages-obsolete.html >index aafd73740ce7fbd318330d27f0f13edb0a2a3e91..504ac6a90ea17fbe087bb246cfef05670720e473 100644 >--- a/LayoutTests/fast/css/element-scrollByLines-scrollByPages-obsolete.html >+++ b/LayoutTests/fast/css/element-scrollByLines-scrollByPages-obsolete.html >@@ -5,12 +5,12 @@ > <script src="../../resources/testharnessreport.js"></script> > <script> > test(function() { >- assert_equals(document.body.scrollByLines, undefined); >+ assert_equals(document.scrollingElement.scrollByLines, undefined); > assert_equals(Element.prototype.scrollByLines, undefined); > }, "Element.scrollByLines"); > > test(function() { >- assert_equals(document.body.scrollByPages, undefined); >+ assert_equals(document.scrollingElement.scrollByPages, undefined); > assert_equals(Element.prototype.scrollByPages, undefined); > }, "Element.scrollByPages"); > </script> >diff --git a/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt b/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt >index 67b2fc087859e28d2ac39913aa8bc7cd37867897..6da81e27915389a586a8fd1aa860b80fce7aee0e 100644 >--- a/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt >+++ b/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt >@@ -21,8 +21,8 @@ PASS nonNumericPolicy('createCSSStyleSheet().removeRule(x)') is 'any type allowe > PASS nonNumericPolicy('createCSSValueList().item(x)') is 'any type allowed (but not omitted)' > PASS nonNumericPolicy('document.elementFromPoint(x, 0)') is 'mixed' > PASS nonNumericPolicy('document.elementFromPoint(0, x)') is 'mixed' >-PASS nonNumericPolicy('document.body.scrollLeft = x') is 'any type allowed' >-PASS nonNumericPolicy('document.body.scrollTop = x') is 'any type allowed' >+PASS nonNumericPolicy('document.scrollingElement.scrollLeft = x') is 'any type allowed' >+PASS nonNumericPolicy('document.scrollingElement.scrollTop = x') is 'any type allowed' > PASS nonNumericPolicy('document.images.item(x)') is 'any type allowed (but not omitted)' > PASS nonNumericPolicy('document.createElement("input").setSelectionRange(x, 0)') is 'any type allowed' > PASS nonNumericPolicy('document.createElement("input").setSelectionRange(0, x)') is 'any type allowed (but not omitted)' >diff --git a/LayoutTests/fast/dom/non-numeric-values-numeric-parameters.html b/LayoutTests/fast/dom/non-numeric-values-numeric-parameters.html >index 49b8394f83f6db6a9a3c1f006672c66e1f616831..8e037a05423027e86b2ddffe7a76a82781479e5f 100644 >--- a/LayoutTests/fast/dom/non-numeric-values-numeric-parameters.html >+++ b/LayoutTests/fast/dom/non-numeric-values-numeric-parameters.html >@@ -231,8 +231,8 @@ shouldBe("nonNumericPolicy('document.elementFromPoint(0, x)')", "'mixed'"); > > // Element > >-shouldBe("nonNumericPolicy('document.body.scrollLeft = x')", "'any type allowed'"); >-shouldBe("nonNumericPolicy('document.body.scrollTop = x')", "'any type allowed'"); >+shouldBe("nonNumericPolicy('document.scrollingElement.scrollLeft = x')", "'any type allowed'"); >+shouldBe("nonNumericPolicy('document.scrollingElement.scrollTop = x')", "'any type allowed'"); > > // History > >diff --git a/LayoutTests/fast/dom/resources/check-scroll-position-onload.html b/LayoutTests/fast/dom/resources/check-scroll-position-onload.html >index f45bcf7bcf33e0ad2c24950648a8959017d793d3..074d6f6656154c3857cc2d2dcab9f080d65a3e99 100644 >--- a/LayoutTests/fast/dom/resources/check-scroll-position-onload.html >+++ b/LayoutTests/fast/dom/resources/check-scroll-position-onload.html >@@ -7,7 +7,7 @@ > <script type="text/javascript"> > function load() { > var result = document.getElementById("result"); >- result.innerHTML = (document.body.scrollTop == 0) ? "PASS" : "FAIL"; >+ result.innerHTML = (document.scrollingElement.scrollTop == 0) ? "PASS" : "FAIL"; > if (window.testRunner) { > testRunner.notifyDone(); > } >diff --git a/LayoutTests/fast/dom/scroll-position-for-new-loads.html b/LayoutTests/fast/dom/scroll-position-for-new-loads.html >index a87c80048e2bf08786d0e272bd7104a8ba47dd48..b1fdba4d8e91ab7b6446fc322bb840568252b9f1 100644 >--- a/LayoutTests/fast/dom/scroll-position-for-new-loads.html >+++ b/LayoutTests/fast/dom/scroll-position-for-new-loads.html >@@ -1,7 +1,7 @@ > <!DOCTYPE html> > <html> > <head> >- <title>Check that document.body.scrollTop is equal to '0' for newly loaded pages</title> >+ <title>Check that document.scrollingElement.scrollTop is equal to '0' for newly loaded pages</title> > <link rel="author" title="Mikhail Pozdnyakov" href="mailto:mikhail.pozdnyakov@intel.com" /> > <style type="text/css"> > div { min-height: 3000px; } >diff --git a/LayoutTests/fast/events/attempt-scroll-with-no-scrollbars.html b/LayoutTests/fast/events/attempt-scroll-with-no-scrollbars.html >index 0177d5208251acaf3d2b762b9699b014f132685b..e33e924061c8d1de8c34efba2cf66428aa79aa82 100644 >--- a/LayoutTests/fast/events/attempt-scroll-with-no-scrollbars.html >+++ b/LayoutTests/fast/events/attempt-scroll-with-no-scrollbars.html >@@ -25,10 +25,10 @@ function doNewWindow() > > function printResult() > { >- if (theWinref.document.body.scrollTop == 0) >+ if (theWinref.document.scrollingElement.scrollTop == 0) > document.getElementById("console").innerHTML = "PASSED"; > else >- document.getElementById("console").innerHTML = "FAILED - window should not have been scrolled but was scrolled to " + theWinref.document.body.scrollTop; >+ document.getElementById("console").innerHTML = "FAILED - window should not have been scrolled but was scrolled to " + theWinref.document.scrollingElement.scrollTop; > theWinref.close(); > endTest(); > } >diff --git a/LayoutTests/fast/events/fire-scroll-event.html b/LayoutTests/fast/events/fire-scroll-event.html >index c382507a5c885c1ab26f4b9273f53025a40e4a47..7d5ef8867b852b953c79a5c73c34a4d4757e0ebb 100644 >--- a/LayoutTests/fast/events/fire-scroll-event.html >+++ b/LayoutTests/fast/events/fire-scroll-event.html >@@ -12,8 +12,8 @@ onscroll = function(event) > eventCount++; > if (eventCount == 1) { > debug('Scroll event bubbles: ' + event.bubbles); >- var scrollX = document.body.scrollLeft; >- var scrollY = document.body.scrollTop; >+ var scrollX = document.scrollingElement.scrollLeft; >+ var scrollY = document.scrollingElement.scrollTop; > testPassed('Scroll position: (' + scrollX + ', ' + scrollY + ')'); > // Don't call notifyDone straight away, in case there's another scroll event coming. > doneTimeout = setTimeout(finishJSTest, 100); >diff --git a/LayoutTests/fast/events/frame-scroll-fake-mouse-move.html b/LayoutTests/fast/events/frame-scroll-fake-mouse-move.html >index d600a9d70efb6bd1105e3b554256f60941bc95b4..1198d8720a27fce6d315ee859fde35e071cf63c1 100644 >--- a/LayoutTests/fast/events/frame-scroll-fake-mouse-move.html >+++ b/LayoutTests/fast/events/frame-scroll-fake-mouse-move.html >@@ -27,7 +27,7 @@ > setTimeout(function() > { > eventSender.mouseMoveTo(50, 100); >- document.body.scrollTop = 250; >+ document.scrollingElement.scrollTop = 250; > timeoutID = setTimeout(finish, 20000); > }, 200); > } >diff --git a/LayoutTests/fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt b/LayoutTests/fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt >index 169e3e81fc83dd19101bf06759624c2f895819d8..16a32fb5673b828b257e3b51108b8e1aa6393e6b 100644 >--- a/LayoutTests/fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt >+++ b/LayoutTests/fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt >@@ -1,4 +1,4 @@ >-PASS document.body.scrollTop became different from 0 >+PASS document.scrollingElement.scrollTop became different from 0 > PASS document.getElementById('touches').textContent is "1" > PASS document.getElementById('touches').textContent is "1" > PASS document.getElementById('touches').textContent is "2" >diff --git a/LayoutTests/fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe.html b/LayoutTests/fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe.html >index 02d297f573dc988556b92953f6ef74720212ceae..bb3a8abd76602e82f01c28ddfc3d35bebb9a2fbb 100644 >--- a/LayoutTests/fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe.html >+++ b/LayoutTests/fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe.html >@@ -28,7 +28,7 @@ > <script> > touchstartEventCount = 0; > >-document.body.scrollTop = 0; >+document.scrollingElement.scrollTop = 0; > document.body.addEventListener("touchstart", () => { > document.body.style.backgroundColor = (++touchstartEventCount == 2) ? "green" : "red"; > touches.textContent = `${touchstartEventCount}`; >@@ -52,11 +52,11 @@ if (window.testRunner && testRunner.runUIScript) { > testRunner.dumpAsText(); > jsTestIsAsync = true; > testRunner.runUIScript(getSwipeUIScript(100, 0.75 * innerHeight, 100, 0.25 * innerHeight, 0.1), () => { >- shouldBecomeDifferent("document.body.scrollTop", "0", () => { >+ shouldBecomeDifferent("document.scrollingElement.scrollTop", "0", () => { > expectTouchCountToBe(1); >- UIHelper.tapAt(100, document.body.scrollTop + 0.75 * innerHeight).then(() => { >+ UIHelper.tapAt(100, document.scrollingElement.scrollTop + 0.75 * innerHeight).then(() => { > expectTouchCountToBe(1); >- UIHelper.tapAt(100, document.body.scrollTop + 0.25 * innerHeight).then(() => { >+ UIHelper.tapAt(100, document.scrollingElement.scrollTop + 0.25 * innerHeight).then(() => { > expectTouchCountToBe(2); > finishJSTest(); > }); >diff --git a/LayoutTests/fast/events/ios/touch-events-during-scroll-deceleration-in-overflow.html b/LayoutTests/fast/events/ios/touch-events-during-scroll-deceleration-in-overflow.html >index 138241496b26084f999915345d8f6c32dfeb9ee4..70ee5ba5bf9a815b77caa8c867e39fdd91456461 100644 >--- a/LayoutTests/fast/events/ios/touch-events-during-scroll-deceleration-in-overflow.html >+++ b/LayoutTests/fast/events/ios/touch-events-during-scroll-deceleration-in-overflow.html >@@ -48,7 +48,7 @@ > containerTouchstartEventCount = 0; > documentTouchstartEventCount = 0; > container.scrollTop = 0; >-document.body.scrollTop = 0; >+document.scrollingElement.scrollTop = 0; > container.addEventListener("touchstart", () => { > container.style.backgroundColor = (++containerTouchstartEventCount == 1) ? "green" : "red"; > containerTouches.textContent = `${containerTouchstartEventCount}`; >diff --git a/LayoutTests/fast/events/mouse-cursor-image-set.html b/LayoutTests/fast/events/mouse-cursor-image-set.html >index cb096871ce19144340964cdb5ae7eced621d2134..fb189df998623aae0f76b927bfeef35d53dcb659 100644 >--- a/LayoutTests/fast/events/mouse-cursor-image-set.html >+++ b/LayoutTests/fast/events/mouse-cursor-image-set.html >@@ -37,8 +37,8 @@ function checkCursors() { > var node = nodesToTest[i]; > debug('TEST CASE: ' + node.textContent); > // Make sure the node is visible and move the mouse over top of it. >- document.body.scrollTop = node.offsetTop - 50; >- eventSender.mouseMoveTo(node.offsetLeft + 3, node.offsetTop - document.body.scrollTop + 3); >+ document.scrollingElement.scrollTop = node.offsetTop - 50; >+ eventSender.mouseMoveTo(node.offsetLeft + 3, node.offsetTop - document.scrollingElement.scrollTop + 3); > > // Get details of the current mouse cursor. > // Note that we could return structured data which we then validate, but that's a lot more >diff --git a/LayoutTests/fast/events/mouse-cursor-multiframecur.html b/LayoutTests/fast/events/mouse-cursor-multiframecur.html >index 89b142f778402180561df99b25b6fcd972f2b8eb..fc5ae6fbd7caf313a0c110b3fc6c4eecd4448a1b 100644 >--- a/LayoutTests/fast/events/mouse-cursor-multiframecur.html >+++ b/LayoutTests/fast/events/mouse-cursor-multiframecur.html >@@ -28,8 +28,8 @@ function runTests() { > debug('TEST CASE: ' + node.textContent); > > // Make sure the node is visible and move the mouse over top of it. >- document.body.scrollTop = node.offsetTop - 50; >- eventSender.mouseMoveTo(node.offsetLeft + 3, node.offsetTop - document.body.scrollTop + 3); >+ document.scrollingElement.scrollTop = node.offsetTop - 50; >+ eventSender.mouseMoveTo(node.offsetLeft + 3, node.offsetTop - document.scrollingElement.scrollTop + 3); > > // Get details of the current mouse cursor. > // Note that we could return structured data which we then validate, but that's a lot more >diff --git a/LayoutTests/fast/events/mouse-cursor.html b/LayoutTests/fast/events/mouse-cursor.html >index 2e5259bf564a8fb215266e6bb0c05984b9c270ed..ceb4b69e7c486225c98f04ec6b8d80f1e358808e 100644 >--- a/LayoutTests/fast/events/mouse-cursor.html >+++ b/LayoutTests/fast/events/mouse-cursor.html >@@ -55,8 +55,8 @@ function runTests() { > debug('TEST CASE: ' + node.textContent); > > // Make sure the node is visible and move the mouse over top of it. >- document.body.scrollTop = node.offsetTop - 50; >- eventSender.mouseMoveTo(node.offsetLeft + 3, node.offsetTop - document.body.scrollTop + 3); >+ document.scrollingElement.scrollTop = node.offsetTop - 50; >+ eventSender.mouseMoveTo(node.offsetLeft + 3, node.offsetTop - document.scrollingElement.scrollTop + 3); > > // Get details of the current mouse cursor. > // Note that we could return structured data which we then validate, but that's a lot more >diff --git a/LayoutTests/fast/events/no-scroll-on-input-text-selection-expected.txt b/LayoutTests/fast/events/no-scroll-on-input-text-selection-expected.txt >index 2b147463869ed5e013ae1f6766927ba9bbc6ede6..feb232d5b01a1d80d3ea2b5c01299df48ff5e8cb 100644 >--- a/LayoutTests/fast/events/no-scroll-on-input-text-selection-expected.txt >+++ b/LayoutTests/fast/events/no-scroll-on-input-text-selection-expected.txt >@@ -6,9 +6,9 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > PASS document.getSelection().toString().length > 1 is true > PASS pageXOffset is 0 > PASS pageYOffset is originalPageYOffset >-PASS document.body.scrollLeft is 0 >-PASS document.body.scrollTop is originalBodyScrollTop >-PASS pageYOffset is document.body.scrollTop >+PASS document.scrollingElement.scrollLeft is 0 >+PASS document.scrollingElement.scrollTop is originalBodyScrollTop >+PASS pageYOffset is document.scrollingElement.scrollTop > PASS pageYOffset > 2000 is true > PASS successfullyParsed is true > >diff --git a/LayoutTests/fast/events/no-scroll-on-input-text-selection.html b/LayoutTests/fast/events/no-scroll-on-input-text-selection.html >index 8667e22735975a54ca3c2e50364cf944184a4cab..15f665d6d69742d3cb9e6154534ccb0de7ac6bc1 100644 >--- a/LayoutTests/fast/events/no-scroll-on-input-text-selection.html >+++ b/LayoutTests/fast/events/no-scroll-on-input-text-selection.html >@@ -18,12 +18,12 @@ > ta.scrollIntoView(); > > originalPageYOffset = pageYOffset; >- originalBodyScrollTop = document.body.scrollTop; >+ originalBodyScrollTop = document.scrollingElement.scrollTop; > > if (window.eventSender) { > var taClientRect = ta.getBoundingClientRect(); > var verticalOffset = taClientRect.top + (taClientRect.height / 2); >- var h = ta.offsetTop - document.body.scrollTop + 10; >+ var h = ta.offsetTop - document.scrollingElement.scrollTop + 10; > eventSender.dragMode = false; > eventSender.mouseMoveTo(20, verticalOffset); > eventSender.mouseDown(); >@@ -40,9 +40,9 @@ > shouldBeTrue('document.getSelection().toString().length > 1'); > shouldBe('pageXOffset', '0'); > shouldBe('pageYOffset', 'originalPageYOffset'); >- shouldBe('document.body.scrollLeft', '0'); >- shouldBe('document.body.scrollTop', 'originalBodyScrollTop'); >- shouldBe('pageYOffset', 'document.body.scrollTop'); >+ shouldBe('document.scrollingElement.scrollLeft', '0'); >+ shouldBe('document.scrollingElement.scrollTop', 'originalBodyScrollTop'); >+ shouldBe('pageYOffset', 'document.scrollingElement.scrollTop'); > shouldBeTrue('pageYOffset > 2000'); > > finishJSTest(); >diff --git a/LayoutTests/fast/events/platform-wheelevent-paging-x-in-non-scrolling-page-expected.txt b/LayoutTests/fast/events/platform-wheelevent-paging-x-in-non-scrolling-page-expected.txt >index 5bb97a42ea8e8981c0d5d7c0cc5a0cd1577dce54..5e256a92b51b826b7c35d77c35aa24cac9761ec0 100644 >--- a/LayoutTests/fast/events/platform-wheelevent-paging-x-in-non-scrolling-page-expected.txt >+++ b/LayoutTests/fast/events/platform-wheelevent-paging-x-in-non-scrolling-page-expected.txt >@@ -1,6 +1,6 @@ > PASS event.wheelDeltaY is 0 > PASS event.wheelDeltaX is window.givenScrollLeft * -3 > PASS event.wheelDelta is window.givenScrollLeft * -3 >-PASS document.body.scrollTop is window.expectedScrollTop >-PASS document.body.scrollLeft is window.expectedScrollLeft >+PASS document.scrollingElement.scrollTop is window.expectedScrollTop >+PASS document.scrollingElement.scrollLeft is window.expectedScrollLeft > >diff --git a/LayoutTests/fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html b/LayoutTests/fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html >index 5f42c917a507ff62af73cd5dbc2cd958a5d39118..ec436ae6c363f463e73fb45e2a2fe908a07d082d 100644 >--- a/LayoutTests/fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html >+++ b/LayoutTests/fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html >@@ -26,8 +26,8 @@ > > function checkOffsets() > { >- shouldBe("document.body.scrollTop", "window.expectedScrollTop"); >- shouldBe("document.body.scrollLeft", "window.expectedScrollLeft"); >+ shouldBe("document.scrollingElement.scrollTop", "window.expectedScrollTop"); >+ shouldBe("document.scrollingElement.scrollLeft", "window.expectedScrollLeft"); > > if (window.testRunner) > window.testRunner.notifyDone(); >diff --git a/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt b/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt >index 5bb97a42ea8e8981c0d5d7c0cc5a0cd1577dce54..5e256a92b51b826b7c35d77c35aa24cac9761ec0 100644 >--- a/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt >+++ b/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page-expected.txt >@@ -1,6 +1,6 @@ > PASS event.wheelDeltaY is 0 > PASS event.wheelDeltaX is window.givenScrollLeft * -3 > PASS event.wheelDelta is window.givenScrollLeft * -3 >-PASS document.body.scrollTop is window.expectedScrollTop >-PASS document.body.scrollLeft is window.expectedScrollLeft >+PASS document.scrollingElement.scrollTop is window.expectedScrollTop >+PASS document.scrollingElement.scrollLeft is window.expectedScrollLeft > >diff --git a/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html b/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html >index 3d8ea45e3128d8f9c9286ff2893fdb4dadf27c29..613b98372cfba00530f99d406f4df31714a6f010 100644 >--- a/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html >+++ b/LayoutTests/fast/events/platform-wheelevent-paging-x-in-scrolling-page.html >@@ -26,8 +26,8 @@ > > function checkOffsets() > { >- shouldBe("document.body.scrollTop", "window.expectedScrollTop"); >- shouldBe("document.body.scrollLeft", "window.expectedScrollLeft"); >+ shouldBe("document.scrollingElement.scrollTop", "window.expectedScrollTop"); >+ shouldBe("document.scrollingElement.scrollLeft", "window.expectedScrollLeft"); > > if (window.testRunner) > window.testRunner.notifyDone(); >diff --git a/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt b/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt >index 0e891cc5b1a6f7837cc518495b82980568f81f32..e25def0a65f0c55fe4dfc6c4a4d61b3b47509dd8 100644 >--- a/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt >+++ b/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page-expected.txt >@@ -1,6 +1,6 @@ > PASS event.wheelDeltaY is window.givenScrollTop * -3 > PASS event.wheelDeltaX is window.givenScrollLeft * -3 > PASS event.wheelDelta is window.givenScrollTop * -3 >-PASS document.body.scrollTop is window.expectedScrollTop >-PASS document.body.scrollLeft is window.expectedScrollLeft >+PASS document.scrollingElement.scrollTop is window.expectedScrollTop >+PASS document.scrollingElement.scrollLeft is window.expectedScrollLeft > >diff --git a/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html b/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html >index 63bc616c3b15e67604e51dd1dd3648dca81f4797..3a95964ad0c0b66a44f2f8e8fa210a4769d0ccba 100644 >--- a/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html >+++ b/LayoutTests/fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html >@@ -26,8 +26,8 @@ > > function checkOffsets() > { >- shouldBe("document.body.scrollTop", "window.expectedScrollTop"); >- shouldBe("document.body.scrollLeft", "window.expectedScrollLeft"); >+ shouldBe("document.scrollingElement.scrollTop", "window.expectedScrollTop"); >+ shouldBe("document.scrollingElement.scrollLeft", "window.expectedScrollLeft"); > > if (window.testRunner) > window.testRunner.notifyDone(); >diff --git a/LayoutTests/fast/events/platform-wheelevent-paging-y-in-non-scrolling-page-expected.txt b/LayoutTests/fast/events/platform-wheelevent-paging-y-in-non-scrolling-page-expected.txt >index 530e91103e1e5fa91832c3ab0a7a8ed53ecea55e..0075f12bae79f1c5d68aa3e2b4f91b212ca633bf 100644 >--- a/LayoutTests/fast/events/platform-wheelevent-paging-y-in-non-scrolling-page-expected.txt >+++ b/LayoutTests/fast/events/platform-wheelevent-paging-y-in-non-scrolling-page-expected.txt >@@ -1,6 +1,6 @@ > PASS event.wheelDeltaY is window.givenScrollTop * -3 > PASS event.wheelDeltaX is 0 > PASS event.wheelDelta is window.givenScrollTop * -3 >-PASS document.body.scrollTop is window.expectedScrollTop >-PASS document.body.scrollLeft is window.expectedScrollLeft >+PASS document.scrollingElement.scrollTop is window.expectedScrollTop >+PASS document.scrollingElement.scrollLeft is window.expectedScrollLeft > >diff --git a/LayoutTests/fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html b/LayoutTests/fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html >index d2c9cf72a31ca637eb50abc5b3dd370d399846ea..20614a97b45ecec0d4a825060688c76fa98f7167 100644 >--- a/LayoutTests/fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html >+++ b/LayoutTests/fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html >@@ -26,8 +26,8 @@ > > function checkOffsets() > { >- shouldBe("document.body.scrollTop", "window.expectedScrollTop"); >- shouldBe("document.body.scrollLeft", "window.expectedScrollLeft"); >+ shouldBe("document.scrollingElement.scrollTop", "window.expectedScrollTop"); >+ shouldBe("document.scrollingElement.scrollLeft", "window.expectedScrollLeft"); > > if (window.testRunner) > window.testRunner.notifyDone(); >diff --git a/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt b/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt >index 530e91103e1e5fa91832c3ab0a7a8ed53ecea55e..0075f12bae79f1c5d68aa3e2b4f91b212ca633bf 100644 >--- a/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt >+++ b/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page-expected.txt >@@ -1,6 +1,6 @@ > PASS event.wheelDeltaY is window.givenScrollTop * -3 > PASS event.wheelDeltaX is 0 > PASS event.wheelDelta is window.givenScrollTop * -3 >-PASS document.body.scrollTop is window.expectedScrollTop >-PASS document.body.scrollLeft is window.expectedScrollLeft >+PASS document.scrollingElement.scrollTop is window.expectedScrollTop >+PASS document.scrollingElement.scrollLeft is window.expectedScrollLeft > >diff --git a/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html b/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html >index 715ac688572cf7f33e5d7ad4a5c54e382bff25be..ba8868bc2087e689117a77214f217635dcf2682d 100644 >--- a/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html >+++ b/LayoutTests/fast/events/platform-wheelevent-paging-y-in-scrolling-page.html >@@ -26,8 +26,8 @@ > > function checkOffsets() > { >- shouldBe("document.body.scrollTop", "window.expectedScrollTop"); >- shouldBe("document.body.scrollLeft", "window.expectedScrollLeft"); >+ shouldBe("document.scrollingElement.scrollTop", "window.expectedScrollTop"); >+ shouldBe("document.scrollingElement.scrollLeft", "window.expectedScrollLeft"); > > if (window.testRunner) > window.testRunner.notifyDone(); >diff --git a/LayoutTests/fast/events/scale-and-scroll-body-expected.txt b/LayoutTests/fast/events/scale-and-scroll-body-expected.txt >index 2d7c5e19aa9dc35779e452754c538c851b1a4352..3cf396c3051563c00f0d38685b9635960b49a990 100644 >--- a/LayoutTests/fast/events/scale-and-scroll-body-expected.txt >+++ b/LayoutTests/fast/events/scale-and-scroll-body-expected.txt >@@ -1,7 +1,7 @@ >-PASS window.document.body.scrollTop is 30 >-PASS window.document.body.scrollLeft is 30 >-PASS window.document.body.scrollTop is 100 >-PASS window.document.body.scrollLeft is 100 >+PASS window.document.scrollingElement.scrollTop is 30 >+PASS window.document.scrollingElement.scrollLeft is 30 >+PASS window.document.scrollingElement.scrollTop is 100 >+PASS window.document.scrollingElement.scrollLeft is 100 > PASS window.scrollX is 100 > PASS window.scrollY is 100 > >diff --git a/LayoutTests/fast/events/scale-and-scroll-body.html b/LayoutTests/fast/events/scale-and-scroll-body.html >index e47ceacddea57e4504fec4f3575ae8b772413c2b..23e9408202874cd26d8cae2fe33f05c012dfd8ad 100644 >--- a/LayoutTests/fast/events/scale-and-scroll-body.html >+++ b/LayoutTests/fast/events/scale-and-scroll-body.html >@@ -18,11 +18,11 @@ > // The page scale, as set by window.internals.setPageScaleFactor should not be apparent > // to javascript. So, we expect scrolling to (100,100) to be page coordinates, rather > // than device pixels. >- document.body.scrollLeft = 100; >- document.body.scrollTop = 100; >+ document.scrollingElement.scrollLeft = 100; >+ document.scrollingElement.scrollTop = 100; > >- shouldBe("window.document.body.scrollTop", "100"); >- shouldBe("window.document.body.scrollLeft", "100"); >+ shouldBe("window.document.scrollingElement.scrollTop", "100"); >+ shouldBe("window.document.scrollingElement.scrollLeft", "100"); > shouldBe("window.scrollX", "100"); > shouldBe("window.scrollY", "100"); > } >@@ -32,8 +32,8 @@ > // Test that the scroll offset changes even if scaleFactor remains > // the same. > window.internals.setPageScaleFactor(1, 30, 30); >- shouldBe("window.document.body.scrollTop", "30"); >- shouldBe("window.document.body.scrollLeft", "30"); >+ shouldBe("window.document.scrollingElement.scrollTop", "30"); >+ shouldBe("window.document.scrollingElement.scrollLeft", "30"); > } > } > >diff --git a/LayoutTests/fast/events/scale-and-scroll-window-expected.txt b/LayoutTests/fast/events/scale-and-scroll-window-expected.txt >index c1b847d47bc896886df7c0b80e643411c40cbbe0..05942cbcaf44ea7e4e8b37b484191c82566087d2 100644 >--- a/LayoutTests/fast/events/scale-and-scroll-window-expected.txt >+++ b/LayoutTests/fast/events/scale-and-scroll-window-expected.txt >@@ -1,5 +1,5 @@ >-PASS window.document.body.scrollTop is 100 >-PASS window.document.body.scrollLeft is 100 >+PASS window.document.scrollingElement.scrollTop is 100 >+PASS window.document.scrollingElement.scrollLeft is 100 > PASS window.scrollX is 100 > PASS window.scrollY is 100 > >diff --git a/LayoutTests/fast/events/scale-and-scroll-window.html b/LayoutTests/fast/events/scale-and-scroll-window.html >index afb523623eb6f3055b0aad126b4772b0820e7b4f..df4f4dc27b525630ab92011d9b903039ec42a7d9 100644 >--- a/LayoutTests/fast/events/scale-and-scroll-window.html >+++ b/LayoutTests/fast/events/scale-and-scroll-window.html >@@ -15,8 +15,8 @@ > // than device pixels. > window.scrollTo(100,100); > >- shouldBe("window.document.body.scrollTop", "100"); >- shouldBe("window.document.body.scrollLeft", "100"); >+ shouldBe("window.document.scrollingElement.scrollTop", "100"); >+ shouldBe("window.document.scrollingElement.scrollLeft", "100"); > shouldBe("window.scrollX", "100"); > shouldBe("window.scrollY", "100"); > } >diff --git a/LayoutTests/fast/events/scroll-after-click-on-tab-index.html b/LayoutTests/fast/events/scroll-after-click-on-tab-index.html >index 4cbf15496b761cc647bc10c2737bf97eb9bead35..c7c22cca0e327ca6f9173d83ba190932ba9d97ac 100644 >--- a/LayoutTests/fast/events/scroll-after-click-on-tab-index.html >+++ b/LayoutTests/fast/events/scroll-after-click-on-tab-index.html >@@ -16,14 +16,14 @@ function runTest() > > jsTestIsAsync = true; > >- alert("Scroll position " + document.body.scrollTop); >+ alert("Scroll position " + document.scrollingElement.scrollTop); > center = getCenterFor(document.getElementById("sp")); > eventSender.mouseMoveTo(center.x, center.y); > eventSender.mouseDown(); > eventSender.mouseUp(); > eventSender.keyDown("downArrow"); > intervalID = setInterval(function() { >- if (document.body.scrollTop > 0) { >+ if (document.scrollingElement.scrollTop > 0) { > testPassed("Scroll position is more than 0"); > done(); > } >diff --git a/LayoutTests/fast/events/scroll-to-anchor-in-overflow-hidden.html b/LayoutTests/fast/events/scroll-to-anchor-in-overflow-hidden.html >index f0518710648e516e786cee855ea84a6c10e7e8a4..d9ad7d9c17dd6d0f6de0d4855c77c1a3c5dcb047 100644 >--- a/LayoutTests/fast/events/scroll-to-anchor-in-overflow-hidden.html >+++ b/LayoutTests/fast/events/scroll-to-anchor-in-overflow-hidden.html >@@ -35,7 +35,7 @@ > eventSender.mouseUp(); > } > >- if (document.body.scrollTop == 0) >+ if (document.scrollingElement.scrollTop == 0) > log("Automated test : FAILED : no scroll has occured "); > else > log("Automated test : PASSED"); >diff --git a/LayoutTests/fast/events/touch/ios/touchmove-cancelable-after-touchstart-expected.txt b/LayoutTests/fast/events/touch/ios/touchmove-cancelable-after-touchstart-expected.txt >index bdc35c1a85bc1d32ae0ad9dbf35ca67879723a98..31cf38b411fbb488e90ce1d42563dd54ae2297cf 100644 >--- a/LayoutTests/fast/events/touch/ios/touchmove-cancelable-after-touchstart-expected.txt >+++ b/LayoutTests/fast/events/touch/ios/touchmove-cancelable-after-touchstart-expected.txt >@@ -5,7 +5,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > > PASS event.cancelable is true > PASS event.defaultPrevented is true >-PASS document.body.scrollTop is 0 >+PASS document.scrollingElement.scrollTop is 0 > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/fast/events/touch/ios/touchmove-cancelable-after-touchstart.html b/LayoutTests/fast/events/touch/ios/touchmove-cancelable-after-touchstart.html >index c84a16d8da4d4ba47fe7eaf40d54bb5146afe5e6..5030269df059e6fc052f9cf25f8b484dd1ffc773 100644 >--- a/LayoutTests/fast/events/touch/ios/touchmove-cancelable-after-touchstart.html >+++ b/LayoutTests/fast/events/touch/ios/touchmove-cancelable-after-touchstart.html >@@ -83,7 +83,7 @@ function runTest() > if (window.testRunner) { > let clientRect = square.getBoundingClientRect(); > testRunner.runUIScript(getUIScript(clientRect.left + 50, clientRect.top + 200, clientRect.left + 50, clientRect.top + 10), () => { >- shouldBe("document.body.scrollTop", "0"); >+ shouldBe("document.scrollingElement.scrollTop", "0"); > finishJSTest(); > }); > } >diff --git a/LayoutTests/fast/forms/autofocus-opera-003.html b/LayoutTests/fast/forms/autofocus-opera-003.html >index b5d213ffcc77f922753db7d974ea9ec6dadad4ff..9aea23e7daa024e4d2186d1d31fa54a57fd7964c 100644 >--- a/LayoutTests/fast/forms/autofocus-opera-003.html >+++ b/LayoutTests/fast/forms/autofocus-opera-003.html >@@ -16,7 +16,7 @@ > testRunner.dumpAsText(); > > if (document.activeElement == document.getElementsByTagName("input")[0] && >- document.body.scrollTop != 0) >+ document.scrollingElement.scrollTop != 0) > log("SUCCESS"); > else > log("FAILURE"); >@@ -28,4 +28,4 @@ > <hr> > <ol id="console"></ol> > </body> >-</html> >\ No newline at end of file >+</html> >diff --git a/LayoutTests/fast/forms/input-readonly-autoscroll.html b/LayoutTests/fast/forms/input-readonly-autoscroll.html >index 9ba499d81982a12a9f3a25f13df4c6f0f6e207e8..00ee056331ff2ac388b66fc39692826c5cb676ab 100644 >--- a/LayoutTests/fast/forms/input-readonly-autoscroll.html >+++ b/LayoutTests/fast/forms/input-readonly-autoscroll.html >@@ -13,7 +13,7 @@ > var tf = document.getElementById('tf'); > if (window.eventSender) { > tf.scrollIntoView(); >- var h = tf.offsetTop - document.body.scrollTop + 10; >+ var h = tf.offsetTop - document.scrollingElement.scrollTop + 10; > eventSender.dragMode = false; > eventSender.mouseMoveTo(20, h); > eventSender.mouseDown(); >diff --git a/LayoutTests/fast/forms/resources/common.js b/LayoutTests/fast/forms/resources/common.js >index 56fe26e61586026521d0b69fbf05d439c3e63635..dec919801f228f4a0d1eed7ef759b4c5ef6be37b 100644 >--- a/LayoutTests/fast/forms/resources/common.js >+++ b/LayoutTests/fast/forms/resources/common.js >@@ -93,10 +93,10 @@ function getValidationMessageBubbleNode(host) { > > function getAbsoluteRect(element) { > var rect = element.getBoundingClientRect(); >- rect.top += document.body.scrollTop; >- rect.bottom += document.body.scrollTop; >- rect.left += document.body.scrollLeft; >- rect.right += document.body.scrollLeft; >+ rect.top += document.scrollingElement.scrollTop; >+ rect.bottom += document.scrollingElement.scrollTop; >+ rect.left += document.scrollingElement.scrollLeft; >+ rect.right += document.scrollingElement.scrollLeft; > return rect; > } > >diff --git a/LayoutTests/fast/frames/iframe-scroll-page-up-down.html b/LayoutTests/fast/frames/iframe-scroll-page-up-down.html >index c3fd2c6f687cf2d18e7fa17d5520ffee6f487e06..b0743ee120bb86fbf08949a13270c591c03982fc 100644 >--- a/LayoutTests/fast/frames/iframe-scroll-page-up-down.html >+++ b/LayoutTests/fast/frames/iframe-scroll-page-up-down.html >@@ -14,12 +14,12 @@ function test() > window[0][0].scrollTo(0,0); > window[0].scrollTo(0,0); > window.scrollTo(0, document.body.offsetHeight); >- var oldScrollTop = document.body.scrollTop; >+ var oldScrollTop = document.scrollingElement.scrollTop; > var focus1 = window[0][0].document.getElementById("focus1"); > focus1.focus(); > eventSender.keyDown("pageUp"); > var test1Passed = false; >- if (document.body.scrollTop < oldScrollTop) >+ if (document.scrollingElement.scrollTop < oldScrollTop) > test1Passed = true; > > // 2nd test: iframes scrolled to bottom, top level document scrolled to top >@@ -27,12 +27,12 @@ function test() > window[0][0].scrollTo(0,window[0][0].document.body.offsetHeight); > window[0].scrollTo(0,window[0].document.body.offsetHeight); > window.scrollTo(0, 0); >- oldScrollTop = document.body.scrollTop >+ oldScrollTop = document.scrollingElement.scrollTop > var focus2 = window[0][0].document.getElementById("focus2"); > focus2.focus(); > eventSender.keyDown("pageDown"); > var test2Passed = false; >- if (document.body.scrollTop > oldScrollTop) >+ if (document.scrollingElement.scrollTop > oldScrollTop) > test2Passed = true; > > printResults(test1Passed, test2Passed); >diff --git a/LayoutTests/fast/frames/transparent-scrollbar.html b/LayoutTests/fast/frames/transparent-scrollbar.html >index 0fe38d33300c891226d999f4531d1eb039a0c489..2af125ac1ac456659131ec1b9a96ade23a482565 100644 >--- a/LayoutTests/fast/frames/transparent-scrollbar.html >+++ b/LayoutTests/fast/frames/transparent-scrollbar.html >@@ -27,7 +27,7 @@ function test() > } > > window.setTimeout(function() { >- document.body.scrollTop = 2000; >+ document.scrollingElement.scrollTop = 2000; > if (window.testRunner) { > testRunner.displayAndTrackRepaints(); > testRunner.notifyDone(); >diff --git a/LayoutTests/fast/harness/results.html b/LayoutTests/fast/harness/results.html >index be2b7c4c5b57bd859b98adb0af81e1c3190c17a4..e41e76e28babf0b27814ece8db0d5069783f7c63 100644 >--- a/LayoutTests/fast/harness/results.html >+++ b/LayoutTests/fast/harness/results.html >@@ -1996,7 +1996,7 @@ class TestNavigator > > let rowRect = targetLink.getBoundingClientRect(); > // rowRect is in client coords (i.e. relative to viewport), so we just want to add its top to the current scroll position. >- document.body.scrollTop += rowRect.top; >+ document.scrollingElement.scrollTop += rowRect.top; > } > > onlyShowUnexpectedFailuresChanged() >diff --git a/LayoutTests/fast/html/empty-fragment-id-goto-top-expected.txt b/LayoutTests/fast/html/empty-fragment-id-goto-top-expected.txt >index bf63b6ed6be1cbe65d02b97d466045f0509bd3c8..72a2f8c6c05ab4f584f8d93af781617fbcb984f1 100644 >--- a/LayoutTests/fast/html/empty-fragment-id-goto-top-expected.txt >+++ b/LayoutTests/fast/html/empty-fragment-id-goto-top-expected.txt >@@ -1 +1 @@ >-document.body.scrollTop: 0 >+document.scrollingElement.scrollTop: 0 >diff --git a/LayoutTests/fast/html/empty-fragment-id-goto-top.html b/LayoutTests/fast/html/empty-fragment-id-goto-top.html >index bd31139f4a25166ef741b2cab5238e0da64fdba1..fbb7d7b10b3f8064aafeb28099f90403f4f8d56d 100644 >--- a/LayoutTests/fast/html/empty-fragment-id-goto-top.html >+++ b/LayoutTests/fast/html/empty-fragment-id-goto-top.html >@@ -13,7 +13,7 @@ > var gotoTop = document.getElementById("gotoTop"); > gotoTop.dispatchEvent(clickEvent); > >- document.write("<div>document.body.scrollTop: " + document.body.scrollTop +"</div>"); >+ document.write("<div>document.scrollingElement.scrollTop: " + document.scrollingElement.scrollTop +"</div>"); > } > } > </script> >diff --git a/LayoutTests/fast/images/imagemap-scroll.html b/LayoutTests/fast/images/imagemap-scroll.html >index 9cb5f73e6b3da1e85c6912d48e7cabd44b499e15..a201f5ccd4cbe9ee51c98552bc3a30806f66217f 100644 >--- a/LayoutTests/fast/images/imagemap-scroll.html >+++ b/LayoutTests/fast/images/imagemap-scroll.html >@@ -14,28 +14,28 @@ function runTest() > testRunner.waitUntilDone(); > } > >- if (document.body.scrollTop == 0) >+ if (document.scrollingElement.scrollTop == 0) > log("PASS: Document is starting scrolled to top."); > else >- log("FAIL: Document is starting scrolled to " + document.body.scrollTop + "."); >+ log("FAIL: Document is starting scrolled to " + document.scrollingElement.scrollTop + "."); > document.getElementById("area").focus(); > > setTimeout(() => { >- if (document.body.scrollTop > 4000 && document.body.scrollTop < 6000) >+ if (document.scrollingElement.scrollTop > 4000 && document.scrollingElement.scrollTop < 6000) > log("PASS: Focusing area element caused the image to scroll into view."); > else >- log("FAIL: Document is scrolled to " + document.body.scrollTop + " after focusing area element."); >- document.body.scrollTop = 0; >- if (document.body.scrollTop == 0) >+ log("FAIL: Document is scrolled to " + document.scrollingElement.scrollTop + " after focusing area element."); >+ document.scrollingElement.scrollTop = 0; >+ if (document.scrollingElement.scrollTop == 0) > log("PASS: Document is scrolled to top once again."); > else >- log("FAIL: Document should be scrolled to top but is scrolled to " + document.body.scrollTop + "."); >+ log("FAIL: Document should be scrolled to top but is scrolled to " + document.scrollingElement.scrollTop + "."); > document.getElementById("area").blur(); >- if (document.body.scrollTop == 0) >+ if (document.scrollingElement.scrollTop == 0) > log("PASS: Document is still scrolled to top after removing focus from area element."); > else >- log("FAIL: Document is scrolled to " + document.body.scrollTop + " after removing focus from area element."); >- document.body.scrollTop = 0; >+ log("FAIL: Document is scrolled to " + document.scrollingElement.scrollTop + " after removing focus from area element."); >+ document.scrollingElement.scrollTop = 0; > document.body.removeChild(document.getElementById("test")); > log("TEST COMPLETE"); > >diff --git a/LayoutTests/fast/loader/scroll-position-restored-on-back-non-cached.html b/LayoutTests/fast/loader/scroll-position-restored-on-back-non-cached.html >index a92d67ef073c851bb9d9bbedbd38f6eafc272ff6..b06b097dbc9666c2765e7df8eb10b9b7ed319b1a 100644 >--- a/LayoutTests/fast/loader/scroll-position-restored-on-back-non-cached.html >+++ b/LayoutTests/fast/loader/scroll-position-restored-on-back-non-cached.html >@@ -17,7 +17,7 @@ function navigate() > } > > setTimeout(function () { >- var scrollPosition = document.body.scrollTop; >+ var scrollPosition = document.scrollingElement.scrollTop; > var result = document.getElementById("result"); > if (scrollPosition == 100) > result.innerHTML = "Success! The scroll position was restored after navigation." >diff --git a/LayoutTests/fast/loader/scroll-position-restored-on-back.html b/LayoutTests/fast/loader/scroll-position-restored-on-back.html >index 54858a20d22c458d6ca234b846902d3068dc91e2..73f58df1f6becf577e2d00bfea47e1f86deb8ec6 100644 >--- a/LayoutTests/fast/loader/scroll-position-restored-on-back.html >+++ b/LayoutTests/fast/loader/scroll-position-restored-on-back.html >@@ -18,7 +18,7 @@ function navigate() > } > > setTimeout(function () { >- var scrollPosition = document.body.scrollTop; >+ var scrollPosition = document.scrollingElement.scrollTop; > var result = document.getElementById("result"); > if (scrollPosition == 100) > result.innerHTML = "Success! The scroll position was restored after navigation." >diff --git a/LayoutTests/fast/multicol/body-stuck-with-dirty-bit-with-columns.html b/LayoutTests/fast/multicol/body-stuck-with-dirty-bit-with-columns.html >index 70e36d4d53753e66705dabcaca9f1ee5e00e673f..a1abf8863b0efa7d736aa2eaaf35e452ab2b77c6 100644 >--- a/LayoutTests/fast/multicol/body-stuck-with-dirty-bit-with-columns.html >+++ b/LayoutTests/fast/multicol/body-stuck-with-dirty-bit-with-columns.html >@@ -30,7 +30,7 @@ setTimeout(function() { > window.localStorage.stage++; > else > window.localStorage.stage = 1; >- window.scrollTo(0,document.body.scrollHeight); >+ window.scrollTo(0,document.scrollingElement.scrollHeight); > v_0 = document.getElementById('id_0'); > v_0.removeChild(v_0.childNodes[0]); > location.reload(); >diff --git a/LayoutTests/fast/repaint/resources/iframe-scroll-repaint-iframe.html b/LayoutTests/fast/repaint/resources/iframe-scroll-repaint-iframe.html >index c05cdf10e4331741e46026994a3da59aeb241cc5..ded832436797ac3ff89ed67c4a6c955194eced1a 100644 >--- a/LayoutTests/fast/repaint/resources/iframe-scroll-repaint-iframe.html >+++ b/LayoutTests/fast/repaint/resources/iframe-scroll-repaint-iframe.html >@@ -9,7 +9,7 @@ window.setTimeout(function() { > if (window.testRunner) > testRunner.displayAndTrackRepaints(); > >- document.body.scrollTop = 20; >+ document.scrollingElement.scrollTop = 20; > if (window.testRunner) > testRunner.notifyDone(); > }, 50); >diff --git a/LayoutTests/fast/scrolling/ios/iframe-scroll-into-view.html b/LayoutTests/fast/scrolling/ios/iframe-scroll-into-view.html >index 412e1f6d0286e77a5024cdf79c599efbc8f89bea..2f736f63daf4773c5800ab462d4f5aa46b38600f 100644 >--- a/LayoutTests/fast/scrolling/ios/iframe-scroll-into-view.html >+++ b/LayoutTests/fast/scrolling/ios/iframe-scroll-into-view.html >@@ -26,9 +26,9 @@ iframe { > > function runTest() { > window.scrollTo(0, 200); >- window.frames[0].document.body.scrollIntoView(); >+ window.frames[0].document.scrollingElement.scrollIntoView(); > if (window.testRunner) > testRunner.notifyDone(); > } > </script> >-</html> >\ No newline at end of file >+</html> >diff --git a/LayoutTests/fast/scrolling/latching/scroll-div-latched-div.html b/LayoutTests/fast/scrolling/latching/scroll-div-latched-div.html >index 890b0636f56cbaba76a3664903d3194419c6eb17..619e090d1a51cbcdaf7157d979bf2e82763d8906 100644 >--- a/LayoutTests/fast/scrolling/latching/scroll-div-latched-div.html >+++ b/LayoutTests/fast/scrolling/latching/scroll-div-latched-div.html >@@ -43,7 +43,7 @@ var continueCount = 5; > function checkForScroll() > { > // The div should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var divScrollPositionAfter = divTarget.scrollTop; > > if (pageScrollPositionBefore != pageScrollPositionAfter) >@@ -56,7 +56,7 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > divTarget = document.getElementById('target'); > divTarget.scrollTop = divTarget.scrollHeight - divTarget.clientHeight - 100; >diff --git a/LayoutTests/fast/scrolling/latching/scroll-div-latched-mainframe.html b/LayoutTests/fast/scrolling/latching/scroll-div-latched-mainframe.html >index e72e8d75b13aa8229434570ec02eab4511fa1cbd..40c1af316a842f73718302132e465b107858543c 100644 >--- a/LayoutTests/fast/scrolling/latching/scroll-div-latched-mainframe.html >+++ b/LayoutTests/fast/scrolling/latching/scroll-div-latched-mainframe.html >@@ -43,7 +43,7 @@ var continueCount = 5; > function checkForScroll() { > > // The div should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var divScrollPositionAfter = divTarget.scrollTop; > > //debug("Page before: " + pageScrollPositionBefore + ", div before: " + divScrollPositionBefore); >@@ -59,7 +59,7 @@ function checkForScroll() { > > function scrollTest() { > // See where our IFrame lives: >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > divTarget = document.getElementById('target'); > >diff --git a/LayoutTests/fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html b/LayoutTests/fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html >index d9a9df563105f7bf8cee8f32ff1f86e87d5d93ba..48106492a0a31e007c193762c879d25c89604b07 100644 >--- a/LayoutTests/fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html >+++ b/LayoutTests/fast/scrolling/latching/scroll-div-with-nested-nonscrollable-iframe.html >@@ -37,7 +37,7 @@ function finishTest() > > function checkForScroll() > { >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var divScrollPositionAfter = divTarget.scrollTop; > > if (divScrollPositionBefore != divScrollPositionAfter) >@@ -55,7 +55,7 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > divTarget = document.getElementById('scrollable_div'); > >diff --git a/LayoutTests/fast/scrolling/latching/scroll-iframe-fragment.html b/LayoutTests/fast/scrolling/latching/scroll-iframe-fragment.html >index f626d5cd4b7c957ed129a24983b9a0afe971318f..ca008619d4b3dc50fb475b3d51695901b6a62038 100644 >--- a/LayoutTests/fast/scrolling/latching/scroll-iframe-fragment.html >+++ b/LayoutTests/fast/scrolling/latching/scroll-iframe-fragment.html >@@ -14,8 +14,8 @@ > function checkForScroll() { > > // The IFrame should have scrolled, but not the main page. >- var pageScrollPositionAfter = document.body.scrollTop; >- var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; >+ var iFrameScrollPositionAfter = window.frames['target'].document.scrollingElement.scrollTop; > > if (iFrameScrollPositionBefore != iFrameScrollPositionAfter) > testPassed("IFrame received wheel events."); >@@ -27,7 +27,7 @@ > > function scrollTest() { > // See where our IFrame lives: >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > iframeTarget = document.getElementById('target'); > >diff --git a/LayoutTests/fast/scrolling/latching/scroll-iframe-latched-iframe.html b/LayoutTests/fast/scrolling/latching/scroll-iframe-latched-iframe.html >index c03a0b5a9670e9e59664138e6b9c5203b82fa345..17b35d54d27447ed6a6747be645c6ba4d8d6d6b9 100644 >--- a/LayoutTests/fast/scrolling/latching/scroll-iframe-latched-iframe.html >+++ b/LayoutTests/fast/scrolling/latching/scroll-iframe-latched-iframe.html >@@ -15,8 +15,8 @@ var continueCount = 5; > function checkForScroll() { > > // The IFrame should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >- var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; >+ var iFrameScrollPositionAfter = window.frames['target'].document.scrollingElement.scrollTop; > > //debug("Page before: " + pageScrollPositionBefore + ", IFrame before: " + iFrameScrollPositionBefore); > //debug("Page after: " + pageScrollPositionAfter + ", IFrame after: " + iFrameScrollPositionAfter); >@@ -31,7 +31,7 @@ function checkForScroll() { > > function scrollTest() { > // See where our IFrame lives: >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > iframeTarget = document.getElementById('target'); > >diff --git a/LayoutTests/fast/scrolling/latching/scroll-iframe-latched-mainframe.html b/LayoutTests/fast/scrolling/latching/scroll-iframe-latched-mainframe.html >index 46f038cece4a4e0d083c0037b3b164d8ca9cf8ba..22b221f0fe1303a43763cca37a8c76507a2844f2 100644 >--- a/LayoutTests/fast/scrolling/latching/scroll-iframe-latched-mainframe.html >+++ b/LayoutTests/fast/scrolling/latching/scroll-iframe-latched-mainframe.html >@@ -15,8 +15,8 @@ var continueCount = 5; > function checkForScroll() { > > // The IFrame should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >- var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; >+ var iFrameScrollPositionAfter = window.frames['target'].document.scrollingElement.scrollTop; > > //debug("Page before: " + pageScrollPositionBefore + ", IFrame before: " + iFrameScrollPositionBefore); > //debug("Page after: " + pageScrollPositionAfter + ", IFrame after: " + iFrameScrollPositionAfter); >@@ -31,8 +31,8 @@ function checkForScroll() { > > function scrollTest() { > // See where our IFrame lives: >- pageScrollPositionBefore = document.body.scrollTop; >- iFrameScrollPositionBefore = window.frames['target'].document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; >+ iFrameScrollPositionBefore = window.frames['target'].document.scrollingElement.scrollTop; > > iframeTarget = document.getElementById('target'); > >diff --git a/LayoutTests/fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html b/LayoutTests/fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html >index eb871397b259c8f40d0171ee7ab91bbbaeda9e4d..b6d501c351fe18af4102163512d957b5b9b3e327 100644 >--- a/LayoutTests/fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html >+++ b/LayoutTests/fast/scrolling/latching/scroll-iframe-webkit1-latching-bug.html >@@ -14,8 +14,8 @@ > function checkForScroll() { > > // The iframe should have scrolled, but not the main page. >- var pageScrollPositionAfter = document.body.scrollTop; >- var iframeScrollPositionAfter = window.frames['target'].document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; >+ var iframeScrollPositionAfter = window.frames['target'].document.scrollingElement.scrollTop; > > if (iframeScrollPositionBefore != iframeScrollPositionAfter) > testPassed("iframe received wheel events."); >@@ -27,7 +27,7 @@ > > function scrollTest() { > // See where our iframe lives: >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > iframeTarget = document.getElementById('target'); > >diff --git a/LayoutTests/fast/scrolling/latching/scroll-select-bottom-test.html b/LayoutTests/fast/scrolling/latching/scroll-select-bottom-test.html >index 83ad0d99550f74d43b204d2e0d4b62687b113b82..6e0f2063a5cd27d239efcda6ba3c924742307bae 100644 >--- a/LayoutTests/fast/scrolling/latching/scroll-select-bottom-test.html >+++ b/LayoutTests/fast/scrolling/latching/scroll-select-bottom-test.html >@@ -45,7 +45,7 @@ var continueCount = 5; > function checkForScroll() { > > // The page should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var selectScrollPositionAfter = selectTarget.scrollTop; > > //debug("Page before: " + pageScrollPositionBefore + ", select before: " + selectScrollPositionBefore); >@@ -61,7 +61,7 @@ function checkForScroll() { > > function scrollTest() { > // See where our IFrame lives: >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > selectTarget = document.getElementById('target'); > selectTarget.scrollTop = selectTarget.scrollHeight - selectTarget.clientHeight - 100; >diff --git a/LayoutTests/fast/scrolling/latching/scroll-select-latched-mainframe.html b/LayoutTests/fast/scrolling/latching/scroll-select-latched-mainframe.html >index 58771b51d6928e61e6643aa635f7b6afdb64f8b9..2c02c7f2d4be45e9b5138a4dff2657107655a93f 100644 >--- a/LayoutTests/fast/scrolling/latching/scroll-select-latched-mainframe.html >+++ b/LayoutTests/fast/scrolling/latching/scroll-select-latched-mainframe.html >@@ -43,7 +43,7 @@ var continueCount = 5; > function checkForScroll() { > > // The select should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var selectScrollPositionAfter = selectTarget.scrollTop; > > //debug("Page before: " + pageScrollPositionBefore + ", select before: " + selectScrollPositionBefore); >@@ -59,7 +59,7 @@ function checkForScroll() { > > function scrollTest() { > // See where our IFrame lives: >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > selectTarget = document.getElementById('target'); > >diff --git a/LayoutTests/fast/scrolling/latching/scroll-select-latched-select.html b/LayoutTests/fast/scrolling/latching/scroll-select-latched-select.html >index c85e300c5574524ad1ff449b55b5cfd883e62d53..02d2f80feae6002959a1925269677715ad8961f5 100644 >--- a/LayoutTests/fast/scrolling/latching/scroll-select-latched-select.html >+++ b/LayoutTests/fast/scrolling/latching/scroll-select-latched-select.html >@@ -43,7 +43,7 @@ var continueCount = 5; > function checkForScroll() { > > // The page should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var selectScrollPositionAfter = selectTarget.scrollTop; > > //debug("Page before: " + pageScrollPositionBefore + ", select before: " + selectScrollPositionBefore); >@@ -59,7 +59,7 @@ function checkForScroll() { > > function scrollTest() { > // See where our IFrame lives: >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > selectTarget = document.getElementById('target'); > selectTarget.scrollTop = selectTarget.scrollHeight - selectTarget.clientHeight - 100; >diff --git a/LayoutTests/fast/scrolling/rtl-point-in-iframe.html b/LayoutTests/fast/scrolling/rtl-point-in-iframe.html >index acd6ca98a20db8f30c99856206c013fe508ac081..f4e0e519c681f041ed72ab63f458218ca9c99dd2 100644 >--- a/LayoutTests/fast/scrolling/rtl-point-in-iframe.html >+++ b/LayoutTests/fast/scrolling/rtl-point-in-iframe.html >@@ -29,7 +29,7 @@ > function checkForScroll() > { > // The iframe should have scrolled, but not the main page. >- var iframeScrollPositionAfter = window.frames['target'].document.body.scrollTop; >+ var iframeScrollPositionAfter = window.frames['target'].document.scrollingElement.scrollTop; > > if (iframeScrollPositionBefore != iframeScrollPositionAfter) > testPassed("iframe received wheel events."); >@@ -41,10 +41,10 @@ > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > var iframeTarget = document.getElementById('target'); >- iframeScrollPositionBefore = iframeTarget.contentDocument.body.scrollTop; >+ iframeScrollPositionBefore = iframeTarget.contentDocument.scrollingElement.scrollTop; > > var startPosX = iframeTarget.offsetLeft + 20; > var startPosY = iframeTarget.offsetTop + 20; >diff --git a/LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html b/LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html >index 9467d841da9e837343c04c84d89aff8853c8298c..22681e91a520c48e153ce96aeba6c69f1c758576 100644 >--- a/LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html >+++ b/LayoutTests/fast/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html >@@ -65,7 +65,7 @@ > > function step2() > { >- shouldBeTrue(String(document.body.scrollTop != 0)); >+ shouldBeTrue(String(document.scrollingElement.scrollTop != 0)); > > // Then it scrolls down to the end of the page ... > if (window.eventSender) >diff --git a/LayoutTests/fast/table/assert-when-visual-overflow-is-cleared.html b/LayoutTests/fast/table/assert-when-visual-overflow-is-cleared.html >index 244305ec04e3c005ee07da45bd43a5bae774ca1c..368401e87478945fabce85200f5e6697c73983b3 100644 >--- a/LayoutTests/fast/table/assert-when-visual-overflow-is-cleared.html >+++ b/LayoutTests/fast/table/assert-when-visual-overflow-is-cleared.html >@@ -7,7 +7,7 @@ if (window.testRunner) > testRunner.dumpAsText(); > > window.onload = function() { >- window.scrollTo(0, document.body.scrollHeight); >+ window.scrollTo(0, document.scrollingElement.scrollHeight); > document.designMode = 'on'; > } > </script> >@@ -26,4 +26,4 @@ span { > <body> > PASS if no assert in debug. > <table><tr><th><span><div><pre><a>a<pre><span><details></details></span></pre></a></pre></div></span></tr></th></table> >-</body> >\ No newline at end of file >+</body> >diff --git a/LayoutTests/fast/transforms/selection-bounds-in-transformed-view.html b/LayoutTests/fast/transforms/selection-bounds-in-transformed-view.html >index 64d2520450dbfe6b7a88d92ac9b5e34953dba319..e29386d113899e9f559937d5e47ea54c98eb7c18 100644 >--- a/LayoutTests/fast/transforms/selection-bounds-in-transformed-view.html >+++ b/LayoutTests/fast/transforms/selection-bounds-in-transformed-view.html >@@ -10,8 +10,8 @@ > } > > document.execCommand("FindString", false, "target"); >- var scrollTop = document.body.scrollTop; >+ var scrollTop = document.scrollingElement.scrollTop; > var expectedScrollTop = 864; >- document.getElementById("result").innerText = scrollTop === expectedScrollTop ? "PASS" : "FAIL: document.body.scrollTop was " + scrollTop + ", should be " + expectedScrollTop; >+ document.getElementById("result").innerText = scrollTop === expectedScrollTop ? "PASS" : "FAIL: document.scrollingElement.scrollTop was " + scrollTop + ", should be " + expectedScrollTop; > </script> > </body> >diff --git a/LayoutTests/http/tests/navigation/anchor-frames-cross-origin-expected.txt b/LayoutTests/http/tests/navigation/anchor-frames-cross-origin-expected.txt >index 1c2ba1df45e3a73eaacd6b858ffbe14e13fc20e9..a566210acd5ff14df3b773acb957aa504146acb0 100644 >--- a/LayoutTests/http/tests/navigation/anchor-frames-cross-origin-expected.txt >+++ b/LayoutTests/http/tests/navigation/anchor-frames-cross-origin-expected.txt >@@ -8,8 +8,8 @@ This prevents a cross-origin information leak sometimes know as framesniffing. > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >-PASS document.body.scrollTop == 0 is true >-PASS document.body.scrollLeft == 0 is true >+PASS document.scrollingElement.scrollTop == 0 is true >+PASS document.scrollingElement.scrollLeft == 0 is true > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/http/tests/navigation/resources/frame-with-anchor-cross-origin.html b/LayoutTests/http/tests/navigation/resources/frame-with-anchor-cross-origin.html >index 6dfe45fb12247d701bf2427435ea1c034e44899f..65beb17103c14924703977b179af8c33af77ec21 100644 >--- a/LayoutTests/http/tests/navigation/resources/frame-with-anchor-cross-origin.html >+++ b/LayoutTests/http/tests/navigation/resources/frame-with-anchor-cross-origin.html >@@ -8,8 +8,8 @@ > description('This prevents a cross-origin information leak sometimes know as framesniffing.'); > // Check scroll position in a timeout to make sure that the anchor has not been scrolled to. > setTimeout(function() { >- shouldBeTrue('document.body.scrollTop == 0'); >- shouldBeTrue('document.body.scrollLeft == 0'); >+ shouldBeTrue('document.scrollingElement.scrollTop == 0'); >+ shouldBeTrue('document.scrollingElement.scrollLeft == 0'); > finishJSTest(); > }, 0); > } >diff --git a/LayoutTests/jquery/resources/test/unit/offset.js b/LayoutTests/jquery/resources/test/unit/offset.js >index 329d69f95a1f10fb402374da4e301d263a071405..e2f6344f1a45ae13efe949e10a21cd0a8201c24c 100644 >--- a/LayoutTests/jquery/resources/test/unit/offset.js >+++ b/LayoutTests/jquery/resources/test/unit/offset.js >@@ -23,7 +23,7 @@ testoffset("absolute"/* in iframe */, function($, iframe) { > var forceScroll = jQuery('<div>', { width: 2000, height: 2000 }).appendTo('body'); > window.scrollTo(200, 200); > >- if ( document.documentElement.scrollTop || document.body.scrollTop ) { >+ if ( document.documentElement.scrollTop || document.scrollingElement.scrollTop ) { > supportsScroll = true; > } > >diff --git a/LayoutTests/legacy-animation-engine/fast/harness/results.html b/LayoutTests/legacy-animation-engine/fast/harness/results.html >index 1077bd0ca127d8ce921f6554d97273b4836dfa40..759de5e76311bb62fa8f7334fb5b89e3fed4d904 100644 >--- a/LayoutTests/legacy-animation-engine/fast/harness/results.html >+++ b/LayoutTests/legacy-animation-engine/fast/harness/results.html >@@ -1243,7 +1243,7 @@ TestNavigator._scrollToCurrentTest = function() > > var rowRect = targetLink.getBoundingClientRect(); > // rowRect is in client coords (i.e. relative to viewport), so we just want to add its top to the current scroll position. >- document.body.scrollTop += rowRect.top; >+ document.scrollingElement.scrollTop += rowRect.top; > } > > TestNavigator.onlyShowUnexpectedFailuresChanged = function() >diff --git a/LayoutTests/media/video-controls-to-not-scroll-page-on-load.html b/LayoutTests/media/video-controls-to-not-scroll-page-on-load.html >index f32d5cf162a98df7d8b0087faa3521f456632e76..ce2f5c4cd33a015e5f4ef10eda9c19ebc8306620 100644 >--- a/LayoutTests/media/video-controls-to-not-scroll-page-on-load.html >+++ b/LayoutTests/media/video-controls-to-not-scroll-page-on-load.html >@@ -20,10 +20,10 @@ var result = document.getElementById("result"); > result.innerHTML = ""; > > function testScroll () { >- result.innerHTML += (document.body.scrollTop <= 0)? `PASS`: `FAILED: ${document.body.scrollTop} > 0, the page scrolled automatically.`; >+ result.innerHTML += (document.scrollingElement.scrollTop <= 0)? `PASS`: `FAILED: ${document.scrollingElement.scrollTop} > 0, the page scrolled automatically.`; > > testRunner.notifyDone(); > } > </script> > </body> >-</html> >\ No newline at end of file >+</html> >diff --git a/LayoutTests/media/video-main-content-allow-then-scroll-expected.txt b/LayoutTests/media/video-main-content-allow-then-scroll-expected.txt >index 8ac79c87161ad7da01ac8b1da230ef2e659f1552..f75a136610de71d29deb9fc08c7d50577a10d6ef 100644 >--- a/LayoutTests/media/video-main-content-allow-then-scroll-expected.txt >+++ b/LayoutTests/media/video-main-content-allow-then-scroll-expected.txt >@@ -1,7 +1,7 @@ > RUN(internals.setMediaElementRestrictions(video, "RequireUserGestureForVideoRateChange,OverrideUserGestureRequirementForMainContent")) > EVENT(canplaythrough) > EVENT(playing) >-RUN(document.body.scrollTop = document.body.clientHeight) >+RUN(document.scrollingElement.scrollTop = document.body.clientHeight) > EXPECTED (video.paused == 'false') OK > END OF TEST > >diff --git a/LayoutTests/media/video-main-content-allow-then-scroll.html b/LayoutTests/media/video-main-content-allow-then-scroll.html >index 22d893378903ae7ccf836de879070c823a23e3f5..1facb11a2e53b8d696b819db106dd97ac06ffbaf 100644 >--- a/LayoutTests/media/video-main-content-allow-then-scroll.html >+++ b/LayoutTests/media/video-main-content-allow-then-scroll.html >@@ -22,7 +22,7 @@ > } > > function playing() { >- run('document.body.scrollTop = document.body.clientHeight'); >+ run('document.scrollingElement.scrollTop = document.body.clientHeight'); > waitForEventAndFail('pause'); > setTimeout(afterPlaying, 100); > } >@@ -44,4 +44,4 @@ > </head> > <body onload="go()"> > </body> >-</html> >\ No newline at end of file >+</html> >diff --git a/LayoutTests/scrollbars/scrollbar-large-overflow-rectangle.html b/LayoutTests/scrollbars/scrollbar-large-overflow-rectangle.html >index 067c5b6ba84b1d08aff26a2def30f847f2f1362c..a84fb923a5802aa0b37d360fc724191bb4678b43 100644 >--- a/LayoutTests/scrollbars/scrollbar-large-overflow-rectangle.html >+++ b/LayoutTests/scrollbars/scrollbar-large-overflow-rectangle.html >@@ -21,11 +21,11 @@ > } > > function test() { >- var height = document.body.scrollHeight; >+ var height = document.scrollingElement.scrollHeight; > if (height == 3000) > document.getElementById("result").innerHTML = "PASS"; > else >- document.getElementById("result").innerHTML = "<p style='color:red'>FAIL document.body.scrollHeight = " + height +"</p>"; >+ document.getElementById("result").innerHTML = "<p style='color:red'>FAIL document.scrollingElement.scrollHeight = " + height +"</p>"; > } > </script> > </head> >diff --git a/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html b/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html >index 6e64da20b6f216721078b3d909d7dcede2da34c0..745fb05083cbe72f7b0e283e24df1431994ba973 100644 >--- a/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html >+++ b/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler.html >@@ -49,7 +49,7 @@ var continueCount = 5; > function checkForScroll() > { > // The div should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var divScrollPositionAfter = divTarget.scrollTop; > > if (pageScrollPositionBefore != pageScrollPositionAfter) >@@ -67,7 +67,7 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > divTarget = document.getElementById('target'); > divTarget.scrollTop = divTarget.scrollHeight - divTarget.clientHeight - 100; >diff --git a/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div.html b/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div.html >index 76eed2155775c98b4311d6c4f1fd6640f4c17580..3a2261be459a8bffccaa82087deb45f1055e8523 100644 >--- a/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div.html >+++ b/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-div.html >@@ -43,7 +43,7 @@ var continueCount = 5; > function checkForScroll() > { > // The div should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var divScrollPositionAfter = divTarget.scrollTop; > > if (pageScrollPositionBefore != pageScrollPositionAfter) >@@ -61,7 +61,7 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > divTarget = document.getElementById('target'); > divTarget.scrollTop = divTarget.scrollHeight - divTarget.clientHeight - 100; >diff --git a/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html b/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html >index 6ea2d842e06e8b07acf1f028f1371de5ee1818e4..939651c77c42b411e6bf61491b04000933fcbb9a 100644 >--- a/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html >+++ b/LayoutTests/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler.html >@@ -49,14 +49,14 @@ var continueCount = 5; > > function onPageScroll() > { >- if (document.body.scrollTop >= 70) >+ if (document.scrollingElement.scrollTop >= 70) > checkForScroll(); > } > > function checkForScroll() > { > // The div should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var divScrollPositionAfter = divTarget.scrollTop; > > if (divScrollPositionBefore != divScrollPositionAfter) >@@ -74,7 +74,7 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > divTarget = document.getElementById('target'); > >diff --git a/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html b/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html >index 1f595710daf016a0280908dc8bebe62d2b75d2db..93843c36ee01e594aa3024305a48670403a3a27b 100644 >--- a/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html >+++ b/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler.html >@@ -25,8 +25,8 @@ var continueCount = 5; > function checkForScroll() > { > // The IFrame should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >- var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; >+ var iFrameScrollPositionAfter = window.frames['target'].document.scrollingElement.scrollTop; > > if (pageScrollPositionBefore != pageScrollPositionAfter) > testFailed("Page received wheel events."); >@@ -43,7 +43,7 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > iframeTarget = document.getElementById('target'); > >diff --git a/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html b/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html >index 342b316c756015c833f1cffdc1f1c84335abc728..0d0f30eb30e260cdc0f85e5f6a35d2accaca0bee 100644 >--- a/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html >+++ b/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe.html >@@ -15,8 +15,8 @@ var continueCount = 5; > function checkForScroll() > { > // The IFrame should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >- var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; >+ var iFrameScrollPositionAfter = window.frames['target'].document.scrollingElement.scrollTop; > > if (pageScrollPositionBefore != pageScrollPositionAfter) > testFailed("Page received wheel events."); >@@ -33,7 +33,7 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > iframeTarget = document.getElementById('target'); > >diff --git a/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html b/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html >index 29ff3c1ada30e6bc2a965d297b6052ac79631743..17d26b4338eb6fdcd48771209178d6e59381fb7c 100644 >--- a/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html >+++ b/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler.html >@@ -25,15 +25,15 @@ var continueCount = 5; > > function onPageScroll() > { >- if (document.body.scrollTop >= 70) >+ if (document.scrollingElement.scrollTop >= 70) > checkForScroll(); > } > > function checkForScroll() > { > // The IFrame should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >- var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; >+ var iFrameScrollPositionAfter = window.frames['target'].document.scrollingElement.scrollTop; > > if (iFrameScrollPositionBefore != iFrameScrollPositionAfter) > testFailed("IFrame consumed wheel events."); >@@ -50,8 +50,8 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >- iFrameScrollPositionBefore = window.frames['target'].document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; >+ iFrameScrollPositionBefore = window.frames['target'].document.scrollingElement.scrollTop; > > iframeTarget = document.getElementById('target'); > >diff --git a/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html b/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html >index 1915b2b92785e6f11ee228fbb59cd14a29f99fb7..b457d59bf0d00a71497c0674a911525535e4d056 100644 >--- a/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html >+++ b/LayoutTests/tiled-drawing/scrolling/fast-scroll-iframe-latched-select.html >@@ -15,13 +15,13 @@ var selectTargetScrollPositionBefore; > function checkForScroll() > { > // The IFrame should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > if (pageScrollPositionAfter != pageScrollPositionAfter) > testFailed("Page consumed wheel events."); > else > testPassed("Page did not receive wheel events."); > >- var iFrameScrollPositionAfter = window.frames['target'].document.body.scrollTop; >+ var iFrameScrollPositionAfter = window.frames['target'].document.scrollingElement.scrollTop; > if (iFrameScrollPositionBefore != iFrameScrollPositionAfter) > testFailed("IFrame consumed wheel events."); > else >@@ -39,8 +39,8 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >- iFrameScrollPositionBefore = window.frames['target'].document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; >+ iFrameScrollPositionBefore = window.frames['target'].document.scrollingElement.scrollTop; > > iframeTarget = document.getElementById('target'); > >diff --git a/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html b/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html >index 60210f79576da27c96f9a5fb4c549d2892193fbf..ebed5a93fc0d72683ac28e14274528448310d5d0 100644 >--- a/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html >+++ b/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler.html >@@ -49,14 +49,14 @@ var continueCount = 5; > > function onPageScroll() > { >- if (document.body.scrollTop >= 70) >+ if (document.scrollingElement.scrollTop >= 70) > checkForScroll(); > } > > function checkForScroll() > { > // The select should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var selectScrollPositionAfter = selectTarget.scrollTop; > > if (selectScrollPositionBefore != selectScrollPositionAfter) >@@ -74,7 +74,7 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > selectTarget = document.getElementById('target'); > >diff --git a/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html b/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html >index f732715c1e8fdedbb3f134f1e96f2dd28fd02692..63d951e232949bda48f0f927e6ad9916816a33bb 100644 >--- a/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html >+++ b/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe.html >@@ -43,14 +43,14 @@ var continueCount = 5; > > function onPageScroll() > { >- if (document.body.scrollTop >= 70) >+ if (document.scrollingElement.scrollTop >= 70) > checkForScroll(); > } > > function checkForScroll() > { > // The select should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var selectScrollPositionAfter = selectTarget.scrollTop; > > if (selectScrollPositionBefore != selectScrollPositionAfter) >@@ -68,7 +68,7 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > selectTarget = document.getElementById('target'); > >diff --git a/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html b/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html >index fa3434b651c873772d9817470d77f531bf183fc8..5072da4141ab4ec018dc62f04ceaa722068db828 100644 >--- a/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html >+++ b/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler.html >@@ -49,7 +49,7 @@ var continueCount = 5; > function checkForScroll() > { > // The page should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var selectScrollPositionAfter = selectTarget.scrollTop; > > if (pageScrollPositionBefore != pageScrollPositionAfter) >@@ -67,7 +67,7 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > selectTarget = document.getElementById('target'); > selectTarget.scrollTop = selectTarget.scrollHeight - selectTarget.clientHeight - 100; >diff --git a/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select.html b/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select.html >index 93915447e84d27e97062891928978a661d66a398..d297e6863261d2b07009f7f7582b5a655f6114e3 100644 >--- a/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select.html >+++ b/LayoutTests/tiled-drawing/scrolling/fast-scroll-select-latched-select.html >@@ -43,7 +43,7 @@ var continueCount = 5; > function checkForScroll() > { > // The page should not have scrolled at all. >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var selectScrollPositionAfter = selectTarget.scrollTop; > > if (pageScrollPositionBefore != pageScrollPositionAfter) >@@ -61,7 +61,7 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > selectTarget = document.getElementById('target'); > selectTarget.scrollTop = selectTarget.scrollHeight - selectTarget.clientHeight - 100; >diff --git a/LayoutTests/tiled-drawing/scrolling/latched-to-deleted-node.html b/LayoutTests/tiled-drawing/scrolling/latched-to-deleted-node.html >index f45c1b916eab7ef32f774b8655787a4c2ee35a0b..fc9f4fd1ee4a945561330bb6e9a2d50a40b2a240 100644 >--- a/LayoutTests/tiled-drawing/scrolling/latched-to-deleted-node.html >+++ b/LayoutTests/tiled-drawing/scrolling/latched-to-deleted-node.html >@@ -99,7 +99,7 @@ document.addEventListener("DOMContentLoaded", function() { > > function checkForScroll() > { >- var pageScrollPositionAfterGesture = document.body.scrollTop; >+ var pageScrollPositionAfterGesture = document.scrollingElement.scrollTop; > > // The page should not have scrolled > if (pageScrollPositionBeforeGesture != pageScrollPositionAfterGesture) >@@ -120,7 +120,7 @@ function checkForScroll() > > function scrollTest() > { >- pageScrollPositionBeforeGesture = document.body.scrollTop; >+ pageScrollPositionBeforeGesture = document.scrollingElement.scrollTop; > > divElement = document.getElementById('objectBack'); > >@@ -178,4 +178,4 @@ description("Tests that iframe doesn't consume wheel events when scrolling a sel > </script> > <script src="../../resources/js-test-post.js"></script> > </body> >-</html> >\ No newline at end of file >+</html> >diff --git a/LayoutTests/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html b/LayoutTests/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html >index 0013973806040721befe55b173c72174260d849a..f30a0f3cd871c1cea3b3fa811302a27936e4397a 100644 >--- a/LayoutTests/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html >+++ b/LayoutTests/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html >@@ -26,7 +26,7 @@ > { > window.setTimeout(function() { > // Scroll to test the mapping from document to view coords. >- document.body.scrollTop = 195; >+ document.scrollingElement.scrollTop = 195; > dumpRegion(); > if (window.testRunner) > testRunner.notifyDone(); >diff --git a/LayoutTests/tiled-drawing/scrolling/non-fast-region/top-content-inset.html b/LayoutTests/tiled-drawing/scrolling/non-fast-region/top-content-inset.html >index a30a265f966db7912e4499980ca514da0134719c..958df2957f738fb1d87dc4b1bd2e93ea408e39e6 100644 >--- a/LayoutTests/tiled-drawing/scrolling/non-fast-region/top-content-inset.html >+++ b/LayoutTests/tiled-drawing/scrolling/non-fast-region/top-content-inset.html >@@ -24,7 +24,7 @@ > { > window.setTimeout(function() { > // Scroll to test the mapping from document to view coords. >- document.body.scrollTop = 195; >+ document.scrollingElement.scrollTop = 195; > dumpRegion(); > if (window.testRunner) > testRunner.notifyDone(); >diff --git a/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html b/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html >index 63cbaac00afb794fbe77a3b713ee437526e9bbd6..8d20a0371392bb573d312dcc20659dc13d015784 100644 >--- a/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html >+++ b/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html >@@ -32,7 +32,7 @@ > internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(); > > // Scroll to test the mapping from document to view coords. >- document.body.scrollTop = 197; >+ document.scrollingElement.scrollTop = 197; > dumpRegion(); > if (window.testRunner) > testRunner.notifyDone(); >diff --git a/LayoutTests/tiled-drawing/scrolling/root-overflow-with-mousewheel.html b/LayoutTests/tiled-drawing/scrolling/root-overflow-with-mousewheel.html >index 90435ecada0590645e2fbc31e4a9b737d16118a3..fc0eb4084fb1f5c4a94a9474c19097e903183710 100644 >--- a/LayoutTests/tiled-drawing/scrolling/root-overflow-with-mousewheel.html >+++ b/LayoutTests/tiled-drawing/scrolling/root-overflow-with-mousewheel.html >@@ -10,7 +10,7 @@ html { > <script> > function checkForScroll() > { >- var pageScrollPositionAfter = document.body.scrollTop; >+ var pageScrollPositionAfter = document.scrollingElement.scrollTop; > var finishLog = document.getElementById("finishLog"); > if (pageScrollPositionAfter > 50) > finishLog.innerHTML = "Success!"; >diff --git a/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html b/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html >index f9d7278aae838912c78a3bd122251fc59788aefd..7fd64884aec8af8b70d15c44a9fb21489c533119 100644 >--- a/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html >+++ b/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html >@@ -42,7 +42,7 @@ > > function scrollSnapTest() { > // See where our div lives: >- pageScrollPositionBefore = document.body.scrollLeft; >+ pageScrollPositionBefore = document.scrollingElement.scrollLeft; > > divTarget = document.getElementById('target'); > >@@ -117,4 +117,4 @@ > <div id="item4" class="colorBox"></div> > <div id="item5" class="colorBox"></div> > </body> >-</html> >\ No newline at end of file >+</html> >diff --git a/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html b/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html >index dfdde851e9d611399d0be597bf080d44ec1bddd8..e6a76fdee8d4b44bdd394df69bf131e72edebbaf 100644 >--- a/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html >+++ b/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html >@@ -42,7 +42,7 @@ > > function scrollSnapTest() { > // See where our div lives: >- pageScrollPositionBefore = document.body.scrollLeft; >+ pageScrollPositionBefore = document.scrollingElement.scrollLeft; > > divTarget = document.getElementById('target'); > >@@ -117,4 +117,4 @@ > <div id="item4" class="colorBox"></div> > <div id="item5" class="colorBox"></div> > </body> >-</html> >\ No newline at end of file >+</html> >diff --git a/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html b/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html >index 626824455afcef8dfaff06a8547f047d5fb2b05b..e0be132d69fc1c738cec1ac7e80e5144935303d7 100644 >--- a/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html >+++ b/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html >@@ -42,7 +42,7 @@ > > function scrollSnapTest() { > // See where our div lives: >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > divTarget = document.getElementById('target'); > >@@ -116,4 +116,4 @@ > <div id="item4" class="colorBox"></div> > <div id="item5" class="colorBox"></div> > </body> >-</html> >\ No newline at end of file >+</html> >diff --git a/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html b/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html >index 8538581abf9f5fc17eba8fcb4325fac8da82cf39..1d40844dadd3cd30c1d0df1e7abec6a7a21eac79 100644 >--- a/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html >+++ b/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html >@@ -40,10 +40,10 @@ > eventSender.mouseScrollByWithWheelAndMomentumPhases(-4, 0, 'none', 'continue'); > eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, 'none', 'end'); > eventSender.callAfterScrollingCompletes(() => { >- if (document.body.scrollTop == 0) >+ if (document.scrollingElement.scrollTop == 0) > testPassed("scroll offset snapped back to top."); > else >- testFailed(`did not honor snap points (expected 0, observed ${document.body.scrollTop}).`); >+ testFailed(`did not honor snap points (expected 0, observed ${document.scrollingElement.scrollTop}).`); > > finishJSTest(); > }); >@@ -73,4 +73,4 @@ > <div id="item4" class="colorBox"></div> > <div id="item5" class="colorBox"></div> > </body> >-</html> >\ No newline at end of file >+</html> >diff --git a/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html b/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html >index 9fd289ca1f5469d2a840ec70b983fa28474f544f..2b7da7ddd752a59102ea1b7160b87497d3b2632d 100644 >--- a/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html >+++ b/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html >@@ -42,7 +42,7 @@ > > function scrollSnapTest() { > // See where our div lives: >- pageScrollPositionBefore = document.body.scrollTop; >+ pageScrollPositionBefore = document.scrollingElement.scrollTop; > > divTarget = document.getElementById('target'); > >@@ -117,4 +117,4 @@ > <div id="item4" class="colorBox"></div> > <div id="item5" class="colorBox"></div> > </body> >-</html> >\ No newline at end of file >+</html> >diff --git a/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe.html b/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe.html >index 679971b0c6593a1e0c10e23a6ee1b3e6aa846878..008b11c96b4fd7ba4591d22a1e8a82ed13ac3f5f 100644 >--- a/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe.html >+++ b/LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-mainframe.html >@@ -46,9 +46,9 @@ > eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none"); > eventSender.callAfterScrollingCompletes(() => { > let areaHeight = document.querySelector(".area").clientHeight; >- write(`- Did the scrolling snap to the top? ${document.body.scrollTop == 0 ? "YES" : "NO"}`); >- write(`- Did scrolling snap to the second box? ${document.body.scrollTop == areaHeight ? "YES" : "NO"}`); >- document.body.scrollTop = 0; >+ write(`- Did the scrolling snap to the top? ${document.scrollingElement.scrollTop == 0 ? "YES" : "NO"}`); >+ write(`- Did scrolling snap to the second box? ${document.scrollingElement.scrollTop == areaHeight ? "YES" : "NO"}`); >+ document.scrollingElement.scrollTop = 0; > setTimeout(resolve, 0); > }); > });
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189495
:
349383
|
349385
|
349386
|
349387
|
349388