Skip to content
Commit 49710b19 authored by hbono@chromium.org's avatar hbono@chromium.org
Browse files

Move contents right when a vertical scrollbar is shown at the left side of an RTL element.

https://bugs.webkit.org/show_bug.cgi?id=85856

Reviewed by Hajime Morita.

Source/WebCore:

This change prevents the scrollWidth value from being cropped by the width of a
scrollbar when a vertical scrollbar is shown at the left side of an RTL element.
This change also increases the clientLeft value by this scrollbar width and move
contents right to improve compliance with CSSOM <http://www.w3.org/TR/cssom-view>.

Tests: scrollbars/rtl/div-horizontal.html
       scrollbars/rtl/div-vertical.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject): Move contents to the right.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::topLeftLocationOffset): Move the top-left corner to the right to prevent WebKit from cropping scrollWidth.
* rendering/RenderBox.h:
(WebCore::RenderBox::clientLeft): Increase clientLeft by the width of a scrollbar.

LayoutTests:

This changes adds a couple of tests that verify CSSOM properties of RTL elements
are compliant with <http://www.w3.org/TR/cssom-view> regardless of their
scrollbar positions.

* platform/chromium/TestExpectations:
* scrollbars/rtl: Added.
* scrollbars/rtl/div-horizontal-expected.txt: Added.
* scrollbars/rtl/div-horizontal.html: Added.
* scrollbars/rtl/div-vertical-expected.txt: Added.
* scrollbars/rtl/div-vertical.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 79ff7c25
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment