OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
4 * All right reserved. | 4 * All right reserved. |
5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 for (BidiRun* r = firstRun; r; r = r->next()) { | 92 for (BidiRun* r = firstRun; r; r = r->next()) { |
93 if (!r->m_box || r == trailingSpaceRun) | 93 if (!r->m_box || r == trailingSpaceRun) |
94 continue; | 94 continue; |
95 | 95 |
96 if (r->m_lineLayoutItem.isText()) { | 96 if (r->m_lineLayoutItem.isText()) { |
97 unsigned opportunitiesInRun = m_runsWithExpansions[i++]; | 97 unsigned opportunitiesInRun = m_runsWithExpansions[i++]; |
98 | 98 |
99 RELEASE_ASSERT(opportunitiesInRun <= m_totalOpportunities); | 99 RELEASE_ASSERT(opportunitiesInRun <= m_totalOpportunities); |
100 | 100 |
101 // Don't justify for white-space: pre. | 101 // Don't justify for white-space: pre. |
102 if (r->m_lineLayoutItem.style()->whiteSpace() != PRE) { | 102 if (r->m_lineLayoutItem.style()->whiteSpace() != EWhiteSpace::Pre) { |
103 InlineTextBox* textBox = toInlineTextBox(r->m_box); | 103 InlineTextBox* textBox = toInlineTextBox(r->m_box); |
104 RELEASE_ASSERT(m_totalOpportunities); | 104 RELEASE_ASSERT(m_totalOpportunities); |
105 int expansion = ((availableLogicalWidth - totalLogicalWidth) * | 105 int expansion = ((availableLogicalWidth - totalLogicalWidth) * |
106 opportunitiesInRun / m_totalOpportunities) | 106 opportunitiesInRun / m_totalOpportunities) |
107 .toInt(); | 107 .toInt(); |
108 textBox->setExpansion(expansion); | 108 textBox->setExpansion(expansion); |
109 totalLogicalWidth += expansion; | 109 totalLogicalWidth += expansion; |
110 } | 110 } |
111 m_totalOpportunities -= opportunitiesInRun; | 111 m_totalOpportunities -= opportunitiesInRun; |
112 if (!m_totalOpportunities) | 112 if (!m_totalOpportunities) |
(...skipping 2398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2511 | 2511 |
2512 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { | 2512 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { |
2513 // LayoutBlockFlow is in charge of paint invalidation of the first line. | 2513 // LayoutBlockFlow is in charge of paint invalidation of the first line. |
2514 if (firstLineBox()) | 2514 if (firstLineBox()) |
2515 return false; | 2515 return false; |
2516 | 2516 |
2517 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); | 2517 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); |
2518 } | 2518 } |
2519 | 2519 |
2520 } // namespace blink | 2520 } // namespace blink |
OLD | NEW |