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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 } | 480 } |
481 | 481 |
482 if (curr->isInlineFlowBox()) | 482 if (curr->isInlineFlowBox()) |
483 toInlineFlowBox(curr)->adjustMaxAscentAndDescent(maxAscent, maxDesce
nt, maxPositionTop, maxPositionBottom); | 483 toInlineFlowBox(curr)->adjustMaxAscentAndDescent(maxAscent, maxDesce
nt, maxPositionTop, maxPositionBottom); |
484 } | 484 } |
485 } | 485 } |
486 | 486 |
487 void InlineFlowBox::computeLogicalBoxHeights(RootInlineBox* rootBox, LayoutUnit&
maxPositionTop, LayoutUnit& maxPositionBottom, int& maxAscent, int& maxDescent,
bool& setMaxAscent, bool& setMaxDescent, bool strictMode, GlyphOverflowAndFallb
ackFontsMap& textBoxDataMap, FontBaseline baselineType, VerticalPositionCache& v
erticalPositionCache) | 487 void InlineFlowBox::computeLogicalBoxHeights(RootInlineBox* rootBox, LayoutUnit&
maxPositionTop, LayoutUnit& maxPositionBottom, int& maxAscent, int& maxDescent,
bool& setMaxAscent, bool& setMaxDescent, bool strictMode, GlyphOverflowAndFallb
ackFontsMap& textBoxDataMap, FontBaseline baselineType, VerticalPositionCache& v
erticalPositionCache) |
488 { | 488 { |
489 // The primary purpose of this function is to compute the maximal ascent and
descent values for | 489 // The primary purpose of this function is to compute the maximal ascent and
descent values for |
490 // a line. These values are computed based off the block's line-box-contain
property, which indicates | 490 // a line. |
491 // what parts of descendant boxes have to fit within the line. | |
492 // | 491 // |
493 // The maxAscent value represents the distance of the highest point of any b
ox (typically including line-height) from | 492 // The maxAscent value represents the distance of the highest point of any b
ox (typically including line-height) from |
494 // the root box's baseline. The maxDescent value represents the distance of
the lowest point of any box | 493 // the root box's baseline. The maxDescent value represents the distance of
the lowest point of any box |
495 // (also typically including line-height) from the root box baseline. These
values can be negative. | 494 // (also typically including line-height) from the root box baseline. These
values can be negative. |
496 // | 495 // |
497 // A secondary purpose of this function is to store the offset of every box'
s baseline from the root box's | 496 // A secondary purpose of this function is to store the offset of every box'
s baseline from the root box's |
498 // baseline. This information is cached in the logicalTop() of every box. We
're effectively just using | 497 // baseline. This information is cached in the logicalTop() of every box. We
're effectively just using |
499 // the logicalTop() as scratch space. | 498 // the logicalTop() as scratch space. |
500 // | 499 // |
501 // Because a box can be positioned such that it ends up fully above or fully
below the | 500 // Because a box can be positioned such that it ends up fully above or fully
below the |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 ASSERT(child->prevOnLine() == prev); | 1308 ASSERT(child->prevOnLine() == prev); |
1310 prev = child; | 1309 prev = child; |
1311 } | 1310 } |
1312 ASSERT(prev == m_lastChild); | 1311 ASSERT(prev == m_lastChild); |
1313 #endif | 1312 #endif |
1314 } | 1313 } |
1315 | 1314 |
1316 #endif | 1315 #endif |
1317 | 1316 |
1318 } // namespace blink | 1317 } // namespace blink |
OLD | NEW |