Changeset 189806 in webkit


Ignore:
Timestamp:
Sep 15, 2015 7:48:41 AM (9 years ago)
Author:
jfernandez@igalia.com
Message:

[CSS Grid Layout] Using {row, column}-axis terms in alignment related logic
https://bugs.webkit.org/show_bug.cgi?id=148942

Reviewed by Sergio Villar Senin.

This patch changes the names of several functions and variables
defined to implement the alignment logic. We want to use from now
on the terms row-axis and column-axis when referring to the
alignment direction the logic is applied to.

No new tests, no new functionality.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::RenderGrid::findChildLogicalPosition):

  • rendering/RenderGrid.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r189776 r189806  
     12015-09-15  Javier Fernandez  <jfernandez@igalia.com>
     2
     3        [CSS Grid Layout] Using {row, column}-axis terms in alignment related logic
     4        https://bugs.webkit.org/show_bug.cgi?id=148942
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        This patch changes the names of several functions and variables
     9        defined to implement the alignment logic. We want to use from now
     10        on the terms row-axis and column-axis when referring to the
     11        alignment direction the logic is applied to.
     12
     13        No new tests, no new functionality.
     14
     15        * rendering/RenderGrid.cpp:
     16        (WebCore::RenderGrid::columnAxisOffsetForChild):
     17        (WebCore::RenderGrid::rowAxisOffsetForChild):
     18        (WebCore::RenderGrid::findChildLogicalPosition):
     19        * rendering/RenderGrid.h:
     20
    1212015-09-14  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
    222
  • trunk/Source/WebCore/rendering/RenderGrid.cpp

    r189702 r189806  
    15271527}
    15281528
    1529 LayoutUnit RenderGrid::rowPositionForChild(const RenderBox& child) const
     1529LayoutUnit RenderGrid::columnAxisOffsetForChild(const RenderBox& child) const
    15301530{
    15311531    const GridCoordinate& coordinate = cachedGridCoordinate(child);
     
    15511551
    15521552
    1553 LayoutUnit RenderGrid::columnPositionForChild(const RenderBox& child) const
     1553LayoutUnit RenderGrid::rowAxisOffsetForChild(const RenderBox& child) const
    15541554{
    15551555    const GridCoordinate& coordinate = cachedGridCoordinate(child);
     
    15761576LayoutPoint RenderGrid::findChildLogicalPosition(const RenderBox& child) const
    15771577{
    1578     LayoutUnit columnPosition = columnPositionForChild(child);
     1578    LayoutUnit rowAxisOffset = rowAxisOffsetForChild(child);
    15791579    // We stored m_columnPositions's data ignoring the direction, hence we might need now
    15801580    // to translate positions from RTL to LTR, as it's more convenient for painting.
    1581     if (!style().isLeftToRightDirection())
    1582         columnPosition = (m_columnPositions[m_columnPositions.size() - 1] + borderAndPaddingLogicalLeft()) - columnPosition  - child.logicalWidth();
     1581    if (!style().isLeftToRightDirection()) {
     1582        LayoutUnit alignmentOffset =  m_columnPositions[0] - borderAndPaddingStart();
     1583        LayoutUnit rightGridEdgePosition = m_columnPositions[m_columnPositions.size() - 1] + alignmentOffset + borderAndPaddingLogicalLeft();
     1584        rowAxisOffset = rightGridEdgePosition - (rowAxisOffset + child.logicalWidth());
     1585    }
    15831586
    15841587    // The grid items should be inside the grid container's border box, that's why they need to be shifted.
    1585     return LayoutPoint(columnPosition, rowPositionForChild(child));
     1588    return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child));
    15861589}
    15871590
  • trunk/Source/WebCore/rendering/RenderGrid.h

    r189169 r189806  
    121121    GridAxisPosition columnAxisPositionForChild(const RenderBox&) const;
    122122    GridAxisPosition rowAxisPositionForChild(const RenderBox&) const;
    123     LayoutUnit rowPositionForChild(const RenderBox&) const;
    124     LayoutUnit columnPositionForChild(const RenderBox&) const;
     123    LayoutUnit columnAxisOffsetForChild(const RenderBox&) const;
     124    LayoutUnit rowAxisOffsetForChild(const RenderBox&) const;
    125125    LayoutPoint findChildLogicalPosition(const RenderBox&) const;
    126126    GridCoordinate cachedGridCoordinate(const RenderBox&) const;
Note: See TracChangeset for help on using the changeset viewer.