OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
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 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1913 } | 1913 } |
1914 | 1914 |
1915 unsigned LayoutText::resolvedTextLength() const { | 1915 unsigned LayoutText::resolvedTextLength() const { |
1916 int len = 0; | 1916 int len = 0; |
1917 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) | 1917 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) |
1918 len += box->len(); | 1918 len += box->len(); |
1919 return len; | 1919 return len; |
1920 } | 1920 } |
1921 | 1921 |
1922 bool LayoutText::computeCanUseSimpleFontCodePath() const { | 1922 bool LayoutText::computeCanUseSimpleFontCodePath() const { |
1923 if (m_text.is8Bit()) | 1923 return m_text.is8Bit(); |
1924 return true; | |
1925 return Character::characterRangeCodePath(characters16(), length()) == | |
1926 SimplePath; | |
1927 } | 1924 } |
1928 | 1925 |
1929 #if ENABLE(ASSERT) | 1926 #if ENABLE(ASSERT) |
1930 | 1927 |
1931 void LayoutText::checkConsistency() const { | 1928 void LayoutText::checkConsistency() const { |
1932 #ifdef CHECK_CONSISTENCY | 1929 #ifdef CHECK_CONSISTENCY |
1933 const InlineTextBox* prev = nullptr; | 1930 const InlineTextBox* prev = nullptr; |
1934 for (const InlineTextBox* child = m_firstTextBox; child; | 1931 for (const InlineTextBox* child = m_firstTextBox; child; |
1935 child = child->nextTextBox()) { | 1932 child = child->nextTextBox()) { |
1936 ASSERT(child->getLineLayoutItem().isEqual(this)); | 1933 ASSERT(child->getLineLayoutItem().isEqual(this)); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1983 LayoutRect rect = LayoutRect( | 1980 LayoutRect rect = LayoutRect( |
1984 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); | 1981 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); |
1985 LayoutBlock* block = containingBlock(); | 1982 LayoutBlock* block = containingBlock(); |
1986 if (block && hasTextBoxes()) | 1983 if (block && hasTextBoxes()) |
1987 block->adjustChildDebugRect(rect); | 1984 block->adjustChildDebugRect(rect); |
1988 | 1985 |
1989 return rect; | 1986 return rect; |
1990 } | 1987 } |
1991 | 1988 |
1992 } // namespace blink | 1989 } // namespace blink |
OLD | NEW |