Element::focus and Element::scrollIntoView don't clamp scroll positions. This results in scrollTop to report bogus numbers like -1000. <rdar://problem/49784711>
Created attachment 368063 [details] Fixes the bug
Comment on attachment 368063 [details] Fixes the bug Attachment 368063 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11975688 New failing tests: fast/scrolling/programmatic-document-rtl-scrollIntoView.html fast/dynamic/anchor-lock.html fast/transforms/selection-bounds-in-transformed-view.html imported/w3c/web-platform-tests/shadow-dom/scroll-to-the-fragment-in-shadow-tree.html fast/visual-viewport/zoomed-scroll-into-view-fixed.html fast/scrolling/scroll-to-anchor-zoomed-header.html
Created attachment 368068 [details] Archive of layout-test-results from ews103 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 368063 [details] Fixes the bug Attachment 368063 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11975760 New failing tests: fast/scrolling/programmatic-document-rtl-scrollIntoView.html fast/dynamic/anchor-lock.html fast/transforms/selection-bounds-in-transformed-view.html imported/w3c/web-platform-tests/shadow-dom/scroll-to-the-fragment-in-shadow-tree.html fast/visual-viewport/zoomed-scroll-into-view-fixed.html fast/scrolling/scroll-to-anchor-zoomed-header.html
Created attachment 368071 [details] Archive of layout-test-results from ews107 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 368063 [details] Fixes the bug Attachment 368063 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/11975991 New failing tests: fast/scrolling/programmatic-document-rtl-scrollIntoView.html fast/dynamic/anchor-lock.html fast/transforms/selection-bounds-in-transformed-view.html imported/w3c/web-platform-tests/shadow-dom/scroll-to-the-fragment-in-shadow-tree.html fast/visual-viewport/zoomed-scroll-into-view-fixed.html fast/scrolling/scroll-to-anchor-zoomed-header.html
Created attachment 368080 [details] Archive of layout-test-results from ews114 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 368063 [details] Fixes the bug Attachment 368063 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/11975885 New failing tests: fast/dom/focus-contenteditable.html fast/dynamic/anchor-lock.html imported/w3c/web-platform-tests/css/cssom-view/elementFromPoint.html fast/scrolling/ios/scroll-into-view-with-top-content-inset.html fast/scrolling/programmatic-document-rtl-scrollIntoView.html
Created attachment 368081 [details] Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 368063 [details] Fixes the bug Attachment 368063 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/11976734 New failing tests: fast/transforms/selection-bounds-in-transformed-view.html fast/visual-viewport/zoomed-scroll-into-view-fixed.html fast/dynamic/anchor-lock.html fast/scrolling/scroll-to-anchor-zoomed-header.html fast/scrolling/programmatic-document-rtl-scrollIntoView.html
Created attachment 368088 [details] Archive of layout-test-results from ews200 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Created attachment 368100 [details] Fixes the bug
Comment on attachment 368100 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=368100&action=review > Source/WebCore/rendering/RenderLayer.cpp:2602 > + IntRect snappedRevealRect = snappedIntRect(absoluteRect); > + snappedRevealRect.setLocation(clampedScrollPosition); Remove these lines. > Source/WebCore/rendering/RenderLayer.cpp:2604 > frameView.setScrollPosition(roundedIntPoint(revealRect.location())); Remove this line.
Created attachment 368108 [details] Fixes the bug
Comment on attachment 368108 [details] Fixes the bug Attachment 368108 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/11980380 New failing tests: fast/dom/focus-contenteditable.html imported/w3c/web-platform-tests/css/cssom-view/elementFromPoint.html fast/scrolling/ios/scroll-into-view-with-top-content-inset.html
Created attachment 368113 [details] Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
I can't tell if the test failures related to this patch, but these failing test cases sound like they are the kind of things that would be impacted: fast/dom/focus-contenteditable.html fast/scrolling/ios/scroll-into-view-with-top-content-inset.html
Created attachment 368647 [details] Fixed the test
Comment on attachment 368647 [details] Fixed the test View in context: https://bugs.webkit.org/attachment.cgi?id=368647&action=review > Source/WebCore/rendering/RenderLayer.cpp:2610 > +// frameView.setScrollPosition(roundedIntPoint(revealRect.location())); Remove this line.
Committed r244851: <https://trac.webkit.org/changeset/244851>