⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 276182 in webkit


Ignore:
Timestamp:
Apr 16, 2021, 4:55:14 PM (5 years ago)
Author:
Cameron McCormack
Message:

Place vertical scrollbars at (inline/block)-end edge in all writing modes.
https://bugs.webkit.org/show_bug.cgi?id=224224

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-scroll-snap/snap-inline-block-expected.txt:
  • web-platform-tests/css/cssom-view/scrollLeftTop-expected.txt:

Source/WebCore:

Tests: fast/scrolling/v-rl-scrollbars-initial-position-dynamic.html

fast/scrolling/v-rl-scrollbars-initial-position.html
fast/scrolling/vertical-scrollbar-position.html

We currently only consider moving a vertical scrollbar to the left for
writing-mode: horizontal-{tb,bt}; direction: rtl containers. But
ideally we should always place the vertical scrollbar at the end edge
of the container (whether that's the inline-end edge, when using a
horizontal writing mode, or the block-end edge, when using a vertical
writing mode).

Some functions calling the existing shouldPlaceBlockDirectionScrollbarOnLeft
instead really care about whether the vertical scrollbar is on the
left, not whether the block direction scrollbar is on the left (since
for vertical writing modes, the block direction scrollbar is the
horizontal one on the bottom). So we rename this to
shouldPlaceVerticalScrollbarOnLeft, make it return true for
writing-mode: vertical-rl, and adjust callers that really do care
only about block direction scrollbars to additionally check their
writing mode.

  • page/EventHandler.cpp:

(WebCore::EventHandler::selectCursor):

  • page/FrameView.cpp:

(WebCore::FrameView::shouldPlaceVerticalScrollbarOnLeft const):

  • page/FrameView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin const):
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::scrollCornerRect const):
(WebCore::ScrollView::locationOfContents const):

  • platform/ScrollableArea.h:
  • platform/adwaita/ScrollbarThemeAdwaita.cpp:

(WebCore::ScrollbarThemeAdwaita::paint):

  • platform/gtk/ScrollbarThemeGtk.cpp:

(WebCore::widgetTypeForScrollbar):
(WebCore::ScrollbarThemeGtk::paint):

  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::ScrollbarThemeMac::didCreateScrollerImp):

  • platform/win/PopupMenuWin.h:
  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::logicalLeftOffsetForContent const):
(WebCore::RenderBlock::logicalRightOffsetForContent const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paddingBoxRect const):
(WebCore::RenderBox::contentBoxLocation const):
(WebCore::RenderBox::overflowClipRect const):
(WebCore::RenderBox::computePositionedLogicalWidth const):
(WebCore::RenderBox::flippedClientBoxRect const):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::constrainingRectForStickyPosition const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::resize):
(WebCore::RenderLayer::overflowControlsRects const):
(WebCore::RenderLayer::offsetFromResizeCorner const):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::positionForClipLayer const):

  • rendering/RenderLayerModelObject.cpp:

(WebCore::RenderLayerModelObject::shouldPlaceVerticalScrollbarOnLeft const):

  • rendering/RenderLayerModelObject.h:
  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::shouldPlaceVerticalScrollbarOnLeft const):
(WebCore::RenderLayerScrollableArea::overflowControlsRects const):
(WebCore::RenderLayerScrollableArea::computeScrollOrigin):
(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterLayout):
(WebCore::RenderLayerScrollableArea::drawPlatformResizerImage):
(WebCore::RenderLayerScrollableArea::hitTestResizerInFragments const):
(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterStyleChange):

  • rendering/RenderLayerScrollableArea.h:
  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::itemBoundingBoxRect):
(WebCore::RenderListBox::paintScrollbar):
(WebCore::RenderListBox::isPointInOverflowControl):
(WebCore::RenderListBox::listIndexAtOffset):
(WebCore::RenderListBox::invalidateScrollbarRect):
(WebCore::RenderListBox::convertFromScrollbarToContainingView const):
(WebCore::RenderListBox::convertFromContainingViewToScrollbar const):

  • rendering/RenderListBox.h:
  • rendering/RenderView.cpp:

(WebCore::RenderView::repaintViewRectangle const):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::shouldPlaceVerticalScrollbarOnLeft const):

  • rendering/style/RenderStyle.h:

Source/WebKit:

  • UIProcess/win/WebPopupMenuProxyWin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.h:

LayoutTests:

iOS test failure expectations and skips are because we don't support
non-overlay scrollbars on the left on that platform.

  • TestExpectations:
  • css3/flexbox/child-overflow-expected.html:
  • fast/repaint/vertical-overflow-parent-expected.txt:
  • fast/repaint/vertical-overflow-same-expected.txt:
  • fast/scrolling/v-rl-scrollbars-initial-position-dynamic-expected.html: Added.
  • fast/scrolling/v-rl-scrollbars-initial-position-dynamic.html: Added.
  • fast/scrolling/v-rl-scrollbars-initial-position-expected.html: Added.
  • fast/scrolling/v-rl-scrollbars-initial-position.html: Added.
  • fast/scrolling/vertical-scrollbar-position-expected.txt: Added.
  • fast/scrolling/vertical-scrollbar-position.html: Added.
  • platform/ios/TestExpectations:
  • platform/ios/imported/w3c/web-platform-tests/css/css-scroll-snap/snap-inline-block-expected.txt: Added.
  • platform/ios/imported/w3c/web-platform-tests/css/cssom-view/scrollLeftTop-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollLeftTop-expected.txt.
Location:
trunk
Files:
8 added
37 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r276180 r276182  
     12021-04-16  Cameron McCormack  <heycam@apple.com>
     2
     3        Place vertical scrollbars at (inline/block)-end edge in all writing modes.
     4        https://bugs.webkit.org/show_bug.cgi?id=224224
     5
     6        Reviewed by Simon Fraser.
     7
     8        iOS test failure expectations and skips are because we don't support
     9        non-overlay scrollbars on the left on that platform.
     10
     11        * TestExpectations:
     12        * css3/flexbox/child-overflow-expected.html:
     13        * fast/repaint/vertical-overflow-parent-expected.txt:
     14        * fast/repaint/vertical-overflow-same-expected.txt:
     15        * fast/scrolling/v-rl-scrollbars-initial-position-dynamic-expected.html: Added.
     16        * fast/scrolling/v-rl-scrollbars-initial-position-dynamic.html: Added.
     17        * fast/scrolling/v-rl-scrollbars-initial-position-expected.html: Added.
     18        * fast/scrolling/v-rl-scrollbars-initial-position.html: Added.
     19        * fast/scrolling/vertical-scrollbar-position-expected.txt: Added.
     20        * fast/scrolling/vertical-scrollbar-position.html: Added.
     21        * platform/ios/TestExpectations:
     22        * platform/ios/imported/w3c/web-platform-tests/css/css-scroll-snap/snap-inline-block-expected.txt: Added.
     23        * platform/ios/imported/w3c/web-platform-tests/css/cssom-view/scrollLeftTop-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollLeftTop-expected.txt.
     24
    1252021-04-16  Jiewen Tan  <jiewen_tan@apple.com>
    226
  • trunk/LayoutTests/TestExpectations

    r275917 r276182  
    48674867imported/w3c/web-platform-tests/css/css-contain/quote-scoping-004.html [ ImageOnlyFailure ]
    48684868
     4869# Tests that fail because they assume a vertical scrollbar in `writing-mode: vertical-rl` elements will be on the right-hand side
     4870webkit.org/b/224357 imported/w3c/web-platform-tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-013.xht [ ImageOnlyFailure ]
     4871webkit.org/b/224357 imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-vertical-rl.html [ ImageOnlyFailure ]
     4872
    48694873# @counter-style ref tests that currently fail
    48704874imported/w3c/web-platform-tests/css/css-counter-styles/armenian/css3-counter-styles-006.html [ ImageOnlyFailure ]
  • trunk/LayoutTests/css3/flexbox/child-overflow-expected.html

    r213149 r276182  
    2828p {
    2929    margin-bottom: 30px;
     30}
     31
     32.topRight {
     33    direction: rtl;  /* place scrollbars on the LHS */
    3034}
    3135</style>
  • trunk/LayoutTests/fast/repaint/vertical-overflow-parent-expected.txt

    r266818 r276182  
    11(repaint rects
    2   (rect 29 29 100 100)
     2  (rect 44 29 100 100)
    33)
    44
  • trunk/LayoutTests/fast/repaint/vertical-overflow-same-expected.txt

    r266818 r276182  
    11(repaint rects
    2   (rect 29 21 100 100)
     2  (rect 44 21 100 100)
    33)
    44
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r276152 r276182  
     12021-04-16  Cameron McCormack  <heycam@apple.com>
     2
     3        Place vertical scrollbars at (inline/block)-end edge in all writing modes.
     4        https://bugs.webkit.org/show_bug.cgi?id=224224
     5
     6        Reviewed by Simon Fraser.
     7
     8        * web-platform-tests/css/css-scroll-snap/snap-inline-block-expected.txt:
     9        * web-platform-tests/css/cssom-view/scrollLeftTop-expected.txt:
     10
    1112021-04-16  Tyler Wilcock  <twilco.o@protonmail.com>
    212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/snap-inline-block-expected.txt

    r271480 r276182  
    22PASS Snaps correctly for horizontal-tb writing mode with 'scroll-snap-align: end start' alignment
    33FAIL Snaps correctly for vertical-lr writing mode with 'scroll-snap-align: end start' alignment assert_equals: aligns correctly on x expected 115 but got 300
    4 FAIL Snaps correctly for vertical-rl writing mode with 'scroll-snap-align: end start' alignment assert_equals: aligns correctly on x expected -315 but got -300
     4FAIL Snaps correctly for vertical-rl writing mode with 'scroll-snap-align: end start' alignment assert_equals: aligns correctly on y expected 300 but got 165
    55FAIL Snaps correctly for horizontal-tb writing mode with 'scroll-snap-align: start end' alignment assert_equals: aligns correctly on x expected 115 but got 0
    66FAIL Snaps correctly for vertical-lr writing mode with 'scroll-snap-align: start end' alignment assert_equals: aligns correctly on x expected 300 but got 0
    7 FAIL Snaps correctly for vertical-rl writing mode with 'scroll-snap-align: start end' alignment assert_equals: aligns correctly on x expected -500 but got -485
    8 FAIL Snaps correctly for 'direction: rtl' with 'scroll-snap-align: end start' alignment assert_equals: aligns correctly on x expected -500 but got -485
    9 FAIL Snaps correctly for 'direction: rtl' with 'scroll-snap-align: start end' alignment assert_equals: aligns correctly on x expected -315 but got -300
     7FAIL Snaps correctly for vertical-rl writing mode with 'scroll-snap-align: start end' alignment assert_equals: aligns correctly on y expected 165 but got 300
     8FAIL Snaps correctly for 'direction: rtl' with 'scroll-snap-align: end start' alignment assert_equals: aligns correctly on y expected 165 but got 0
     9FAIL Snaps correctly for 'direction: rtl' with 'scroll-snap-align: start end' alignment assert_equals: aligns correctly on y expected 300 but got 0
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollLeftTop-expected.txt

    r267650 r276182  
    1212PASS writing-mode:vertical-lr; direction:ltr
    1313PASS writing-mode:vertical-lr; direction:rtl
    14 FAIL writing-mode:vertical-rl; direction:ltr assert_approx_equals: ending scrollLeft expected -165 +/- 0.5 but got -150
    15 FAIL writing-mode:vertical-rl; direction:rtl assert_approx_equals: ending scrollLeft expected -165 +/- 0.5 but got -150
     14PASS writing-mode:vertical-rl; direction:ltr
     15PASS writing-mode:vertical-rl; direction:rtl
    1616
  • trunk/LayoutTests/platform/ios/TestExpectations

    r276166 r276182  
    10621062
    10631063# RTL Scrollbars are only implemented on certain versions of OS X
     1064css3/flexbox/child-overflow.html [ Skip ]
    10641065fast/scrolling/rtl-scrollbars-iframe-scrolled.html [ Skip ]
    10651066fast/scrolling/rtl-scrollbars-listbox-scroll.html [ Skip ]
     
    10691070fast/scrolling/rtl-scrollbars-text-selection-scrolled.html [ Skip ]
    10701071fast/scrolling/rtl-scrollbars-text-selection.html [ Skip ]
     1072fast/scrolling/v-rl-scrollbars-initial-position-dynamic.html [ Skip ]
     1073fast/scrolling/v-rl-scrollbars-initial-position.html [ Skip ]
     1074fast/scrolling/vertical-scrollbar-position.html [ Skip ]
    10711075
    10721076# This is specific to extensions on macOS
  • trunk/Source/WebCore/ChangeLog

    r276181 r276182  
     12021-04-16  Cameron McCormack  <heycam@apple.com>
     2
     3        Place vertical scrollbars at (inline/block)-end edge in all writing modes.
     4        https://bugs.webkit.org/show_bug.cgi?id=224224
     5
     6        Reviewed by Simon Fraser.
     7
     8        Tests: fast/scrolling/v-rl-scrollbars-initial-position-dynamic.html
     9               fast/scrolling/v-rl-scrollbars-initial-position.html
     10               fast/scrolling/vertical-scrollbar-position.html
     11
     12        We currently only consider moving a vertical scrollbar to the left for
     13        `writing-mode: horizontal-{tb,bt}; direction: rtl` containers. But
     14        ideally we should always place the vertical scrollbar at the end edge
     15        of the container (whether that's the inline-end edge, when using a
     16        horizontal writing mode, or the block-end edge, when using a vertical
     17        writing mode).
     18
     19        Some functions calling the existing shouldPlaceBlockDirectionScrollbarOnLeft
     20        instead really care about whether the vertical scrollbar is on the
     21        left, not whether the block direction scrollbar is on the left (since
     22        for vertical writing modes, the block direction scrollbar is the
     23        horizontal one on the bottom). So we rename this to
     24        shouldPlaceVerticalScrollbarOnLeft, make it return true for
     25        `writing-mode: vertical-rl`, and adjust callers that really do care
     26        only about block direction scrollbars to additionally check their
     27        writing mode.
     28
     29        * page/EventHandler.cpp:
     30        (WebCore::EventHandler::selectCursor):
     31        * page/FrameView.cpp:
     32        (WebCore::FrameView::shouldPlaceVerticalScrollbarOnLeft const):
     33        * page/FrameView.h:
     34        * platform/ScrollView.cpp:
     35        (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin const):
     36        (WebCore::ScrollView::updateScrollbars):
     37        (WebCore::ScrollView::scrollCornerRect const):
     38        (WebCore::ScrollView::locationOfContents const):
     39        * platform/ScrollableArea.h:
     40        * platform/adwaita/ScrollbarThemeAdwaita.cpp:
     41        (WebCore::ScrollbarThemeAdwaita::paint):
     42        * platform/gtk/ScrollbarThemeGtk.cpp:
     43        (WebCore::widgetTypeForScrollbar):
     44        (WebCore::ScrollbarThemeGtk::paint):
     45        * platform/mac/ScrollbarThemeMac.mm:
     46        (WebCore::ScrollbarThemeMac::didCreateScrollerImp):
     47        * platform/win/PopupMenuWin.h:
     48        * rendering/RenderBlock.cpp:
     49        (WebCore::RenderBlock::logicalLeftOffsetForContent const):
     50        (WebCore::RenderBlock::logicalRightOffsetForContent const):
     51        * rendering/RenderBlockFlow.cpp:
     52        (WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild):
     53        * rendering/RenderBox.cpp:
     54        (WebCore::RenderBox::paddingBoxRect const):
     55        (WebCore::RenderBox::contentBoxLocation const):
     56        (WebCore::RenderBox::overflowClipRect const):
     57        (WebCore::RenderBox::computePositionedLogicalWidth const):
     58        (WebCore::RenderBox::flippedClientBoxRect const):
     59        * rendering/RenderBoxModelObject.cpp:
     60        (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition const):
     61        * rendering/RenderLayer.cpp:
     62        (WebCore::RenderLayer::scrollRectToVisible):
     63        (WebCore::RenderLayer::resize):
     64        (WebCore::RenderLayer::overflowControlsRects const):
     65        (WebCore::RenderLayer::offsetFromResizeCorner const):
     66        * rendering/RenderLayerCompositor.cpp:
     67        (WebCore::RenderLayerCompositor::positionForClipLayer const):
     68        * rendering/RenderLayerModelObject.cpp:
     69        (WebCore::RenderLayerModelObject::shouldPlaceVerticalScrollbarOnLeft const):
     70        * rendering/RenderLayerModelObject.h:
     71        * rendering/RenderLayerScrollableArea.cpp:
     72        (WebCore::RenderLayerScrollableArea::shouldPlaceVerticalScrollbarOnLeft const):
     73        (WebCore::RenderLayerScrollableArea::overflowControlsRects const):
     74        (WebCore::RenderLayerScrollableArea::computeScrollOrigin):
     75        (WebCore::RenderLayerScrollableArea::updateScrollbarsAfterLayout):
     76        (WebCore::RenderLayerScrollableArea::drawPlatformResizerImage):
     77        (WebCore::RenderLayerScrollableArea::hitTestResizerInFragments const):
     78        (WebCore::RenderLayerScrollableArea::updateScrollbarsAfterStyleChange):
     79        * rendering/RenderLayerScrollableArea.h:
     80        * rendering/RenderListBox.cpp:
     81        (WebCore::RenderListBox::itemBoundingBoxRect):
     82        (WebCore::RenderListBox::paintScrollbar):
     83        (WebCore::RenderListBox::isPointInOverflowControl):
     84        (WebCore::RenderListBox::listIndexAtOffset):
     85        (WebCore::RenderListBox::invalidateScrollbarRect):
     86        (WebCore::RenderListBox::convertFromScrollbarToContainingView const):
     87        (WebCore::RenderListBox::convertFromContainingViewToScrollbar const):
     88        * rendering/RenderListBox.h:
     89        * rendering/RenderView.cpp:
     90        (WebCore::RenderView::repaintViewRectangle const):
     91        * rendering/style/RenderStyle.cpp:
     92        (WebCore::RenderStyle::shouldPlaceVerticalScrollbarOnLeft const):
     93        * rendering/style/RenderStyle.h:
     94
    1952021-04-16  Wenson Hsieh  <wenson_hsieh@apple.com>
    296
  • trunk/Source/WebCore/page/EventHandler.cpp

    r275988 r276182  
    15191519            inResizer = layerRenderer.layer()->isPointInResizeControl(roundedIntPoint(result.localPoint()));
    15201520            if (inResizer)
    1521                 return layerRenderer.shouldPlaceBlockDirectionScrollbarOnLeft() ? southWestResizeCursor() : southEastResizeCursor();
     1521                return layerRenderer.shouldPlaceVerticalScrollbarOnLeft() ? southWestResizeCursor() : southEastResizeCursor();
    15221522        }
    15231523
  • trunk/Source/WebCore/page/FrameView.cpp

    r274464 r276182  
    55545554}
    55555555
    5556 bool FrameView::shouldPlaceBlockDirectionScrollbarOnLeft() const
    5557 {
    5558     return renderView() && renderView()->shouldPlaceBlockDirectionScrollbarOnLeft();
     5556bool FrameView::shouldPlaceVerticalScrollbarOnLeft() const
     5557{
     5558    return renderView() && renderView()->shouldPlaceVerticalScrollbarOnLeft();
    55595559}
    55605560
  • trunk/Source/WebCore/page/FrameView.h

    r274958 r276182  
    656656    void hide() final;
    657657
    658     bool shouldPlaceBlockDirectionScrollbarOnLeft() const final;
     658    bool shouldPlaceVerticalScrollbarOnLeft() const final;
    659659
    660660    void didRestoreFromBackForwardCache();
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r274464 r276182  
    423423{
    424424    return scrollPosition() - IntSize(
    425         shouldPlaceBlockDirectionScrollbarOnLeft() && m_verticalScrollbar ? m_verticalScrollbar->occupiedWidth() : 0,
     425        shouldPlaceVerticalScrollbarOnLeft() && m_verticalScrollbar ? m_verticalScrollbar->occupiedWidth() : 0,
    426426        headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset));
    427427}
     
    733733        int clientWidth = visibleWidth();
    734734        IntRect oldRect(m_horizontalScrollbar->frameRect());
    735         IntRect hBarRect(shouldPlaceBlockDirectionScrollbarOnLeft() && m_verticalScrollbar ? m_verticalScrollbar->occupiedWidth() : 0,
     735        IntRect hBarRect(shouldPlaceVerticalScrollbarOnLeft() && m_verticalScrollbar ? m_verticalScrollbar->occupiedWidth() : 0,
    736736            height() - m_horizontalScrollbar->height(),
    737737            width() - (m_verticalScrollbar ? m_verticalScrollbar->occupiedWidth() : 0),
     
    752752        int clientHeight = visibleHeight();
    753753        IntRect oldRect(m_verticalScrollbar->frameRect());
    754         IntRect vBarRect(shouldPlaceBlockDirectionScrollbarOnLeft() ? 0 : width() - m_verticalScrollbar->width(),
     754        IntRect vBarRect(shouldPlaceVerticalScrollbarOnLeft() ? 0 : width() - m_verticalScrollbar->width(),
    755755            topContentInset(),
    756756            m_verticalScrollbar->width(),
     
    11801180
    11811181    if (m_horizontalScrollbar && width() - m_horizontalScrollbar->width() > 0) {
    1182         cornerRect.unite(IntRect(shouldPlaceBlockDirectionScrollbarOnLeft() ? 0 : m_horizontalScrollbar->width(),
     1182        cornerRect.unite(IntRect(shouldPlaceVerticalScrollbarOnLeft() ? 0 : m_horizontalScrollbar->width(),
    11831183            height() - m_horizontalScrollbar->height(),
    11841184            width() - m_horizontalScrollbar->width(),
     
    11871187
    11881188    if (m_verticalScrollbar && heightTrackedByScrollbar - m_verticalScrollbar->height() > 0) {
    1189         cornerRect.unite(IntRect(shouldPlaceBlockDirectionScrollbarOnLeft() ? 0 : width() - m_verticalScrollbar->width(),
     1189        cornerRect.unite(IntRect(shouldPlaceVerticalScrollbarOnLeft() ? 0 : width() - m_verticalScrollbar->width(),
    11901190            m_verticalScrollbar->height() + topContentInset(),
    11911191            m_verticalScrollbar->width(),
     
    15391539{
    15401540    IntPoint result = location();
    1541     if (shouldPlaceBlockDirectionScrollbarOnLeft() && m_verticalScrollbar)
     1541    if (shouldPlaceVerticalScrollbarOnLeft() && m_verticalScrollbar)
    15421542        result.move(m_verticalScrollbar->occupiedWidth(), 0);
    15431543    return result;
  • trunk/Source/WebCore/platform/ScrollableArea.h

    r275354 r276182  
    343343    virtual void logMockScrollAnimatorMessage(const String&) const { };
    344344
    345     virtual bool shouldPlaceBlockDirectionScrollbarOnLeft() const = 0;
     345    virtual bool shouldPlaceVerticalScrollbarOnLeft() const = 0;
    346346   
    347347    virtual String debugDescription() const = 0;
  • trunk/Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp

    r264584 r276182  
    128128        IntRect frame = rect;
    129129        if (scrollbar.orientation() == VerticalScrollbar) {
    130             if (scrollbar.scrollableArea().shouldPlaceBlockDirectionScrollbarOnLeft())
     130            if (scrollbar.scrollableArea().shouldPlaceVerticalScrollbarOnLeft())
    131131                frame.move(frame.width() - hoveredScrollbarBorderSize, 0);
    132132            frame.setWidth(hoveredScrollbarBorderSize);
     
    141141    if (scrollbar.hoveredPart() == NoPart && usesOverlayScrollbars()) {
    142142        if (scrollbar.orientation() == VerticalScrollbar) {
    143             if (scrollbar.scrollableArea().shouldPlaceBlockDirectionScrollbarOnLeft())
     143            if (scrollbar.scrollableArea().shouldPlaceVerticalScrollbarOnLeft())
    144144                thumb.move(hoveredScrollbarBorderSize, thumbPos + thumbBorderSize);
    145145            else
     
    154154    } else {
    155155        if (scrollbar.orientation() == VerticalScrollbar) {
    156             if (scrollbar.scrollableArea().shouldPlaceBlockDirectionScrollbarOnLeft())
     156            if (scrollbar.scrollableArea().shouldPlaceVerticalScrollbarOnLeft())
    157157                thumb.move(scrollbarSize - (scrollbarSize / 2 + thumbSize / 2) - hoveredScrollbarBorderSize, thumbPos + thumbBorderSize);
    158158            else
  • trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp

    r260070 r276182  
    143143{
    144144    if (scrollbar.orientation() == VerticalScrollbar) {
    145         if (scrollbar.scrollableArea().shouldPlaceBlockDirectionScrollbarOnLeft())
     145        if (scrollbar.scrollableArea().shouldPlaceVerticalScrollbarOnLeft())
    146146            return scrollbarState & GTK_STATE_FLAG_PRELIGHT ? RenderThemeScrollbar::Type::VerticalScrollbarLeft : RenderThemeScrollbar::Type::VerticalScrollIndicatorLeft;
    147147        return scrollbarState & GTK_STATE_FLAG_PRELIGHT ? RenderThemeScrollbar::Type::VerticalScrollbarRight : RenderThemeScrollbar::Type::VerticalScrollIndicatorRight;
     
    381381    if (scrollbar.orientation() == VerticalScrollbar) {
    382382        if (rect.width() != preferredSize.width()) {
    383             if (!scrollbar.scrollableArea().shouldPlaceBlockDirectionScrollbarOnLeft())
     383            if (!scrollbar.scrollableArea().shouldPlaceVerticalScrollbarOnLeft())
    384384                contentsRect.move(std::abs(rect.width() - preferredSize.width()), 0);
    385385            contentsRect.setWidth(preferredSize.width());
  • trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm

    r271057 r276182  
    160160    NSScrollerImp *scrollerImp = painterForScrollbar(scrollbar);
    161161    ASSERT(scrollerImp);
    162     scrollerImp.userInterfaceLayoutDirection = scrollbar.scrollableArea().shouldPlaceBlockDirectionScrollbarOnLeft() ? NSUserInterfaceLayoutDirectionRightToLeft : NSUserInterfaceLayoutDirectionLeftToRight;
     162    scrollerImp.userInterfaceLayoutDirection = scrollbar.scrollableArea().shouldPlaceVerticalScrollbarOnLeft() ? NSUserInterfaceLayoutDirectionRightToLeft : NSUserInterfaceLayoutDirectionLeftToRight;
    163163#else
    164164    UNUSED_PARAM(scrollbar);
  • trunk/Source/WebCore/platform/win/PopupMenuWin.h

    r259597 r276182  
    105105    IntRect scrollableAreaBoundingBox(bool* = nullptr) const override;
    106106    bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override { return false; }
    107     bool shouldPlaceBlockDirectionScrollbarOnLeft() const final { return false; }
     107    bool shouldPlaceVerticalScrollbarOnLeft() const final { return false; }
    108108
    109109    // NOTE: This should only be called by the overriden setScrollOffset from ScrollableArea.
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r275754 r276182  
    19241924{
    19251925    LayoutUnit logicalLeftOffset = style().isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop();
    1926     if (shouldPlaceBlockDirectionScrollbarOnLeft())
     1926    if (shouldPlaceVerticalScrollbarOnLeft() && isHorizontalWritingMode())
    19271927        logicalLeftOffset += verticalScrollbarWidth();
    19281928    if (!fragment)
     
    19351935{
    19361936    LayoutUnit logicalRightOffset = style().isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop();
    1937     if (shouldPlaceBlockDirectionScrollbarOnLeft())
     1937    if (shouldPlaceVerticalScrollbarOnLeft() && isHorizontalWritingMode())
    19381938        logicalRightOffset += verticalScrollbarWidth();
    19391939    logicalRightOffset += availableLogicalWidth();
  • trunk/Source/WebCore/rendering/RenderBlockFlow.cpp

    r275494 r276182  
    884884{
    885885    LayoutUnit startPosition = borderStart() + paddingStart();
    886     if (shouldPlaceBlockDirectionScrollbarOnLeft())
     886    if (shouldPlaceVerticalScrollbarOnLeft() && isHorizontalWritingMode())
    887887        startPosition += (style().isLeftToRightDirection() ? 1 : -1) * verticalScrollbarWidth();
    888888    LayoutUnit totalAvailableLogicalWidth = borderAndPaddingLogicalWidth() + availableLogicalWidth();
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r275908 r276182  
    723723{
    724724    auto verticalScrollbarWidth = this->verticalScrollbarWidth();
    725     LayoutUnit offsetForScrollbar = shouldPlaceBlockDirectionScrollbarOnLeft() ? verticalScrollbarWidth : 0;
     725    LayoutUnit offsetForScrollbar = shouldPlaceVerticalScrollbarOnLeft() ? verticalScrollbarWidth : 0;
    726726
    727727    return LayoutRect(borderLeft() + offsetForScrollbar, borderTop(),
     
    737737LayoutPoint RenderBox::contentBoxLocation() const
    738738{
    739     LayoutUnit scrollbarSpace = shouldPlaceBlockDirectionScrollbarOnLeft() ? verticalScrollbarWidth() : 0;
     739    LayoutUnit scrollbarSpace = shouldPlaceVerticalScrollbarOnLeft() ? verticalScrollbarWidth() : 0;
    740740    return { borderLeft() + paddingLeft() + scrollbarSpace, borderTop() + paddingTop() };
    741741}
     
    19651965    // Subtract out scrollbars if we have them.
    19661966    if (auto* scrollableArea = layer() ? layer()->scrollableArea() : nullptr) {
    1967         if (shouldPlaceBlockDirectionScrollbarOnLeft())
     1967        if (shouldPlaceVerticalScrollbarOnLeft())
    19681968            clipRect.move(scrollableArea->verticalScrollbarWidth(relevancy), 0);
    19691969        clipRect.contract(scrollableArea->verticalScrollbarWidth(relevancy), scrollableArea->horizontalScrollbarHeight(relevancy));
     
    37603760    if (is<RenderBox>(containerBlock)) {
    37613761        auto& containingBox = downcast<RenderBox>(containerBlock);
    3762         if (containingBox.shouldPlaceBlockDirectionScrollbarOnLeft())
     3762        if (containingBox.shouldPlaceVerticalScrollbarOnLeft() && isHorizontalWritingMode())
    37633763            computedValues.m_position += containingBox.verticalScrollbarWidth();
    37643764    }
     
    49814981    // Subtract space occupied by scrollbars. They are at their physical edge in this coordinate
    49824982    // system, so order is important here: first flip, then subtract scrollbars.
    4983     if (shouldPlaceBlockDirectionScrollbarOnLeft())
     4983    if (shouldPlaceVerticalScrollbarOnLeft() && isHorizontalWritingMode())
    49844984        rect.move(verticalScrollbarWidth(), 0);
    49854985    rect.contract(verticalScrollbarWidth(), horizontalScrollbarHeight());
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r275758 r276182  
    557557
    558558        float scrollbarOffset = 0;
    559         if (enclosingClippingBox.hasLayer() && enclosingClippingBox.shouldPlaceBlockDirectionScrollbarOnLeft() && scrollableArea)
     559        if (enclosingClippingBox.hasLayer() && enclosingClippingBox.shouldPlaceVerticalScrollbarOnLeft() && scrollableArea)
    560560            scrollbarOffset = scrollableArea->verticalScrollbarWidth(IgnoreOverlayScrollbarSize);
    561561
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r275641 r276182  
    24312431        localExposeRect.moveBy(-LayoutPoint(box->borderLeft(), box->borderTop()));
    24322432
    2433         if (box->shouldPlaceBlockDirectionScrollbarOnLeft()) {
    2434             // For direction: rtl; writing-mode: horizontal-tb box, the scroll bar is on the left side. The visible rect
    2435             // starts from the right side of scroll bar. So the x of localExposeRect should start from the same position too.
     2433        if (box->shouldPlaceVerticalScrollbarOnLeft()) {
     2434            // For `direction: rtl; writing-mode: horizontal-{tb,bt}` and `writing-mode: vertical-rl`
     2435            // boxes, the scroll bar is on the left side. The visible rect starts from the right side
     2436            // of the scroll bar. So the x of localExposeRect should start from the same position too.
    24362437            localExposeRect.moveBy(LayoutPoint(-scrollableArea->verticalScrollbarWidth(), 0));
    24372438        }
     
    26772678   
    26782679    LayoutSize adjustedOldOffset = LayoutSize(oldOffset.width() / zoomFactor, oldOffset.height() / zoomFactor);
    2679     if (renderer->shouldPlaceBlockDirectionScrollbarOnLeft()) {
     2680    if (renderer->shouldPlaceVerticalScrollbarOnLeft()) {
    26802681        newOffset.setWidth(-newOffset.width());
    26812682        adjustedOldOffset.setWidth(-adjustedOldOffset.width());
     
    27342735    auto overflowControlsPositioningRect = snappedIntRect(renderBox.paddingBoxRectIncludingScrollbar());
    27352736
    2736     bool placeVerticalScrollbarOnTheLeft = renderBox.shouldPlaceBlockDirectionScrollbarOnLeft();
     2737    bool placeVerticalScrollbarOnTheLeft = renderBox.shouldPlaceVerticalScrollbarOnLeft();
    27372738    bool haveResizer = renderer().style().resize() != Resize::None;
    27382739
     
    27872788{
    27882789    auto resizerRect = overflowControlsRects().resizer;
    2789     auto resizeCorner = renderer().shouldPlaceBlockDirectionScrollbarOnLeft() ? resizerRect.minXMaxYCorner() : resizerRect.maxXMaxYCorner();
     2790    auto resizeCorner = renderer().shouldPlaceVerticalScrollbarOnLeft() ? resizerRect.minXMaxYCorner() : resizerRect.maxXMaxYCorner();
    27902791    return localPoint - resizeCorner;
    27912792}
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r276085 r276182  
    22312231
    22322232    return FloatPoint(
    2233         frameView.shouldPlaceBlockDirectionScrollbarOnLeft() ? frameView.horizontalScrollbarIntrusion() : 0,
     2233        frameView.shouldPlaceVerticalScrollbarOnLeft() ? frameView.horizontalScrollbarIntrusion() : 0,
    22342234        FrameView::yPositionForInsetClipLayer(frameView.scrollPosition(), frameView.topContentInset()));
    22352235}
  • trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp

    r275641 r276182  
    208208}
    209209
    210 bool RenderLayerModelObject::shouldPlaceBlockDirectionScrollbarOnLeft() const
     210bool RenderLayerModelObject::shouldPlaceVerticalScrollbarOnLeft() const
    211211{
    212212// RTL Scrollbars require some system support, and this system support does not exist on certain versions of OS X. iOS uses a separate mechanism.
     
    216216    switch (settings().userInterfaceDirectionPolicy()) {
    217217    case UserInterfaceDirectionPolicy::Content:
    218         return style().shouldPlaceBlockDirectionScrollbarOnLeft();
     218        return style().shouldPlaceVerticalScrollbarOnLeft();
    219219    case UserInterfaceDirectionPolicy::System:
    220220        return settings().systemLayoutDirection() == TextDirection::RTL;
    221221    }
    222222    ASSERT_NOT_REACHED();
    223     return style().shouldPlaceBlockDirectionScrollbarOnLeft();
     223    return style().shouldPlaceVerticalScrollbarOnLeft();
    224224#endif
    225225}
  • trunk/Source/WebCore/rendering/RenderLayerModelObject.h

    r275641 r276182  
    5757    virtual bool isScrollableOrRubberbandableBox() const { return false; }
    5858
    59     bool shouldPlaceBlockDirectionScrollbarOnLeft() const;
     59    bool shouldPlaceVerticalScrollbarOnLeft() const;
    6060
    6161    Optional<LayerRepaintRects> layerRepaintRects() const;
  • trunk/Source/WebCore/rendering/RenderLayerScrollableArea.cpp

    r275811 r276182  
    120120}
    121121
    122 bool RenderLayerScrollableArea::shouldPlaceBlockDirectionScrollbarOnLeft() const
    123 {
    124     return m_layer.renderer().shouldPlaceBlockDirectionScrollbarOnLeft();
     122bool RenderLayerScrollableArea::shouldPlaceVerticalScrollbarOnLeft() const
     123{
     124    return m_layer.renderer().shouldPlaceVerticalScrollbarOnLeft();
    125125}
    126126
     
    655655    bool haveNonOverlayHorizontalScrollbar = isNonOverlayScrollbar(m_hBar.get());
    656656    bool haveNonOverlayVerticalScrollbar = isNonOverlayScrollbar(m_vBar.get());
    657     bool placeVerticalScrollbarOnTheLeft = shouldPlaceBlockDirectionScrollbarOnLeft();
     657    bool placeVerticalScrollbarOnTheLeft = shouldPlaceVerticalScrollbarOnLeft();
    658658    bool haveResizer = renderer.style().resize() != Resize::None;
    659659    bool scrollbarsAvoidCorner = (haveNonOverlayHorizontalScrollbar && haveNonOverlayVerticalScrollbar) || (haveResizer && (haveNonOverlayHorizontalScrollbar || haveNonOverlayVerticalScrollbar));
     
    10221022
    10231023    int scrollableLeftOverflow = roundToInt(overflowLeft() - box->borderLeft());
    1024     if (shouldPlaceBlockDirectionScrollbarOnLeft())
     1024    if (shouldPlaceVerticalScrollbarOnLeft() /*|| box->style().writingMode() == WritingMode::RightToLeft*/)
    10251025        scrollableLeftOverflow -= verticalScrollbarWidth();
    10261026    int scrollableTopOverflow = roundToInt(overflowTop() - box->borderTop());
     
    11051105            setHasVerticalScrollbar(hasVerticalOverflow);
    11061106
    1107         if (autoVerticalScrollBarChanged && shouldPlaceBlockDirectionScrollbarOnLeft())
     1107        if (autoVerticalScrollBarChanged && shouldPlaceVerticalScrollbarOnLeft())
    11081108            computeScrollOrigin();
    11091109
     
    13491349    }
    13501350
    1351     if (shouldPlaceBlockDirectionScrollbarOnLeft()) {
     1351    if (shouldPlaceVerticalScrollbarOnLeft()) {
    13521352        context.save();
    13531353        context.translate(resizerCornerRect.x() + cornerResizerSize.width(), resizerCornerRect.y() + resizerCornerRect.height() - cornerResizerSize.height());
     
    15101510
    15111511    auto cornerRectInFragment = [&](const IntRect& fragmentBounds, const IntRect& resizerRect) {
    1512         if (shouldPlaceBlockDirectionScrollbarOnLeft()) {
     1512        if (shouldPlaceVerticalScrollbarOnLeft()) {
    15131513            IntSize offsetFromBottomLeft = borderBoxRect.minXMaxYCorner() - resizerRect.minXMaxYCorner();
    15141514            return IntRect { fragmentBounds.minXMaxYCorner() - offsetFromBottomLeft - IntSize { 0, resizerRect.height() }, resizerRect.size() };
     
    15711571    setHasVerticalScrollbar(needsVerticalScrollbar);
    15721572
    1573     if (hadVerticalScrollbar != needsVerticalScrollbar || (needsVerticalScrollbar && oldStyle && box->style().shouldPlaceBlockDirectionScrollbarOnLeft() != oldStyle->shouldPlaceBlockDirectionScrollbarOnLeft()))
     1573    if (hadVerticalScrollbar != needsVerticalScrollbar || (needsVerticalScrollbar && oldStyle && box->style().shouldPlaceVerticalScrollbarOnLeft() != oldStyle->shouldPlaceVerticalScrollbarOnLeft()))
    15741574        computeScrollOrigin();
    15751575
  • trunk/Source/WebCore/rendering/RenderLayerScrollableArea.h

    r275811 r276182  
    168168    bool usesAsyncScrolling() const final;
    169169
    170     bool shouldPlaceBlockDirectionScrollbarOnLeft() const final;
     170    bool shouldPlaceVerticalScrollbarOnLeft() const final;
    171171
    172172    bool isRenderLayer() const final { return true; }
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r275413 r276182  
    282282{
    283283    LayoutUnit x = additionalOffset.x() + borderLeft() + paddingLeft();
    284     if (shouldPlaceBlockDirectionScrollbarOnLeft() && m_vBar)
     284    if (shouldPlaceVerticalScrollbarOnLeft() && m_vBar)
    285285        x += m_vBar->occupiedWidth();
    286286    LayoutUnit y = additionalOffset.y() + borderTop() + paddingTop() + itemHeight() * (index - m_indexOffset);
     
    364364        return;
    365365
    366     LayoutUnit left = paintOffset.x() + (shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - m_vBar->width());
     366    LayoutUnit left = paintOffset.x() + (shouldPlaceVerticalScrollbarOnLeft() ? borderLeft() : width() - borderRight() - m_vBar->width());
    367367    LayoutUnit top = paintOffset.y() + borderTop();
    368368    LayoutUnit width = m_vBar->width();
     
    470470        return false;
    471471
    472     LayoutUnit x = accumulatedOffset.x() + (shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - m_vBar->width());
     472    LayoutUnit x = accumulatedOffset.x() + (shouldPlaceVerticalScrollbarOnLeft() ? borderLeft() : width() - borderRight() - m_vBar->width());
    473473    LayoutUnit y = accumulatedOffset.y() + borderTop();
    474474    LayoutUnit width = m_vBar->width();
     
    492492
    493493    int scrollbarWidth = m_vBar ? m_vBar->width() : 0;
    494     if (shouldPlaceBlockDirectionScrollbarOnLeft() && (offset.width() < borderLeft() + paddingLeft() + scrollbarWidth || offset.width() > width() - borderRight() - paddingRight()))
     494    if (shouldPlaceVerticalScrollbarOnLeft() && (offset.width() < borderLeft() + paddingLeft() + scrollbarWidth || offset.width() > width() - borderRight() - paddingRight()))
    495495        return -1;
    496     if (!shouldPlaceBlockDirectionScrollbarOnLeft() && (offset.width() < borderLeft() + paddingLeft() || offset.width() > width() - borderRight() - paddingRight() - scrollbarWidth))
     496    if (!shouldPlaceVerticalScrollbarOnLeft() && (offset.width() < borderLeft() + paddingLeft() || offset.width() > width() - borderRight() - paddingRight() - scrollbarWidth))
    497497        return -1;
    498498
     
    801801{
    802802    IntRect scrollRect = rect;
    803     scrollRect.move(shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width(), borderTop());
     803    scrollRect.move(shouldPlaceVerticalScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width(), borderTop());
    804804    repaintRectangle(scrollRect);
    805805}
     
    808808{
    809809    IntRect rect = scrollbarRect;
    810     int scrollbarLeft = shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
     810    int scrollbarLeft = shouldPlaceVerticalScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
    811811    int scrollbarTop = borderTop();
    812812    rect.move(scrollbarLeft, scrollbarTop);
     
    817817{
    818818    IntRect rect = view().frameView().convertFromContainingViewToRenderer(this, parentRect);
    819     int scrollbarLeft = shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
     819    int scrollbarLeft = shouldPlaceVerticalScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
    820820    int scrollbarTop = borderTop();
    821821    rect.move(-scrollbarLeft, -scrollbarTop);
     
    826826{
    827827    IntPoint point = scrollbarPoint;
    828     int scrollbarLeft = shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
     828    int scrollbarLeft = shouldPlaceVerticalScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
    829829    int scrollbarTop = borderTop();
    830830    point.move(scrollbarLeft, scrollbarTop);
     
    835835{
    836836    IntPoint point = view().frameView().convertFromContainingViewToRenderer(this, parentPoint);
    837     int scrollbarLeft = shouldPlaceBlockDirectionScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
     837    int scrollbarLeft = shouldPlaceVerticalScrollbarOnLeft() ? borderLeft() : width() - borderRight() - scrollbar.width();
    838838    int scrollbarTop = borderTop();
    839839    point.move(-scrollbarLeft, -scrollbarTop);
  • trunk/Source/WebCore/rendering/RenderListBox.h

    r275413 r276182  
    173173    void scrollToRevealSelection();
    174174
    175     bool shouldPlaceBlockDirectionScrollbarOnLeft() const final { return RenderBlockFlow::shouldPlaceBlockDirectionScrollbarOnLeft(); }
     175    bool shouldPlaceVerticalScrollbarOnLeft() const final { return RenderBlockFlow::shouldPlaceVerticalScrollbarOnLeft(); }
    176176
    177177    bool m_optionsChanged;
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r271906 r276182  
    474474        // left scrollbar (if one exists).
    475475        FrameView& frameView = this->frameView();
    476         if (frameView.shouldPlaceBlockDirectionScrollbarOnLeft() && frameView.verticalScrollbar())
     476        if (frameView.shouldPlaceVerticalScrollbarOnLeft() && frameView.verticalScrollbar())
    477477            adjustedRect.move(LayoutSize(frameView.verticalScrollbar()->occupiedWidth(), 0));
    478478
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r275650 r276182  
    25822582}
    25832583
    2584 bool RenderStyle::shouldPlaceBlockDirectionScrollbarOnLeft() const
    2585 {
    2586     return !isLeftToRightDirection() && isHorizontalWritingMode();
     2584bool RenderStyle::shouldPlaceVerticalScrollbarOnLeft() const
     2585{
     2586    return (!isLeftToRightDirection() && isHorizontalWritingMode()) || writingMode() == WritingMode::RightToLeft;
    25872587}
    25882588
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r275199 r276182  
    830830#endif
    831831
    832     bool shouldPlaceBlockDirectionScrollbarOnLeft() const;
     832    bool shouldPlaceVerticalScrollbarOnLeft() const;
    833833
    834834#if ENABLE(CSS_TRAILING_WORD)
  • trunk/Source/WebKit/ChangeLog

    r276181 r276182  
     12021-04-16  Cameron McCormack  <heycam@apple.com>
     2
     3        Place vertical scrollbars at (inline/block)-end edge in all writing modes.
     4        https://bugs.webkit.org/show_bug.cgi?id=224224
     5
     6        Reviewed by Simon Fraser.
     7
     8        * UIProcess/win/WebPopupMenuProxyWin.h:
     9        * WebProcess/Plugins/PDF/PDFPlugin.h:
     10
    1112021-04-16  Wenson Hsieh  <wenson_hsieh@apple.com>
    212
  • trunk/Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.h

    r259597 r276182  
    8181    WebCore::IntSize contentsSize() const override;
    8282    WebCore::IntRect scrollableAreaBoundingBox(bool* = nullptr) const override;
    83     bool shouldPlaceBlockDirectionScrollbarOnLeft() const override { return false; }
     83    bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; }
    8484    bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override { return false; }
    8585    bool isScrollableOrRubberbandable() override { return true; }
  • trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h

    r273833 r276182  
    257257    WebCore::IntPoint convertFromContainingViewToScrollbar(const WebCore::Scrollbar&, const WebCore::IntPoint& parentPoint) const final;
    258258    bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const final;
    259     bool shouldPlaceBlockDirectionScrollbarOnLeft() const final { return false; }
     259    bool shouldPlaceVerticalScrollbarOnLeft() const final { return false; }
    260260    String debugDescription() const final;
    261261
Note: See TracChangeset for help on using the changeset viewer.