[RTL Scrollbars] Position: absolute divs are covered by vertical scrollbar
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Mar 2016 22:15:45 +0000 (22:15 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Mar 2016 22:15:45 +0000 (22:15 +0000)
commitfc2046c6c8b9f289daf356a0f196b2ec4b2f4ead
tree23f84fca9961c9b0460cdc5e595030ae99c7bcf3
parente8b0980fc4a21e8ce274eb83a23821e522637ed3
[RTL Scrollbars] Position: absolute divs are covered by vertical scrollbar
https://bugs.webkit.org/show_bug.cgi?id=155533

Reviewed by Darin Adler.

Source/WebCore:

This patch changes the behavior of position: absolute elements when their
containing block has overflow: scroll in RTL scrollbar mode. Previously, we
were only adjusting the overflow calculation for such elements (but not
their position calculation). This patch updates the position calculation,
which automatically makes the overflow calculation work propertly, so the
old calculation is no longer necessary.

This patch also updates iframes to appropriately move their dirty rects
and their painting CTM by the scrollbar width when traversing frame
boundaries. This fixes all our existing RTL scrollbar RTL tests.

The RTL scrollbar tests are only marked as passing on certain OSes, so these
tests are transitioning from failing to passing in that other repository.

Test: fast/scrolling/rtl-scrollbars-positioning.html
      fast/scrolling/rtl-scrollbars-overflow-elementFromPoint.html
      fast/scrolling/rtl-scrollbars-overflow-position-absolute.html
      fast/scrolling/rtl-scrollbars-iframe-offset.html
      fast/scrolling/rtl-scrollbars-iframe-position-absolute.html
      fast/scrolling/rtl-scrollbars-iframe-scrolled.html
      fast/scrolling/rtl-scrollbars-iframe.html

* platform/ScrollView.cpp:
(WebCore::ScrollView::paint):
(WebCore::ScrollView::locationOfContents):
* platform/ScrollView.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::repaintLayerDirtyRects):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addOverflowFromPositionedObjects):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePositionedLogicalWidth):
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewRectangle):

LayoutTests:

* TestExpectations:
* fast/scrolling/rtl-scrollbars-positioning-expected.html: Added.
* fast/scrolling/rtl-scrollbars-positioning.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/scrolling/rtl-scrollbars-positioning-expected.html [new file with mode: 0644]
LayoutTests/fast/scrolling/rtl-scrollbars-positioning.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/ScrollView.h
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderView.cpp