| Differences between
and this patch
- Source/WebCore/ChangeLog +18 lines
Lines 1-3 Source/WebCore/ChangeLog_sec1
1
2012-05-25  Hironori Bono  <hbono@chromium.org>
2
3
        Move contents left when a vertical scrollbar is shown at the left side of an RTL element.
4
        https://bugs.webkit.org/show_bug.cgi?id=85856
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        When a vertical scrollbar is shown at the left side of an RTL element, this
9
        change increases the clientLeft value by the width of the scrollbar as written
10
        in <http://www.w3.org/TR/cssom-view> and move contents left.
11
12
        Test: scrollbars/rtl/rtl-div.html
13
14
        * rendering/RenderBlock.cpp:
15
        (WebCore::RenderBlock::paintObject): Move contents left when a vertical scrollbar is shown at the left side.
16
        * rendering/RenderBox.h:
17
        (WebCore::RenderBox::clientLeft): Add the width of the vertical scrollbar when it is shown at the left side.
18
1
2012-05-25  Jan Keromnes  <janx@linux.com>
19
2012-05-25  Jan Keromnes  <janx@linux.com>
2
20
3
        Web Inspector: Resource object has no methods getContent and setContent
21
        Web Inspector: Resource object has no methods getContent and setContent
- Source/WebCore/rendering/RenderBlock.cpp -1 / +4 lines
Lines 2884-2891 void RenderBlock::paintObject(PaintInfo& Source/WebCore/rendering/RenderBlock.cpp_sec1
2884
2884
2885
    // Adjust our painting position if we're inside a scrolled layer (e.g., an overflow:auto div).
2885
    // Adjust our painting position if we're inside a scrolled layer (e.g., an overflow:auto div).
2886
    LayoutPoint scrolledOffset = paintOffset;
2886
    LayoutPoint scrolledOffset = paintOffset;
2887
    if (hasOverflowClip())
2887
    if (hasOverflowClip()) {
2888
        scrolledOffset.move(-scrolledContentOffset());
2888
        scrolledOffset.move(-scrolledContentOffset());
2889
        if (style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
2890
            scrolledOffset.move(verticalScrollbarWidth(), 0);
2891
    }
2889
2892
2890
    // 2. paint contents
2893
    // 2. paint contents
2891
    if (paintPhase != PaintPhaseSelfOutline) {
2894
    if (paintPhase != PaintPhaseSelfOutline) {
- Source/WebCore/rendering/RenderBox.h -1 / +1 lines
Lines 197-203 public: Source/WebCore/rendering/RenderBox.h_sec1
197
197
198
    // More IE extensions.  clientWidth and clientHeight represent the interior of an object
198
    // More IE extensions.  clientWidth and clientHeight represent the interior of an object
199
    // excluding border and scrollbar.  clientLeft/Top are just the borderLeftWidth and borderTopWidth.
199
    // excluding border and scrollbar.  clientLeft/Top are just the borderLeftWidth and borderTopWidth.
200
    LayoutUnit clientLeft() const { return borderLeft(); }
200
    LayoutUnit clientLeft() const { return borderLeft() + (style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft() ? verticalScrollbarWidth() : 0); }
201
    LayoutUnit clientTop() const { return borderTop(); }
201
    LayoutUnit clientTop() const { return borderTop(); }
202
    LayoutUnit clientWidth() const;
202
    LayoutUnit clientWidth() const;
203
    LayoutUnit clientHeight() const;
203
    LayoutUnit clientHeight() const;
- LayoutTests/ChangeLog +15 lines
Lines 1-3 LayoutTests/ChangeLog_sec1
1
2012-05-25  Hironori Bono  <hbono@chromium.org>
2
3
        Move contents left when a vertical scrollbar is shown at the left side of an RTL element.
4
        https://bugs.webkit.org/show_bug.cgi?id=85856
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        When a vertical scrollbar is shown at the left side of an RTL element, this
9
        change increases the clientLeft value by the width of the scrollbar as written
10
        in <http://www.w3.org/TR/cssom-view> and move contents left.
11
12
        * scrollbars/rtl: Added.
13
        * scrollbars/rtl/rtl-div-expected.html: Added.
14
        * scrollbars/rtl/rtl-div.html: Added.
15
1
2012-05-25  Jan Keromnes  <janx@linux.com>
16
2012-05-25  Jan Keromnes  <janx@linux.com>
2
17
3
        Web Inspector: Resource object has no methods getContent and setContent
18
        Web Inspector: Resource object has no methods getContent and setContent
- LayoutTests/scrollbars/rtl/rtl-div-expected.html +21 lines
Line 0 LayoutTests/scrollbars/rtl/rtl-div-expected.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<title>Bug 85856 (expected result)</title>
5
<script type="text/javascript">
6
function onLoad() {
7
    document.getElementById('overflow').scrollLeft = 0;
8
    document.getElementById('content').style.left = document.getElementById('overflow').clientLeft + 'px';
9
}
10
</script>
11
<style  type="text/css">
12
::-webkit-scrollbar { width: 10px; }
13
</style>
14
</head>
15
<body dir="ltr" onload="onLoad()">
16
<p>This tests that we can see the left edge of an RTL element regardless of the position of its vertical scrollbar. If this test succeeds, we can see a red line and a black line below.</p>
17
<div dir="rtl" id="overflow" style="width: 200px; height: 200px; overflow: scroll;">
18
<div style="text-align: left; width: 300px; height: 300px; border-left: 1px solid red;"><span id="content" style="position: relative; width: 30px; height: 10px; border: 1px solid black;"></span></div>
19
</div>
20
</body>
21
</html>
- LayoutTests/scrollbars/rtl/rtl-div.html +20 lines
Line 0 LayoutTests/scrollbars/rtl/rtl-div.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<title>Bug 85856</title>
5
<script type="text/javascript">
6
function onLoad() {
7
    document.getElementById('overflow').scrollLeft = 0;
8
}
9
</script>
10
<style  type="text/css">
11
::-webkit-scrollbar { width: 10px; }
12
</style>
13
</head>
14
<body dir="ltr" onload="onLoad()">
15
<p>This tests that we can see the left edge of an RTL element regardless of the position of its vertical scrollbar. If this test succeeds, we can see a red line and a black line below.</p>
16
<div dir="rtl" id="overflow" style="width: 200px; height: 200px; overflow: scroll;">
17
<div style="text-align: left; width: 300px; height: 300px; border-left: 1px solid red;"><span id="content" style="width: 30px; height: 10px; border: 1px solid black;"></span></div>
18
</div>
19
</body>
20
</html>

Return to Bug 85856