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

Side by Side Diff: sky/engine/core/rendering/InlineFlowBox.cpp

Issue 677843004: Remove text-combine. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/dom/Text.cpp ('k') | sky/engine/core/rendering/InlineTextBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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
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
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Text.cpp ('k') | sky/engine/core/rendering/InlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698