| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 bool shouldClearDescendantsHaveSameLineHeightAndBaseline = false; | 118 bool shouldClearDescendantsHaveSameLineHeightAndBaseline = false; |
| 119 if (child->renderer().isReplaced()) | 119 if (child->renderer().isReplaced()) |
| 120 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; | 120 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; |
| 121 else if (child->isText()) { | 121 else if (child->isText()) { |
| 122 if (child->renderer().parent() != renderer()) { | 122 if (child->renderer().parent() != renderer()) { |
| 123 if (!parentStyle->font().fontMetrics().hasIdenticalAscentDescent
AndLineGap(childStyle->font().fontMetrics()) | 123 if (!parentStyle->font().fontMetrics().hasIdenticalAscentDescent
AndLineGap(childStyle->font().fontMetrics()) |
| 124 || parentStyle->lineHeight() != childStyle->lineHeight() | 124 || parentStyle->lineHeight() != childStyle->lineHeight() |
| 125 || (parentStyle->verticalAlign() != BASELINE && !isRootInlin
eBox()) || childStyle->verticalAlign() != BASELINE) | 125 || (parentStyle->verticalAlign() != BASELINE && !isRootInlin
eBox()) || childStyle->verticalAlign() != BASELINE) |
| 126 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; | 126 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; |
| 127 } | 127 } |
| 128 if (childStyle->hasTextCombine() || childStyle->textEmphasisMark() !
= TextEmphasisMarkNone) | 128 if (childStyle->textEmphasisMark() != TextEmphasisMarkNone) |
| 129 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; | 129 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; |
| 130 } else { | 130 } else { |
| 131 ASSERT(isInlineFlowBox()); | 131 ASSERT(isInlineFlowBox()); |
| 132 InlineFlowBox* childFlowBox = toInlineFlowBox(child); | 132 InlineFlowBox* childFlowBox = toInlineFlowBox(child); |
| 133 // Check the child's bit, and then also check for differences in fon
t, line-height, vertical-align | 133 // Check the child's bit, and then also check for differences in fon
t, line-height, vertical-align |
| 134 if (!childFlowBox->descendantsHaveSameLineHeightAndBaseline() | 134 if (!childFlowBox->descendantsHaveSameLineHeightAndBaseline() |
| 135 || !parentStyle->font().fontMetrics().hasIdenticalAscentDescentA
ndLineGap(childStyle->font().fontMetrics()) | 135 || !parentStyle->font().fontMetrics().hasIdenticalAscentDescentA
ndLineGap(childStyle->font().fontMetrics()) |
| 136 || parentStyle->lineHeight() != childStyle->lineHeight() | 136 || parentStyle->lineHeight() != childStyle->lineHeight() |
| 137 || (parentStyle->verticalAlign() != BASELINE && !isRootInlineBox
()) || childStyle->verticalAlign() != BASELINE | 137 || (parentStyle->verticalAlign() != BASELINE && !isRootInlineBox
()) || childStyle->verticalAlign() != BASELINE |
| 138 || childStyle->hasBorder() || childStyle->hasPadding() || childS
tyle->hasTextCombine()) | 138 || childStyle->hasBorder() || childStyle->hasPadding()) |
| 139 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; | 139 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; |
| 140 } | 140 } |
| 141 | 141 |
| 142 if (shouldClearDescendantsHaveSameLineHeightAndBaseline) | 142 if (shouldClearDescendantsHaveSameLineHeightAndBaseline) |
| 143 clearDescendantsHaveSameLineHeightAndBaseline(); | 143 clearDescendantsHaveSameLineHeightAndBaseline(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 if (!child->renderer().isOutOfFlowPositioned()) { | 146 if (!child->renderer().isOutOfFlowPositioned()) { |
| 147 if (child->isText()) { | 147 if (child->isText()) { |
| 148 RenderStyle* childStyle = child->renderer().style(isFirstLineStyle()
); | 148 RenderStyle* childStyle = child->renderer().style(isFirstLineStyle()
); |
| (...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1537 ASSERT(child->prevOnLine() == prev); | 1537 ASSERT(child->prevOnLine() == prev); |
| 1538 prev = child; | 1538 prev = child; |
| 1539 } | 1539 } |
| 1540 ASSERT(prev == m_lastChild); | 1540 ASSERT(prev == m_lastChild); |
| 1541 #endif | 1541 #endif |
| 1542 } | 1542 } |
| 1543 | 1543 |
| 1544 #endif | 1544 #endif |
| 1545 | 1545 |
| 1546 } // namespace blink | 1546 } // namespace blink |
| OLD | NEW |