| 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 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; | 118 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; |
| 119 } else if (child->isText()) { | 119 } else if (child->isText()) { |
| 120 if (child->getLineLayoutItem().isBR() || (child->getLineLayoutItem()
.parent() != getLineLayoutItem())) { | 120 if (child->getLineLayoutItem().isBR() || (child->getLineLayoutItem()
.parent() != getLineLayoutItem())) { |
| 121 if (!parentStyle.font().getFontMetrics().hasIdenticalAscentDesce
ntAndLineGap(childStyle.font().getFontMetrics()) | 121 if (!parentStyle.font().getFontMetrics().hasIdenticalAscentDesce
ntAndLineGap(childStyle.font().getFontMetrics()) |
| 122 || parentStyle.lineHeight() != childStyle.lineHeight() | 122 || parentStyle.lineHeight() != childStyle.lineHeight() |
| 123 || (parentStyle.verticalAlign() != VerticalAlignBaseline &&
!isRootInlineBox()) || childStyle.verticalAlign() != VerticalAlignBaseline) | 123 || (parentStyle.verticalAlign() != VerticalAlignBaseline &&
!isRootInlineBox()) || childStyle.verticalAlign() != VerticalAlignBaseline) |
| 124 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; | 124 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; |
| 125 } | 125 } |
| 126 if (childStyle.hasTextCombine() || childStyle.getTextEmphasisMark()
!= TextEmphasisMarkNone) | 126 if (childStyle.hasTextCombine() || childStyle.getTextEmphasisMark()
!= TextEmphasisMarkNone) |
| 127 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; | 127 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; |
| 128 if (isFirstLineStyle() && child->isInlineTextBox()) |
| 129 toInlineTextBox(child)->transformText(); |
| 128 } else { | 130 } else { |
| 129 if (child->getLineLayoutItem().isBR()) { | 131 if (child->getLineLayoutItem().isBR()) { |
| 130 // FIXME: This is dumb. We only turn off because current layout
test results expect the <br> to be 0-height on the baseline. | 132 // FIXME: This is dumb. We only turn off because current layout
test results expect the <br> to be 0-height on the baseline. |
| 131 // Other than making a zillion tests have to regenerate results,
there's no reason to ditch the optimization here. | 133 // Other than making a zillion tests have to regenerate results,
there's no reason to ditch the optimization here. |
| 132 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; | 134 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; |
| 133 } else { | 135 } else { |
| 134 ASSERT(isInlineFlowBox()); | 136 ASSERT(isInlineFlowBox()); |
| 135 InlineFlowBox* childFlowBox = toInlineFlowBox(child); | 137 InlineFlowBox* childFlowBox = toInlineFlowBox(child); |
| 136 // Check the child's bit, and then also check for differences in
font, line-height, vertical-align | 138 // Check the child's bit, and then also check for differences in
font, line-height, vertical-align |
| 137 if (!childFlowBox->descendantsHaveSameLineHeightAndBaseline() | 139 if (!childFlowBox->descendantsHaveSameLineHeightAndBaseline() |
| (...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 ASSERT(child->prevOnLine() == prev); | 1318 ASSERT(child->prevOnLine() == prev); |
| 1317 prev = child; | 1319 prev = child; |
| 1318 } | 1320 } |
| 1319 ASSERT(prev == m_lastChild); | 1321 ASSERT(prev == m_lastChild); |
| 1320 #endif | 1322 #endif |
| 1321 } | 1323 } |
| 1322 | 1324 |
| 1323 #endif | 1325 #endif |
| 1324 | 1326 |
| 1325 } // namespace blink | 1327 } // namespace blink |
| OLD | NEW |