Changeset 189806 in webkit
- Timestamp:
- Sep 15, 2015 7:48:41 AM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r189776 r189806 1 2015-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 1 21 2015-09-14 Gyuyoung Kim <gyuyoung.kim@webkit.org> 2 22 -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r189702 r189806 1527 1527 } 1528 1528 1529 LayoutUnit RenderGrid:: rowPositionForChild(const RenderBox& child) const1529 LayoutUnit RenderGrid::columnAxisOffsetForChild(const RenderBox& child) const 1530 1530 { 1531 1531 const GridCoordinate& coordinate = cachedGridCoordinate(child); … … 1551 1551 1552 1552 1553 LayoutUnit RenderGrid:: columnPositionForChild(const RenderBox& child) const1553 LayoutUnit RenderGrid::rowAxisOffsetForChild(const RenderBox& child) const 1554 1554 { 1555 1555 const GridCoordinate& coordinate = cachedGridCoordinate(child); … … 1576 1576 LayoutPoint RenderGrid::findChildLogicalPosition(const RenderBox& child) const 1577 1577 { 1578 LayoutUnit columnPosition = columnPositionForChild(child);1578 LayoutUnit rowAxisOffset = rowAxisOffsetForChild(child); 1579 1579 // We stored m_columnPositions's data ignoring the direction, hence we might need now 1580 1580 // 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 } 1583 1586 1584 1587 // 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)); 1586 1589 } 1587 1590 -
trunk/Source/WebCore/rendering/RenderGrid.h
r189169 r189806 121 121 GridAxisPosition columnAxisPositionForChild(const RenderBox&) const; 122 122 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; 125 125 LayoutPoint findChildLogicalPosition(const RenderBox&) const; 126 126 GridCoordinate cachedGridCoordinate(const RenderBox&) const;
Note: See TracChangeset
for help on using the changeset viewer.