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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 } | 706 } |
707 | 707 |
708 ALWAYS_INLINE float RenderText::widthFromCache(const Font& f, int start, int len
, float xPos, TextDirection textDirection, HashSet<const SimpleFontData*>* fallb
ackFonts, GlyphOverflow* glyphOverflow) const | 708 ALWAYS_INLINE float RenderText::widthFromCache(const Font& f, int start, int len
, float xPos, TextDirection textDirection, HashSet<const SimpleFontData*>* fallb
ackFonts, GlyphOverflow* glyphOverflow) const |
709 { | 709 { |
710 if (style()->hasTextCombine() && isCombineText()) { | 710 if (style()->hasTextCombine() && isCombineText()) { |
711 const RenderCombineText* combineText = toRenderCombineText(this); | 711 const RenderCombineText* combineText = toRenderCombineText(this); |
712 if (combineText->isCombined()) | 712 if (combineText->isCombined()) |
713 return combineText->combinedTextWidth(f); | 713 return combineText->combinedTextWidth(f); |
714 } | 714 } |
715 | 715 |
716 if (f.isFixedPitch() && !f.fontDescription().variant() && m_isAllASCII && (!
glyphOverflow || !glyphOverflow->computeBounds)) { | 716 if (f.isFixedPitch() && f.fontDescription().variant() == FontVariantNormal &
& m_isAllASCII && (!glyphOverflow || !glyphOverflow->computeBounds)) { |
717 float monospaceCharacterWidth = f.spaceWidth(); | 717 float monospaceCharacterWidth = f.spaceWidth(); |
718 float w = 0; | 718 float w = 0; |
719 bool isSpace; | 719 bool isSpace; |
720 ASSERT(m_text); | 720 ASSERT(m_text); |
721 StringImpl& text = *m_text.impl(); | 721 StringImpl& text = *m_text.impl(); |
722 for (int i = start; i < start + len; i++) { | 722 for (int i = start; i < start + len; i++) { |
723 char c = text[i]; | 723 char c = text[i]; |
724 if (c <= ' ') { | 724 if (c <= ' ') { |
725 if (c == ' ' || c == '\n') { | 725 if (c == ' ' || c == '\n') { |
726 w += monospaceCharacterWidth; | 726 w += monospaceCharacterWidth; |
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1868 } | 1868 } |
1869 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); | 1869 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); |
1870 } | 1870 } |
1871 | 1871 |
1872 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() | 1872 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() |
1873 { | 1873 { |
1874 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); | 1874 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); |
1875 } | 1875 } |
1876 | 1876 |
1877 } // namespace WebCore | 1877 } // namespace WebCore |
OLD | NEW |