Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Side by Side Diff: third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp

Issue 2337133004: Revert of Apply first-line transform-text style (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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();
130 } else { 128 } else {
131 if (child->getLineLayoutItem().isBR()) { 129 if (child->getLineLayoutItem().isBR()) {
132 // FIXME: This is dumb. We only turn off because current layout test results expect the <br> to be 0-height on the baseline. 130 // FIXME: This is dumb. We only turn off because current layout test results expect the <br> to be 0-height on the baseline.
133 // Other than making a zillion tests have to regenerate results, there's no reason to ditch the optimization here. 131 // Other than making a zillion tests have to regenerate results, there's no reason to ditch the optimization here.
134 shouldClearDescendantsHaveSameLineHeightAndBaseline = true; 132 shouldClearDescendantsHaveSameLineHeightAndBaseline = true;
135 } else { 133 } else {
136 ASSERT(isInlineFlowBox()); 134 ASSERT(isInlineFlowBox());
137 InlineFlowBox* childFlowBox = toInlineFlowBox(child); 135 InlineFlowBox* childFlowBox = toInlineFlowBox(child);
138 // Check the child's bit, and then also check for differences in font, line-height, vertical-align 136 // Check the child's bit, and then also check for differences in font, line-height, vertical-align
139 if (!childFlowBox->descendantsHaveSameLineHeightAndBaseline() 137 if (!childFlowBox->descendantsHaveSameLineHeightAndBaseline()
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 ASSERT(child->prevOnLine() == prev); 1316 ASSERT(child->prevOnLine() == prev);
1319 prev = child; 1317 prev = child;
1320 } 1318 }
1321 ASSERT(prev == m_lastChild); 1319 ASSERT(prev == m_lastChild);
1322 #endif 1320 #endif
1323 } 1321 }
1324 1322
1325 #endif 1323 #endif
1326 1324
1327 } // namespace blink 1325 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/LineLayoutText.h ('k') | third_party/WebKit/Source/core/layout/line/InlineTextBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698