haikuwebkit/LayoutTests/css3/flexbox
Cameron McCormack 231a178df8 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.


Canonical link: https://commits.webkit.org/236665@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-16 23:55:14 +00:00
..
csswg
resources
anonymous-block-merge-crash-expected.txt
anonymous-block-merge-crash.html
assert-generated-new-flexbox-expected.txt
assert-generated-new-flexbox.html
auto-height-dynamic-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
auto-height-dynamic.html
box-orient-button-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
box-orient-button.html
button-expected.png
button-expected.txt
button.html
child-overflow-expected.html Place vertical scrollbars at (inline/block)-end edge in all writing modes. 2021-04-16 23:55:14 +00:00
child-overflow.html
column-inside-normal-block-preferred-width-expected.html
column-inside-normal-block-preferred-width.html
columns-auto-size-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
columns-auto-size.html
crash-removing-out-of-flow-child-expected.txt
crash-removing-out-of-flow-child.html
css-properties-expected.txt
css-properties.html
definite-main-size-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
definite-main-size.html [css-flex] Allow indefinite size flex items to be definite wrt resolving percentages inside them 2020-09-07 09:54:13 +00:00
display-flexbox-set-get-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
display-flexbox-set-get.html
flex-algorithm-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-algorithm-min-max-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-algorithm-min-max.html
flex-algorithm-with-margins-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-algorithm-with-margins.html
flex-algorithm.html
flex-align-baseline-expected.txt
flex-align-baseline.html
flex-align-column-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-align-column.html
flex-align-end-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-align-end.html
flex-align-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-align-max-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-align-max.html
flex-align-percent-height-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-align-percent-height.html
flex-align-stretch-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-align-stretch.html
flex-align-vertical-writing-mode-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-align-vertical-writing-mode.html
flex-align.html
flex-flow-auto-margins-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-flow-auto-margins-no-available-space-assert-expected.txt
flex-flow-auto-margins-no-available-space-assert.html Sanitize the usage of override sizes 2020-10-19 09:40:15 +00:00
flex-flow-auto-margins-no-available-space-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-flow-auto-margins-no-available-space.html
flex-flow-auto-margins.html
flex-flow-border-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-flow-border.html
flex-flow-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-flow-initial-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-flow-initial.html
flex-flow-margins-auto-size-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-flow-margins-auto-size.html
flex-flow-margins-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-flow-margins.html
flex-flow-orientations-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-flow-orientations.html
flex-flow-overflow-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-flow-overflow.html
flex-flow-padding-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-flow-padding.html
flex-flow.html
flex-item-child-overflow-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-item-child-overflow.html
flex-item-firstLine-valid-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-item-firstLine-valid.html
flex-item-text-background-not-interleaved-expected.html
flex-item-text-background-not-interleaved.html
flex-justify-content-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-justify-content.html
flex-longhand-parsing-expected.txt
flex-longhand-parsing.html
flex-no-flex-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flex-no-flex.html
flex-order-expected.html
flex-order.html
flex-percentage-height-in-table-expected.html
flex-percentage-height-in-table-standards-mode-expected.html
flex-percentage-height-in-table-standards-mode.html
flex-percentage-height-in-table.html
flex-property-parsing-expected.txt
flex-property-parsing.html
flex-rounding-expected.txt
flex-rounding.html
flexbox-baseline-margins.html
flexbox-baseline.html
flexbox-ignore-container-firstLetter-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flexbox-ignore-container-firstLetter.html
flexbox-ignore-firstLetter-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flexbox-ignore-firstLetter.html
flexbox-ignore-firstLine-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flexbox-ignore-firstLine.html
flexitem-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
flexitem.html [css-flexbox] WebKit doesn't preserve aspect ratio when computing cross size of flexed images in auto-height flex container 2020-12-01 09:21:49 +00:00
float-inside-flexitem-expected.html
float-inside-flexitem.html
floated-flexbox-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
floated-flexbox.html
image-percent-max-height-expected.html
image-percent-max-height.html
inline-flex-crash-expected.txt
inline-flex-crash.html
inline-flex-crash2-expected.txt
inline-flex-crash2.html
inline-flex-percentage-height-in-table-crash-expected.txt
inline-flex-percentage-height-in-table-crash.html
inline-flexbox-ignore-firstLine-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
inline-flexbox-ignore-firstLine.html
insert-text-crash-expected.txt
insert-text-crash.html
large-flex-shrink-assert-expected.txt
large-flex-shrink-assert.html
line-wrapping-expected.txt
line-wrapping.html
mainAxisExtent-crash-expected.txt
mainAxisExtent-crash.html
multiline-align-content-horizontal-column-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
multiline-align-content-horizontal-column.html
multiline-align-self-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
multiline-align-self.html
multiline-column-auto-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
multiline-column-auto.html
multiline-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
multiline-justify-content-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
multiline-justify-content.html
multiline-reverse-wrap-overflow-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
multiline-reverse-wrap-overflow.html
multiline.html
negative-flex-rounding-assert-expected.txt
negative-flex-rounding-assert.html
negative-margins-assert-expected.txt
negative-margins-assert.html
nested-flexbox-min-size-auto-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
nested-flexbox-min-size-auto.html
nested-stretch-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
nested-stretch.html
orthogonal-flex-directions-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
orthogonal-flex-directions.html
overflow-and-padding-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
overflow-and-padding.html
overflow-keep-scrollpos-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
overflow-keep-scrollpos.html
percentage-width-in-abspos-expected.html
perpendicular-writing-modes-inside-flex-item-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
perpendicular-writing-modes-inside-flex-item.html
position-absolute-child-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
position-absolute-child-with-contenteditable-expected.html
position-absolute-child-with-contenteditable.html
position-absolute-child.html
preferred-widths-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
preferred-widths-orthogonal-expected.txt
preferred-widths-orthogonal.html
preferred-widths.html
relpos-with-scrollable-with-abspos-crash-expected.txt
relpos-with-scrollable-with-abspos-crash.html
repaint-column-reverse-expected.txt
repaint-column-reverse.html
repaint-during-resize-no-flex-expected.txt
repaint-during-resize-no-flex.html
repaint-expected.txt
repaint-rtl-column-expected.txt
repaint-rtl-column.html
repaint.html
resize-min-content-flexbox-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
resize-min-content-flexbox.html
style-change-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
style-change.html
text-overflow-on-flexbox-expected.html
true-centering-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
true-centering.html
writing-modes-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
writing-modes.html
z-index-with-normal-flow-only-expected.html
z-index-with-normal-flow-only.html