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

Side by Side Diff: Source/platform/fonts/WidthIterator.cpp

Issue 99103006: Moving GraphicsContext and dependencies from core to platform. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final patch - fixes Android Created 7 years 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 | Annotate | Revision Log
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,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 * 19 *
20 */ 20 */
21 21
22 #include "config.h" 22 #include "config.h"
23 #include "core/platform/graphics/WidthIterator.h" 23 #include "platform/fonts/WidthIterator.h"
24 24
25 #include "core/platform/graphics/SimpleFontData.h"
26 #include "platform/fonts/GlyphBuffer.h" 25 #include "platform/fonts/GlyphBuffer.h"
27 #include "platform/fonts/Latin1TextIterator.h" 26 #include "platform/fonts/Latin1TextIterator.h"
27 #include "platform/fonts/SimpleFontData.h"
28 #include "platform/text/SurrogatePairAwareTextIterator.h" 28 #include "platform/text/SurrogatePairAwareTextIterator.h"
29 #include "wtf/MathExtras.h" 29 #include "wtf/MathExtras.h"
30 30
31 using namespace WTF; 31 using namespace WTF;
32 using namespace Unicode; 32 using namespace Unicode;
33 using namespace std; 33 using namespace std;
34 34
35 namespace WebCore { 35 namespace WebCore {
36 36
37 WidthIterator::WidthIterator(const Font* font, const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, bool accountForGlyphBounds, bool forTextEmphas is) 37 WidthIterator::WidthIterator(const Font* font, const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, bool accountForGlyphBounds, bool forTextEmphas is)
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 unsigned oldSize = glyphBuffer.size(); 337 unsigned oldSize = glyphBuffer.size();
338 advance(m_currentCharacter + 1, &glyphBuffer); 338 advance(m_currentCharacter + 1, &glyphBuffer);
339 float w = 0; 339 float w = 0;
340 for (unsigned i = oldSize; i < glyphBuffer.size(); ++i) 340 for (unsigned i = oldSize; i < glyphBuffer.size(); ++i)
341 w += glyphBuffer.advanceAt(i); 341 w += glyphBuffer.advanceAt(i);
342 width = w; 342 width = w;
343 return glyphBuffer.size() > oldSize; 343 return glyphBuffer.size() > oldSize;
344 } 344 }
345 345
346 } 346 }
OLDNEW
« no previous file with comments | « Source/platform/fonts/WidthIterator.h ('k') | Source/platform/fonts/android/FontCacheAndroid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698