| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 } | 721 } |
| 722 lineBottom = max<LayoutUnit>(lineBottom, pixelSnappedLogicalBottom()
); | 722 lineBottom = max<LayoutUnit>(lineBottom, pixelSnappedLogicalBottom()
); |
| 723 lineBottomIncludingMargins = max(lineBottom, lineBottomIncludingMarg
ins); | 723 lineBottomIncludingMargins = max(lineBottom, lineBottomIncludingMarg
ins); |
| 724 } | 724 } |
| 725 | 725 |
| 726 if (renderer()->style()->isFlippedLinesWritingMode()) | 726 if (renderer()->style()->isFlippedLinesWritingMode()) |
| 727 flipLinesInBlockDirection(lineTopIncludingMargins, lineBottomIncludi
ngMargins); | 727 flipLinesInBlockDirection(lineTopIncludingMargins, lineBottomIncludi
ngMargins); |
| 728 } | 728 } |
| 729 } | 729 } |
| 730 | 730 |
| 731 #if ENABLE(CSS3_TEXT) | |
| 732 void InlineFlowBox::computeMaxLogicalTop(float& maxLogicalTop) const | 731 void InlineFlowBox::computeMaxLogicalTop(float& maxLogicalTop) const |
| 733 { | 732 { |
| 734 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { | 733 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { |
| 735 if (curr->renderer()->isOutOfFlowPositioned()) | 734 if (curr->renderer()->isOutOfFlowPositioned()) |
| 736 continue; // Positioned placeholders don't affect calculations. | 735 continue; // Positioned placeholders don't affect calculations. |
| 737 | 736 |
| 738 if (descendantsHaveSameLineHeightAndBaseline()) | 737 if (descendantsHaveSameLineHeightAndBaseline()) |
| 739 continue; | 738 continue; |
| 740 | 739 |
| 741 maxLogicalTop = max<float>(maxLogicalTop, curr->y()); | 740 maxLogicalTop = max<float>(maxLogicalTop, curr->y()); |
| 742 float localMaxLogicalTop = 0; | 741 float localMaxLogicalTop = 0; |
| 743 if (curr->isInlineFlowBox()) | 742 if (curr->isInlineFlowBox()) |
| 744 toInlineFlowBox(curr)->computeMaxLogicalTop(localMaxLogicalTop); | 743 toInlineFlowBox(curr)->computeMaxLogicalTop(localMaxLogicalTop); |
| 745 maxLogicalTop = max<float>(maxLogicalTop, localMaxLogicalTop); | 744 maxLogicalTop = max<float>(maxLogicalTop, localMaxLogicalTop); |
| 746 } | 745 } |
| 747 } | 746 } |
| 748 #endif // CSS3_TEXT | |
| 749 | 747 |
| 750 void InlineFlowBox::flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lin
eBottom) | 748 void InlineFlowBox::flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lin
eBottom) |
| 751 { | 749 { |
| 752 // Flip the box on the line such that the top is now relative to the lineBot
tom instead of the lineTop. | 750 // Flip the box on the line such that the top is now relative to the lineBot
tom instead of the lineTop. |
| 753 setLogicalTop(lineBottom - (logicalTop() - lineTop) - logicalHeight()); | 751 setLogicalTop(lineBottom - (logicalTop() - lineTop) - logicalHeight()); |
| 754 | 752 |
| 755 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { | 753 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { |
| 756 if (curr->renderer()->isOutOfFlowPositioned()) | 754 if (curr->renderer()->isOutOfFlowPositioned()) |
| 757 continue; // Positioned placeholders aren't affected here. | 755 continue; // Positioned placeholders aren't affected here. |
| 758 | 756 |
| (...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1636 ASSERT(child->prevOnLine() == prev); | 1634 ASSERT(child->prevOnLine() == prev); |
| 1637 prev = child; | 1635 prev = child; |
| 1638 } | 1636 } |
| 1639 ASSERT(prev == m_lastChild); | 1637 ASSERT(prev == m_lastChild); |
| 1640 #endif | 1638 #endif |
| 1641 } | 1639 } |
| 1642 | 1640 |
| 1643 #endif | 1641 #endif |
| 1644 | 1642 |
| 1645 } // namespace WebCore | 1643 } // namespace WebCore |
| OLD | NEW |