OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1625 | 1625 |
1626 breadth = end - start; | 1626 breadth = end - start; |
1627 offset = start; | 1627 offset = start; |
1628 | 1628 |
1629 if (isForColumns && !styleRef().isLeftToRightDirection() && !child.styleRef(
).hasStaticInlinePosition(child.isHorizontalWritingMode())) { | 1629 if (isForColumns && !styleRef().isLeftToRightDirection() && !child.styleRef(
).hasStaticInlinePosition(child.isHorizontalWritingMode())) { |
1630 // If the child doesn't have a static inline position (i.e. "left" and/o
r "right" aren't "auto", | 1630 // If the child doesn't have a static inline position (i.e. "left" and/o
r "right" aren't "auto", |
1631 // we need to calculate the offset from the left (even if we're in RTL). | 1631 // we need to calculate the offset from the left (even if we're in RTL). |
1632 if (endIsAuto) { | 1632 if (endIsAuto) { |
1633 offset = LayoutUnit(); | 1633 offset = LayoutUnit(); |
1634 } else { | 1634 } else { |
1635 offset = translateRTLCoordinate(m_columnPositions[endLine]) - border
Left(); | 1635 offset = translateRTLCoordinate(m_columnPositions[endLine]) - border
LogicalLeft(); |
1636 | 1636 |
1637 if (endLine > firstExplicitLine && endLine < lastExplicitLine) { | 1637 if (endLine > firstExplicitLine && endLine < lastExplicitLine) { |
1638 offset += guttersSize(direction, 2); | 1638 offset += guttersSize(direction, 2); |
1639 offset += isForColumns ? m_offsetBetweenColumns : m_offsetBetwee
nRows; | 1639 offset += isForColumns ? m_offsetBetweenColumns : m_offsetBetwee
nRows; |
1640 } | 1640 } |
1641 } | 1641 } |
1642 } | 1642 } |
1643 | 1643 |
1644 if (child.parent() == this && !startIsAuto) { | 1644 if (child.parent() == this && !startIsAuto) { |
1645 // If column/row start is "auto" the static position has been already se
t in prepareChildForPositionedLayout(). | 1645 // If column/row start is "auto" the static position has been already se
t in prepareChildForPositionedLayout(). |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2142 | 2142 |
2143 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData
)); | 2143 return LayoutPoint(rowAxisOffset, columnAxisOffsetForChild(child, sizingData
)); |
2144 } | 2144 } |
2145 | 2145 |
2146 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const | 2146 void LayoutGrid::paintChildren(const PaintInfo& paintInfo, const LayoutPoint& pa
intOffset) const |
2147 { | 2147 { |
2148 GridPainter(*this).paintChildren(paintInfo, paintOffset); | 2148 GridPainter(*this).paintChildren(paintInfo, paintOffset); |
2149 } | 2149 } |
2150 | 2150 |
2151 } // namespace blink | 2151 } // namespace blink |
OLD | NEW |