OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 , m_minGlyphBoundingBoxY(numeric_limits<float>::max()) | 76 , m_minGlyphBoundingBoxY(numeric_limits<float>::max()) |
77 , m_maxGlyphBoundingBoxY(numeric_limits<float>::min()) | 77 , m_maxGlyphBoundingBoxY(numeric_limits<float>::min()) |
78 , m_lastRoundingGlyph(0) | 78 , m_lastRoundingGlyph(0) |
79 { | 79 { |
80 if (!m_expansion) | 80 if (!m_expansion) |
81 m_expansionPerOpportunity = 0; | 81 m_expansionPerOpportunity = 0; |
82 else { | 82 else { |
83 bool isAfterExpansion = m_afterExpansion; | 83 bool isAfterExpansion = m_afterExpansion; |
84 unsigned expansionOpportunityCount; | 84 unsigned expansionOpportunityCount; |
85 if (m_run.is8Bit()) | 85 if (m_run.is8Bit()) |
86 expansionOpportunityCount = Character::expansionOpportunityCount(m_r
un.characters8(), m_end, m_run.ltr() ? LTR : RTL, isAfterExpansion); | 86 expansionOpportunityCount = Character::expansionOpportunityCount(m_r
un.characters8(), m_end, m_run.direction(), isAfterExpansion); |
87 else | 87 else |
88 expansionOpportunityCount = Character::expansionOpportunityCount(m_r
un.characters16(), m_end, m_run.ltr() ? LTR : RTL, isAfterExpansion); | 88 expansionOpportunityCount = Character::expansionOpportunityCount(m_r
un.characters16(), m_end, m_run.direction(), isAfterExpansion); |
89 if (isAfterExpansion && !m_run.allowsTrailingExpansion()) | 89 if (isAfterExpansion && !m_run.allowsTrailingExpansion()) |
90 expansionOpportunityCount--; | 90 expansionOpportunityCount--; |
91 | 91 |
92 if (!expansionOpportunityCount) | 92 if (!expansionOpportunityCount) |
93 m_expansionPerOpportunity = 0; | 93 m_expansionPerOpportunity = 0; |
94 else | 94 else |
95 m_expansionPerOpportunity = m_expansion / expansionOpportunityCount; | 95 m_expansionPerOpportunity = m_expansion / expansionOpportunityCount; |
96 } | 96 } |
97 | 97 |
98 collectComplexTextRuns(); | 98 collectComplexTextRuns(); |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 | 660 |
661 lastCharacterIndex = characterIndex; | 661 lastCharacterIndex = characterIndex; |
662 } | 662 } |
663 if (!isMonotonic) | 663 if (!isMonotonic) |
664 complexTextRun.setIsNonMonotonic(); | 664 complexTextRun.setIsNonMonotonic(); |
665 } | 665 } |
666 m_totalWidth += widthSinceLastCommit; | 666 m_totalWidth += widthSinceLastCommit; |
667 } | 667 } |
668 | 668 |
669 } // namespace WebCore | 669 } // namespace WebCore |
OLD | NEW |