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

Side by Side Diff: Source/WebCore/platform/graphics/WidthIterator.cpp

Issue 7145023: Merge 88139 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 6 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, 2006, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2003, 2006, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Holger Hans Peter Freyther 3 * Copyright (C) 2008 Holger Hans Peter Freyther
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 m_expansionPerOpportunity = m_expansion / expansionOpportunityCount; 73 m_expansionPerOpportunity = m_expansion / expansionOpportunityCount;
74 } 74 }
75 } 75 }
76 76
77 void WidthIterator::advance(int offset, GlyphBuffer* glyphBuffer) 77 void WidthIterator::advance(int offset, GlyphBuffer* glyphBuffer)
78 { 78 {
79 if (offset > m_end) 79 if (offset > m_end)
80 offset = m_end; 80 offset = m_end;
81 81
82 int currentCharacter = m_currentCharacter; 82 int currentCharacter = m_currentCharacter;
83 if (currentCharacter >= offset)
84 return;
85
83 const UChar* cp = m_run.data(currentCharacter); 86 const UChar* cp = m_run.data(currentCharacter);
84 87
85 bool rtl = m_run.rtl(); 88 bool rtl = m_run.rtl();
86 bool hasExtraSpacing = (m_font->letterSpacing() || m_font->wordSpacing() || m_expansion) && !m_run.spacingDisabled(); 89 bool hasExtraSpacing = (m_font->letterSpacing() || m_font->wordSpacing() || m_expansion) && !m_run.spacingDisabled();
87 90
88 FloatRect bounds; 91 FloatRect bounds;
89 92
90 const SimpleFontData* primaryFont = m_font->primaryFont(); 93 const SimpleFontData* primaryFont = m_font->primaryFont();
91 const SimpleFontData* lastFontData = primaryFont; 94 const SimpleFontData* lastFontData = primaryFont;
92 95
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 QString res = tmp.normalized(QString::NormalizationForm_C, QChar::Un icode_3_2); 252 QString res = tmp.normalized(QString::NormalizationForm_C, QChar::Un icode_3_2);
250 if (res.length() == 1) 253 if (res.length() == 1)
251 return res.at(0).unicode(); 254 return res.at(0).unicode();
252 #endif 255 #endif
253 } 256 }
254 } 257 }
255 return 0; 258 return 0;
256 } 259 }
257 260
258 } 261 }
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/TextRun.h ('k') | Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698