12012-02-03 Hironori Bono <hbono@chromium.org>
2
3 Render overflow controls of an RTL element to its left-side.
4 https://bugs.webkit.org/show_bug.cgi?id=54623
5
6 This change adds a new flag WTF_USE_RTL_SCROLLBAR and render the
7 vertical scrollbars and resizers of RTL elements to their left side if
8 this new flag is enabled.
9
10 Reviewed by NOBODY (OOPS!).
11
12 Test: platform/chromium/fast/events/rtl-scrollbar.html
13
14 * rendering/RenderBlock.cpp:
15 (WebCore::RenderBlock::addOverflowFromPositionedObjects): Move child elements right.
16 (WebCore::RenderBlock::determineLogicalLeftPositionForChild): ditto.
17 * rendering/RenderBox.cpp:
18 (WebCore::RenderBox::overflowClipRect): Move the content rectangle right.
19 * rendering/RenderLayer.cpp:
20 (WebCore::cornerStart): Added a function that calculates the X position of a resizer.
21 (WebCore):
22 (WebCore::cornerRect): Use cornerStart to move a resizer.
23 (WebCore::RenderLayer::verticalScrollbarStart): Added a function that calculates
24 the X position of a horizontal scrollbar.
25 (WebCore::RenderLayer::horizontalScrollbarStart): Render a vertical scrollbar to the left side
26 and move a horizontal scrollbar right by the width of the vertical scrollbar.
27 (WebCore::RenderLayer::scrollbarOffset): ditto.
28 (WebCore::RenderLayer::invalidateScrollbarRect): ditto.
29 (WebCore::RenderLayer::positionOverflowControls): ditto.
30 (WebCore::RenderLayer::hitTestOverflowControls): ditto.
31 * rendering/RenderLayer.h:
32 (RenderLayer):
33 * rendering/style/RenderStyle.h: Added shouldPlaceBlockDirectionScrollbarOnLogicalLeft,
34 which returns if we need to move a left scrollbar to its right side.
35