Bug 191289 - [WebKitTestRunner][DumpRenderTree] document.body.scrollTop is 0 after page is scrolled
Summary: [WebKitTestRunner][DumpRenderTree] document.body.scrollTop is 0 after page is...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-05 17:11 PST by Daniel Bates
Modified: 2018-11-07 10:51 PST (History)
4 users (show)

See Also:


Attachments
LayoutTest (1.51 KB, patch)
2018-11-05 17:11 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
LayoutTest (2.67 KB, patch)
2018-11-05 17:14 PST, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2018-11-05 17:11:09 PST
Created attachment 353927 [details]
LayoutTest

This issue only reproduces in WebKitTestRunner and DumpRenderTree (why?). That is the test passes in Safari when run manually. Apply the attached patch and then run the test:

run-webkit-tests http/tests/navigation/frameset-cross-origin-frame-scrolls-to-anchor.html

The test will fail with the following output diff:

[[
--- /Volumes/.../layout-test-results/http/tests/navigation/frameset-cross-origin-frame-scrolls-to-anchor-expected.txt
+++ /Volumes/.../layout-test-results/http/tests/navigation/frameset-cross-origin-frame-scrolls-to-anchor-actual.txt
@@ -14,9 +14,10 @@
 PASS window.scrollY is 0
 
 After scroll:
-PASS document.body.scrollTop > 0 is true
+FAIL document.body.scrollTop > 0 should be true. Was false.
 PASS window.scrollY > 0 is true
 PASS successfullyParsed is true
+Some tests failed.
 
 TEST COMPLETE
]]

The test registers a scroll event listener and emits both document.body.scrollTop and window.scrollY. The scroll event is dispatched and window.scrollY > 0 at the end of the test. For some reason document.body.scrollTop == 0 before and after the test.
Comment 1 Daniel Bates 2018-11-05 17:14:04 PST
Created attachment 353929 [details]
LayoutTest
Comment 2 Simon Fraser (smfr) 2018-11-07 10:51:13 PST
This could be affected by the value of settings().CSSOMViewScrollingAPIEnabled(). See Document::scrollingElement().