Changeset 199874 in webkit


Ignore:
Timestamp:
Apr 22, 2016 12:54:22 AM (8 years ago)
Author:
Manuel Rego Casasnovas
Message:

[css-grid] Fix bug with positioned items in vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=156870

Reviewed by Darin Adler.

Source/WebCore:

In RenderGrid::offsetAndBreadthForPositionedChild() we were using
directly borderLeft(), which is wrong in vertical writing modes.

To fix it we just need to use borderLogicalLeft() which is aware of
the current writing mode.

Test: fast/css-grid-layout/grid-positioned-children-writing-modes.html

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):

LayoutTests:

Add new test to check positioned items in different writing modes
and direction combinations.

  • fast/css-grid-layout/grid-positioned-children-writing-modes-expected.html: Added.
  • fast/css-grid-layout/grid-positioned-children-writing-modes.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r199871 r199874  
     12016-04-22  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        [css-grid] Fix bug with positioned items in vertical writing mode
     4        https://bugs.webkit.org/show_bug.cgi?id=156870
     5
     6        Reviewed by Darin Adler.
     7
     8        Add new test to check positioned items in different writing modes
     9        and direction combinations.
     10
     11        * fast/css-grid-layout/grid-positioned-children-writing-modes-expected.html: Added.
     12        * fast/css-grid-layout/grid-positioned-children-writing-modes.html: Added.
     13
    1142016-04-21  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r199872 r199874  
     12016-04-22  Manuel Rego Casasnovas  <rego@igalia.com>
     2
     3        [css-grid] Fix bug with positioned items in vertical writing mode
     4        https://bugs.webkit.org/show_bug.cgi?id=156870
     5
     6        Reviewed by Darin Adler.
     7
     8        In RenderGrid::offsetAndBreadthForPositionedChild() we were using
     9        directly borderLeft(), which is wrong in vertical writing modes.
     10
     11        To fix it we just need to use borderLogicalLeft() which is aware of
     12        the current writing mode.
     13
     14        Test: fast/css-grid-layout/grid-positioned-children-writing-modes.html
     15
     16        * rendering/RenderGrid.cpp:
     17        (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
     18
    1192016-04-21  Zan Dobersek  <zdobersek@igalia.com>
    220
  • trunk/Source/WebCore/rendering/RenderGrid.cpp

    r199728 r199874  
    15841584            offset = LayoutUnit();
    15851585        else {
    1586             offset = translateRTLCoordinate(m_columnPositions[endLine]) - borderLeft();
     1586            offset = translateRTLCoordinate(m_columnPositions[endLine]) - borderLogicalLeft();
    15871587
    15881588            if (endLine > firstExplicitLine && endLine < lastExplicitLine) {
Note: See TracChangeset for help on using the changeset viewer.