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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/Font.cpp

Issue 2786043002: Remove unused TextRunPaintInfo in Font::selectionRectForText (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. 6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 289 }
290 290
291 FloatRect Font::selectionRectForText(const TextRun& run, 291 FloatRect Font::selectionRectForText(const TextRun& run,
292 const FloatPoint& point, 292 const FloatPoint& point,
293 int height, 293 int height,
294 int from, 294 int from,
295 int to, 295 int to,
296 bool accountForGlyphBounds) const { 296 bool accountForGlyphBounds) const {
297 to = (to == -1 ? run.length() : to); 297 to = (to == -1 ? run.length() : to);
298 298
299 TextRunPaintInfo runInfo(run);
300 runInfo.from = from;
301 runInfo.to = to;
302
303 FontCachePurgePreventer purgePreventer; 299 FontCachePurgePreventer purgePreventer;
304 300
305 CachingWordShaper shaper(*this); 301 CachingWordShaper shaper(*this);
306 CharacterRange range = shaper.getCharacterRange(run, from, to); 302 CharacterRange range = shaper.getCharacterRange(run, from, to);
307 303
308 return pixelSnappedSelectionRect( 304 return pixelSnappedSelectionRect(
309 FloatRect(point.x() + range.start, point.y(), range.width(), height)); 305 FloatRect(point.x() + range.start, point.y(), range.width(), height));
310 } 306 }
311 307
312 int Font::offsetForPosition(const TextRun& run, 308 int Font::offsetForPosition(const TextRun& run,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 415
420 bool Font::loadingCustomFonts() const { 416 bool Font::loadingCustomFonts() const {
421 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); 417 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts();
422 } 418 }
423 419
424 bool Font::isFallbackValid() const { 420 bool Font::isFallbackValid() const {
425 return !m_fontFallbackList || m_fontFallbackList->isValid(); 421 return !m_fontFallbackList || m_fontFallbackList->isValid();
426 } 422 }
427 423
428 } // namespace blink 424 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698