WebKit Bugzilla
Attachment 370581 Details for
Bug 198226
: [macOS] Fix programmatic scroll in RTL overflow with async scrolling enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198226-20190524124508.patch (text/plain), 5.34 KB, created by
Simon Fraser (smfr)
on 2019-05-24 12:45:09 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-05-24 12:45:09 PDT
Size:
5.34 KB
patch
obsolete
>Subversion Revision: 245746 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a5f9c2a84da1eb97949fed9ef9abc13fb6c8948e..c3ae73df1b699b666106cd6662e5e5a2b2d7e94b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2019-05-24 Simon Fraser <simon.fraser@apple.com> >+ >+ [macOS] Fix programmatic scroll in RTL overflow >+ https://bugs.webkit.org/show_bug.cgi?id=198226 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ On macOS we need to use a scroll offset to set the layer position, not >+ a scroll position. >+ >+ Test: scrollingcoordinator/mac/rtl-programmatic-overflow-scroll.html >+ >+ * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: >+ (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers): >+ > 2019-05-24 Ryosuke Niwa <rniwa@webkit.org> > > Asssertion failure in dispatchSubtreeModifiedEvent due to TextFieldInputType updating UA shadow tree inside Element::removedFromAncestor >diff --git a/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm b/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm >index 208a45bd628bb8590c1e1f0792eb0564e7d008e8..d15fa947857225c7bc1b3e4bfdda47f9fcd191d2 100644 >--- a/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm >+++ b/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm >@@ -90,8 +90,8 @@ FloatPoint ScrollingTreeOverflowScrollingNodeMac::adjustedScrollPosition(const F > > void ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers() > { >- auto scrollPosition = currentScrollPosition(); >- scrolledContentsLayer().position = -scrollPosition; >+ auto scrollOffset = ScrollableArea::scrollOffsetFromPosition(currentScrollPosition(), toFloatSize(scrollOrigin())); >+ scrolledContentsLayer().position = -scrollOffset; > } > > void ScrollingTreeOverflowScrollingNodeMac::repositionRelatedLayers() >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index cec809a6ec3a72f8d8d681eac7899959e1125ee3..dfb30d6365f38c59ad25eca5a1bb5f0d609e1bbb 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2019-05-24 Simon Fraser <simon.fraser@apple.com> >+ >+ [macOS] Fix programmatic scroll in RTL overflow >+ https://bugs.webkit.org/show_bug.cgi?id=198226 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * scrollingcoordinator/mac/rtl-programmatic-overflow-scroll-expected.html: Added. >+ * scrollingcoordinator/mac/rtl-programmatic-overflow-scroll.html: Added. >+ > 2019-05-24 Ryosuke Niwa <rniwa@webkit.org> > > Asssertion failure in dispatchSubtreeModifiedEvent due to TextFieldInputType updating UA shadow tree inside Element::removedFromAncestor >diff --git a/LayoutTests/scrollingcoordinator/mac/rtl-programmatic-overflow-scroll-expected.html b/LayoutTests/scrollingcoordinator/mac/rtl-programmatic-overflow-scroll-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..b7f05aeac244f2d203386035addfe9960507a3be >--- /dev/null >+++ b/LayoutTests/scrollingcoordinator/mac/rtl-programmatic-overflow-scroll-expected.html >@@ -0,0 +1,39 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <style> >+ body { >+ margin: 0; >+ } >+ >+ #scroller { >+ direction: rtl; >+ overflow-x: scroll; >+ margin: 10px; >+ height: 300px; >+ width: 300px; >+ } >+ >+ .contents { >+ width: 200%; >+ height: 100%; >+ background-image: linear-gradient(to right, red, red 50%, green 50%, green); >+ } >+ >+ .scrollbar-hider { >+ position: absolute; >+ width: 300px; >+ height: 16px; >+ left: 10px; >+ top: calc(310px - 16px); >+ background-color: gray; >+ } >+ </style> >+</head> >+<body> >+ <div id="scroller"> >+ <div class="contents"></div> >+ </div> >+ <div class="scrollbar-hider"></div> >+</body> >+</html> >diff --git a/LayoutTests/scrollingcoordinator/mac/rtl-programmatic-overflow-scroll.html b/LayoutTests/scrollingcoordinator/mac/rtl-programmatic-overflow-scroll.html >new file mode 100644 >index 0000000000000000000000000000000000000000..653901fd038cb63a5cc2c57979ac609c8af6dc5e >--- /dev/null >+++ b/LayoutTests/scrollingcoordinator/mac/rtl-programmatic-overflow-scroll.html >@@ -0,0 +1,44 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ body { >+ margin: 0; >+ } >+ >+ #scroller { >+ direction: rtl; >+ overflow-x: scroll; >+ margin: 10px; >+ height: 300px; >+ width: 300px; >+ } >+ >+ .contents { >+ width: 200%; >+ height: 100%; >+ background-image: linear-gradient(to right, green, green 50%, red 50%, red); >+ } >+ >+ .scrollbar-hider { >+ position: absolute; >+ width: 300px; >+ height: 16px; >+ left: 10px; >+ top: calc(310px - 16px); >+ background-color: gray; >+ } >+ </style> >+ <script> >+ window.addEventListener('load', () => { >+ scroller.scrollLeft = -300; >+ }, false); >+ </script> >+</head> >+<body> >+ <div id="scroller"> >+ <div class="contents"></div> >+ </div> >+ <div class="scrollbar-hider"></div> >+</body> >+</html>
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
Flags:
koivisto
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198226
: 370581