Changeset 200261 in webkit


Ignore:
Timestamp:
Apr 29, 2016 1:33:48 PM (8 years ago)
Author:
mmaxfield@apple.com
Message:

[RTL Scrollbars] REGRESSION(r200116): Positioned contents can overlap RTL scrollbars
https://bugs.webkit.org/show_bug.cgi?id=157164
<rdar://problem/25993610>

Reviewed by Darin Adler.

Source/WebCore:

There was some code left over from the old implementation of RTL_SCROLLBARS
which had some faulty assumptions about the interaction between direction
and scrollbar placement. In particular, once we began obeying the "dir"
attribute in r200116, these assumptions were no longer valid.

Test: fast/scrolling/rtl-scrollbars-positioned-intersect-scrollbars.html

scrollbars/rtl/div-absolute.html
scrollbars/rtl/div-horizontal.html

  • rendering/InlineFlowBox.h:

(WebCore::InlineFlowBox::layoutOverflowRect):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::computeOverflow): Deleted.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::layoutOverflowRectForPropagation):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::computeScrollDimensions):

LayoutTests:

  • TestExpectations:
  • fast/scrolling/rtl-scrollbars-positioned-intersect-scrollbars-expected.html: Added.
  • fast/scrolling/rtl-scrollbars-positioned-intersect-scrollbars.html: Added.
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r200260 r200261  
     12016-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        [RTL Scrollbars] REGRESSION(r200116): Positioned contents can overlap RTL scrollbars
     4        https://bugs.webkit.org/show_bug.cgi?id=157164
     5        <rdar://problem/25993610>
     6
     7        Reviewed by Darin Adler.
     8
     9        * TestExpectations:
     10        * fast/scrolling/rtl-scrollbars-positioned-intersect-scrollbars-expected.html: Added.
     11        * fast/scrolling/rtl-scrollbars-positioned-intersect-scrollbars.html: Added.
     12
    1132016-04-29  Joanmarie Diggs  <jdiggs@igalia.com>
    214
  • trunk/LayoutTests/TestExpectations

    r200204 r200261  
    990990fast/scrolling/rtl-scrollbars-listbox-simple.html [ ImageOnlyFailure ]
    991991fast/scrolling/rtl-scrollbars-listbox.html [ ImageOnlyFailure ]
     992fast/scrolling/rtl-scrollbars-positioned-intersect-scrollbars.html [ ImageOnlyFailure ]
    992993
    993994# <a download> does not support Blobs
  • trunk/Source/WebCore/ChangeLog

    r200258 r200261  
     12016-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        [RTL Scrollbars] REGRESSION(r200116): Positioned contents can overlap RTL scrollbars
     4        https://bugs.webkit.org/show_bug.cgi?id=157164
     5        <rdar://problem/25993610>
     6
     7        Reviewed by Darin Adler.
     8
     9        There was some code left over from the old implementation of RTL_SCROLLBARS
     10        which had some faulty assumptions about the interaction between direction
     11        and scrollbar placement. In particular, once we began obeying the "dir"
     12        attribute in r200116, these assumptions were no longer valid.
     13
     14        Test: fast/scrolling/rtl-scrollbars-positioned-intersect-scrollbars.html
     15              scrollbars/rtl/div-absolute.html
     16              scrollbars/rtl/div-horizontal.html
     17
     18        * rendering/InlineFlowBox.h:
     19        (WebCore::InlineFlowBox::layoutOverflowRect):
     20        * rendering/RenderBlock.cpp:
     21        (WebCore::RenderBlock::computeOverflow): Deleted.
     22        * rendering/RenderBox.cpp:
     23        (WebCore::RenderBox::layoutOverflowRectForPropagation):
     24        * rendering/RenderLayer.cpp:
     25        (WebCore::RenderLayer::computeScrollDimensions):
     26
    1272016-04-29  Nan Wang  <n_wang@apple.com>
    228
  • trunk/Source/WebCore/rendering/InlineFlowBox.h

    r197566 r200261  
    224224    // respectively are flipped when compared to their physical counterparts.  For example minX is on the left in vertical-lr, but it is on the right in vertical-rl.
    225225    LayoutRect layoutOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const
    226     { 
     226    {
    227227        return m_overflow ? m_overflow->layoutOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
    228228    }
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r200116 r200261  
    10011001}
    10021002
     1003// Overflow is always relative to the border-box of the element in question.
     1004// Therefore, if the element has a vertical scrollbar placed on the left, an overflow rect at x=2px would conceptually intersect the scrollbar.
    10031005void RenderBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool)
    10041006{
    10051007    clearOverflow();
    1006     // Add overflow from children.
    10071008    addOverflowFromChildren();
    10081009
    1009     // Add in the overflow from positioned objects.
    10101010    addOverflowFromPositionedObjects();
    10111011
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r200220 r200261  
    49044904    // Subtract space occupied by scrollbars. They are at their physical edge in this coordinate
    49054905    // system, so order is important here: first flip, then subtract scrollbars.
    4906     if (shouldPlaceBlockDirectionScrollbarOnLeft() && style().isLeftToRightDirection())
     4906    if (shouldPlaceBlockDirectionScrollbarOnLeft())
    49074907        rect.move(verticalScrollbarWidth(), 0);
    49084908    rect.contract(verticalScrollbarWidth(), horizontalScrollbarHeight());
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r200216 r200261  
    33813381
    33823382    int scrollableLeftOverflow = overflowLeft() - box->borderLeft();
    3383     if (box->style().isLeftToRightDirection() && box->shouldPlaceBlockDirectionScrollbarOnLeft() && m_vBar)
    3384         scrollableLeftOverflow -= m_vBar->occupiedWidth();
     3383    if (shouldPlaceBlockDirectionScrollbarOnLeft())
     3384        scrollableLeftOverflow -= verticalScrollbarWidth();
    33853385    int scrollableTopOverflow = overflowTop() - box->borderTop();
    33863386    setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow));
Note: See TracChangeset for help on using the changeset viewer.