| 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 FontCachePurgePreventer purgePreventer; | 402 FontCachePurgePreventer purgePreventer; |
| 403 | 403 |
| 404 if (codePath(TextRunPaintInfo(run)) != ComplexPath && !getFontDescription().
getTypesettingFeatures()) | 404 if (codePath(TextRunPaintInfo(run)) != ComplexPath && !getFontDescription().
getTypesettingFeatures()) |
| 405 return offsetForPositionForSimpleText(run, x, includePartialGlyphs); | 405 return offsetForPositionForSimpleText(run, x, includePartialGlyphs); |
| 406 | 406 |
| 407 return offsetForPositionForComplexText(run, x, includePartialGlyphs); | 407 return offsetForPositionForComplexText(run, x, includePartialGlyphs); |
| 408 } | 408 } |
| 409 | 409 |
| 410 CodePath Font::codePath(const TextRunPaintInfo& runInfo) const | 410 CodePath Font::codePath(const TextRunPaintInfo& runInfo) const |
| 411 { | 411 { |
| 412 // TODO(eae): Disable the always use complex text feature on Android for now as |
| 413 // it caused a memory regression for webview. crbug.com/577306 |
| 414 #if !OS(ANDROID) |
| 412 if (RuntimeEnabledFeatures::alwaysUseComplexTextEnabled() | 415 if (RuntimeEnabledFeatures::alwaysUseComplexTextEnabled() |
| 413 || LayoutTestSupport::alwaysUseComplexTextForTest()) { | 416 || LayoutTestSupport::alwaysUseComplexTextForTest()) { |
| 414 return ComplexPath; | 417 return ComplexPath; |
| 415 } | 418 } |
| 419 #endif |
| 416 | 420 |
| 417 const TextRun& run = runInfo.run; | 421 const TextRun& run = runInfo.run; |
| 418 | 422 |
| 419 if (getFontDescription().getTypesettingFeatures() && (runInfo.from || runInf
o.to != run.length())) | 423 if (getFontDescription().getTypesettingFeatures() && (runInfo.from || runInf
o.to != run.length())) |
| 420 return ComplexPath; | 424 return ComplexPath; |
| 421 | 425 |
| 422 if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings
()->size() > 0) | 426 if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings
()->size() > 0) |
| 423 return ComplexPath; | 427 return ComplexPath; |
| 424 | 428 |
| 425 if (m_fontDescription.isVerticalBaseline()) | 429 if (m_fontDescription.isVerticalBaseline()) |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 { | 843 { |
| 840 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); | 844 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); |
| 841 } | 845 } |
| 842 | 846 |
| 843 bool Font::isFallbackValid() const | 847 bool Font::isFallbackValid() const |
| 844 { | 848 { |
| 845 return !m_fontFallbackList || m_fontFallbackList->isValid(); | 849 return !m_fontFallbackList || m_fontFallbackList->isValid(); |
| 846 } | 850 } |
| 847 | 851 |
| 848 } // namespace blink | 852 } // namespace blink |
| OLD | NEW |