| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 isAfterExpansion = true; | 64 isAfterExpansion = true; |
| 65 } else { | 65 } else { |
| 66 opportunitiesInRun = Character::expansionOpportunityCount( | 66 opportunitiesInRun = Character::expansionOpportunityCount( |
| 67 text.characters16() + run.m_start, run.m_stop - run.m_start, | 67 text.characters16() + run.m_start, run.m_stop - run.m_start, |
| 68 run.m_box->direction(), isAfterExpansion, textJustify); | 68 run.m_box->direction(), isAfterExpansion, textJustify); |
| 69 } | 69 } |
| 70 m_runsWithExpansions.append(opportunitiesInRun); | 70 m_runsWithExpansions.append(opportunitiesInRun); |
| 71 m_totalOpportunities += opportunitiesInRun; | 71 m_totalOpportunities += opportunitiesInRun; |
| 72 } | 72 } |
| 73 void removeTrailingExpansion() { | 73 void removeTrailingExpansion() { |
| 74 if (!m_totalOpportunities || !m_runsWithExpansions.last()) | 74 if (!m_totalOpportunities || !m_runsWithExpansions.back()) |
| 75 return; | 75 return; |
| 76 m_runsWithExpansions.last()--; | 76 m_runsWithExpansions.back()--; |
| 77 m_totalOpportunities--; | 77 m_totalOpportunities--; |
| 78 } | 78 } |
| 79 | 79 |
| 80 unsigned count() { return m_totalOpportunities; } | 80 unsigned count() { return m_totalOpportunities; } |
| 81 | 81 |
| 82 unsigned opportunitiesInRun(size_t run) { return m_runsWithExpansions[run]; } | 82 unsigned opportunitiesInRun(size_t run) { return m_runsWithExpansions[run]; } |
| 83 | 83 |
| 84 void computeExpansionsForJustifiedText(BidiRun* firstRun, | 84 void computeExpansionsForJustifiedText(BidiRun* firstRun, |
| 85 BidiRun* trailingSpaceRun, | 85 BidiRun* trailingSpaceRun, |
| 86 LayoutUnit& totalLogicalWidth, | 86 LayoutUnit& totalLogicalWidth, |
| (...skipping 2424 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 |