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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 | 647 |
648 LayoutUnit newLogicalTop = curr->logicalTop(); | 648 LayoutUnit newLogicalTop = curr->logicalTop(); |
649 LayoutUnit newLogicalTopIncludingMargins = newLogicalTop; | 649 LayoutUnit newLogicalTopIncludingMargins = newLogicalTop; |
650 LayoutUnit boxHeight = curr->logicalHeight(); | 650 LayoutUnit boxHeight = curr->logicalHeight(); |
651 LayoutUnit boxHeightIncludingMargins = boxHeight; | 651 LayoutUnit boxHeightIncludingMargins = boxHeight; |
652 LayoutUnit borderPaddingHeight = 0; | 652 LayoutUnit borderPaddingHeight = 0; |
653 if (curr->isText() || curr->isInlineFlowBox()) { | 653 if (curr->isText() || curr->isInlineFlowBox()) { |
654 const FontMetrics& fontMetrics = curr->renderer().style(isFirstLineS
tyle())->fontMetrics(); | 654 const FontMetrics& fontMetrics = curr->renderer().style(isFirstLineS
tyle())->fontMetrics(); |
655 newLogicalTop += curr->baselinePosition(baselineType) - fontMetrics.
ascent(baselineType); | 655 newLogicalTop += curr->baselinePosition(baselineType) - fontMetrics.
ascent(baselineType); |
656 if (curr->isInlineFlowBox()) { | 656 if (curr->isInlineFlowBox()) { |
657 RenderBoxModelObject& boxObject = toRenderBoxModelObject(curr->r
enderer()); | 657 LayoutBoxModelObject& boxObject = toLayoutBoxModelObject(curr->r
enderer()); |
658 newLogicalTop -= boxObject.style(isFirstLineStyle())->isHorizont
alWritingMode() ? boxObject.borderTop() + boxObject.paddingTop() : | 658 newLogicalTop -= boxObject.style(isFirstLineStyle())->isHorizont
alWritingMode() ? boxObject.borderTop() + boxObject.paddingTop() : |
659 boxObject.borderRight() + boxObject.paddingRight(); | 659 boxObject.borderRight() + boxObject.paddingRight(); |
660 borderPaddingHeight = boxObject.borderAndPaddingLogicalHeight(); | 660 borderPaddingHeight = boxObject.borderAndPaddingLogicalHeight(); |
661 } | 661 } |
662 newLogicalTopIncludingMargins = newLogicalTop; | 662 newLogicalTopIncludingMargins = newLogicalTop; |
663 } else if (!curr->renderer().isBR()) { | 663 } else if (!curr->renderer().isBR()) { |
664 RenderBox& box = toRenderBox(curr->renderer()); | 664 RenderBox& box = toRenderBox(curr->renderer()); |
665 newLogicalTopIncludingMargins = newLogicalTop; | 665 newLogicalTopIncludingMargins = newLogicalTop; |
666 LayoutUnit overSideMargin = curr->isHorizontal() ? box.marginTop() :
box.marginRight(); | 666 LayoutUnit overSideMargin = curr->isHorizontal() ? box.marginTop() :
box.marginRight(); |
667 LayoutUnit underSideMargin = curr->isHorizontal() ? box.marginBottom
() : box.marginLeft(); | 667 LayoutUnit underSideMargin = curr->isHorizontal() ? box.marginBottom
() : box.marginLeft(); |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 ASSERT(child->prevOnLine() == prev); | 1333 ASSERT(child->prevOnLine() == prev); |
1334 prev = child; | 1334 prev = child; |
1335 } | 1335 } |
1336 ASSERT(prev == m_lastChild); | 1336 ASSERT(prev == m_lastChild); |
1337 #endif | 1337 #endif |
1338 } | 1338 } |
1339 | 1339 |
1340 #endif | 1340 #endif |
1341 | 1341 |
1342 } // namespace blink | 1342 } // namespace blink |
OLD | NEW |