| 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 FontCachePurgePreventer purgePreventer; | 407 FontCachePurgePreventer purgePreventer; |
| 408 | 408 |
| 409 if (codePath(TextRunPaintInfo(run)) != ComplexPath && !getFontDescription().
getTypesettingFeatures()) | 409 if (codePath(TextRunPaintInfo(run)) != ComplexPath && !getFontDescription().
getTypesettingFeatures()) |
| 410 return offsetForPositionForSimpleText(run, x, includePartialGlyphs); | 410 return offsetForPositionForSimpleText(run, x, includePartialGlyphs); |
| 411 | 411 |
| 412 return offsetForPositionForComplexText(run, x, includePartialGlyphs); | 412 return offsetForPositionForComplexText(run, x, includePartialGlyphs); |
| 413 } | 413 } |
| 414 | 414 |
| 415 CodePath Font::codePath(const TextRunPaintInfo& runInfo) const | 415 CodePath Font::codePath(const TextRunPaintInfo& runInfo) const |
| 416 { | 416 { |
| 417 // TODO(eae): Disable the always use complex text feature on Android for now as |
| 418 // it caused a memory regression for webview. crbug.com/577306 |
| 419 #if !OS(ANDROID) |
| 417 if (RuntimeEnabledFeatures::alwaysUseComplexTextEnabled() | 420 if (RuntimeEnabledFeatures::alwaysUseComplexTextEnabled() |
| 418 || LayoutTestSupport::alwaysUseComplexTextForTest()) { | 421 || LayoutTestSupport::alwaysUseComplexTextForTest()) { |
| 419 return ComplexPath; | 422 return ComplexPath; |
| 420 } | 423 } |
| 424 #endif |
| 421 | 425 |
| 422 const TextRun& run = runInfo.run; | 426 const TextRun& run = runInfo.run; |
| 423 | 427 |
| 424 if (getFontDescription().getTypesettingFeatures()) | 428 if (getFontDescription().getTypesettingFeatures()) |
| 425 return ComplexPath; | 429 return ComplexPath; |
| 426 | 430 |
| 427 if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings
()->size() > 0) | 431 if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings
()->size() > 0) |
| 428 return ComplexPath; | 432 return ComplexPath; |
| 429 | 433 |
| 430 if (m_fontDescription.isVerticalBaseline()) | 434 if (m_fontDescription.isVerticalBaseline()) |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 { | 858 { |
| 855 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); | 859 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); |
| 856 } | 860 } |
| 857 | 861 |
| 858 bool Font::isFallbackValid() const | 862 bool Font::isFallbackValid() const |
| 859 { | 863 { |
| 860 return !m_fontFallbackList || m_fontFallbackList->isValid(); | 864 return !m_fontFallbackList || m_fontFallbackList->isValid(); |
| 861 } | 865 } |
| 862 | 866 |
| 863 } // namespace blink | 867 } // namespace blink |
| OLD | NEW |