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

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

Issue 34273002: Remove UnusedParam.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 } 69 }
70 70
71 GlyphData WidthIterator::glyphDataForCharacter(UChar32 character, bool mirror, i nt currentCharacter, unsigned& advanceLength) 71 GlyphData WidthIterator::glyphDataForCharacter(UChar32 character, bool mirror, i nt currentCharacter, unsigned& advanceLength)
72 { 72 {
73 ASSERT(m_font); 73 ASSERT(m_font);
74 74
75 #if ENABLE(SVG_FONTS) 75 #if ENABLE(SVG_FONTS)
76 if (TextRun::RenderingContext* renderingContext = m_run.renderingContext()) 76 if (TextRun::RenderingContext* renderingContext = m_run.renderingContext())
77 return renderingContext->glyphDataForCharacter(*m_font, m_run, *this, ch aracter, mirror, currentCharacter, advanceLength); 77 return renderingContext->glyphDataForCharacter(*m_font, m_run, *this, ch aracter, mirror, currentCharacter, advanceLength);
78 #else
79 UNUSED_PARAM(currentCharacter);
80 UNUSED_PARAM(advanceLength);
81 #endif 78 #endif
82 79
83 return m_font->glyphDataForCharacter(character, mirror); 80 return m_font->glyphDataForCharacter(character, mirror);
84 } 81 }
85 82
86 struct OriginalAdvancesForCharacterTreatedAsSpace { 83 struct OriginalAdvancesForCharacterTreatedAsSpace {
87 public: 84 public:
88 OriginalAdvancesForCharacterTreatedAsSpace(bool isSpace, float advanceBefore , float advanceAt) 85 OriginalAdvancesForCharacterTreatedAsSpace(bool isSpace, float advanceBefore , float advanceAt)
89 : characterIsSpace(isSpace) 86 : characterIsSpace(isSpace)
90 , advanceBeforeCharacter(advanceBefore) 87 , advanceBeforeCharacter(advanceBefore)
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 unsigned oldSize = glyphBuffer.size(); 334 unsigned oldSize = glyphBuffer.size();
338 advance(m_currentCharacter + 1, &glyphBuffer); 335 advance(m_currentCharacter + 1, &glyphBuffer);
339 float w = 0; 336 float w = 0;
340 for (unsigned i = oldSize; i < glyphBuffer.size(); ++i) 337 for (unsigned i = oldSize; i < glyphBuffer.size(); ++i)
341 w += glyphBuffer.advanceAt(i); 338 w += glyphBuffer.advanceAt(i);
342 width = w; 339 width = w;
343 return glyphBuffer.size() > oldSize; 340 return glyphBuffer.size() > oldSize;
344 } 341 }
345 342
346 } 343 }
OLDNEW
« no previous file with comments | « Source/platform/fonts/SimpleFontData.h ('k') | Source/platform/fonts/harfbuzz/FontPlatformDataHarfBuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698