| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |