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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 | 617 |
618 LayoutUnit newLogicalTop = curr->logicalTop(); | 618 LayoutUnit newLogicalTop = curr->logicalTop(); |
619 LayoutUnit newLogicalTopIncludingMargins = newLogicalTop; | 619 LayoutUnit newLogicalTopIncludingMargins = newLogicalTop; |
620 LayoutUnit boxHeight = curr->logicalHeight(); | 620 LayoutUnit boxHeight = curr->logicalHeight(); |
621 LayoutUnit boxHeightIncludingMargins = boxHeight; | 621 LayoutUnit boxHeightIncludingMargins = boxHeight; |
622 LayoutUnit borderPaddingHeight = 0; | 622 LayoutUnit borderPaddingHeight = 0; |
623 if (curr->isText() || curr->isInlineFlowBox()) { | 623 if (curr->isText() || curr->isInlineFlowBox()) { |
624 const FontMetrics& fontMetrics = curr->layoutObject().style(isFirstL
ineStyle())->fontMetrics(); | 624 const FontMetrics& fontMetrics = curr->layoutObject().style(isFirstL
ineStyle())->fontMetrics(); |
625 newLogicalTop += curr->baselinePosition(baselineType) - fontMetrics.
ascent(baselineType); | 625 newLogicalTop += curr->baselinePosition(baselineType) - fontMetrics.
ascent(baselineType); |
626 if (curr->isInlineFlowBox()) { | 626 if (curr->isInlineFlowBox()) { |
627 LayoutBoxModelObject& boxObject = toLayoutBoxModelObject(curr->l
ayoutObject()); | 627 LineLayoutBoxModel boxObject = LineLayoutBoxModel(curr->lineLayo
utItem()); |
628 newLogicalTop -= boxObject.style(isFirstLineStyle())->isHorizont
alWritingMode() ? boxObject.borderTop() + boxObject.paddingTop() : | 628 newLogicalTop -= boxObject.style(isFirstLineStyle())->isHorizont
alWritingMode() ? boxObject.borderTop() + boxObject.paddingTop() : |
629 boxObject.borderRight() + boxObject.paddingRight(); | 629 boxObject.borderRight() + boxObject.paddingRight(); |
630 borderPaddingHeight = boxObject.borderAndPaddingLogicalHeight(); | 630 borderPaddingHeight = boxObject.borderAndPaddingLogicalHeight(); |
631 } | 631 } |
632 newLogicalTopIncludingMargins = newLogicalTop; | 632 newLogicalTopIncludingMargins = newLogicalTop; |
633 } else if (!curr->layoutObject().isBR()) { | 633 } else if (!curr->layoutObject().isBR()) { |
634 LineLayoutBox box = LineLayoutBox(curr->lineLayoutItem()); | 634 LineLayoutBox box = LineLayoutBox(curr->lineLayoutItem()); |
635 newLogicalTopIncludingMargins = newLogicalTop; | 635 newLogicalTopIncludingMargins = newLogicalTop; |
636 LayoutUnit overSideMargin = curr->isHorizontal() ? box.marginTop() :
box.marginRight(); | 636 LayoutUnit overSideMargin = curr->isHorizontal() ? box.marginTop() :
box.marginRight(); |
637 LayoutUnit underSideMargin = curr->isHorizontal() ? box.marginBottom
() : box.marginLeft(); | 637 LayoutUnit underSideMargin = curr->isHorizontal() ? box.marginBottom
() : box.marginLeft(); |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 ASSERT(child->prevOnLine() == prev); | 1309 ASSERT(child->prevOnLine() == prev); |
1310 prev = child; | 1310 prev = child; |
1311 } | 1311 } |
1312 ASSERT(prev == m_lastChild); | 1312 ASSERT(prev == m_lastChild); |
1313 #endif | 1313 #endif |
1314 } | 1314 } |
1315 | 1315 |
1316 #endif | 1316 #endif |
1317 | 1317 |
1318 } // namespace blink | 1318 } // namespace blink |
OLD | NEW |