| 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) | |
| 420 if (RuntimeEnabledFeatures::alwaysUseComplexTextEnabled() | 417 if (RuntimeEnabledFeatures::alwaysUseComplexTextEnabled() |
| 421 || LayoutTestSupport::alwaysUseComplexTextForTest()) { | 418 || LayoutTestSupport::alwaysUseComplexTextForTest()) { |
| 422 return ComplexPath; | 419 return ComplexPath; |
| 423 } | 420 } |
| 424 #endif | |
| 425 | 421 |
| 426 const TextRun& run = runInfo.run; | 422 const TextRun& run = runInfo.run; |
| 427 | 423 |
| 428 if (getFontDescription().getTypesettingFeatures()) | 424 if (getFontDescription().getTypesettingFeatures()) |
| 429 return ComplexPath; | 425 return ComplexPath; |
| 430 | 426 |
| 431 if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings
()->size() > 0) | 427 if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings
()->size() > 0) |
| 432 return ComplexPath; | 428 return ComplexPath; |
| 433 | 429 |
| 434 if (m_fontDescription.isVerticalBaseline()) | 430 if (m_fontDescription.isVerticalBaseline()) |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 { | 854 { |
| 859 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); | 855 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); |
| 860 } | 856 } |
| 861 | 857 |
| 862 bool Font::isFallbackValid() const | 858 bool Font::isFallbackValid() const |
| 863 { | 859 { |
| 864 return !m_fontFallbackList || m_fontFallbackList->isValid(); | 860 return !m_fontFallbackList || m_fontFallbackList->isValid(); |
| 865 } | 861 } |
| 866 | 862 |
| 867 } // namespace blink | 863 } // namespace blink |
| OLD | NEW |