| 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-2009, 2013 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004-2009, 2013 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| 11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
| 17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
| 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
| 20 * | 20 * |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 #ifndef LayoutText_h | 23 #ifndef LayoutText_h |
| 24 #define LayoutText_h | 24 #define LayoutText_h |
| 25 | 25 |
| 26 #include "core/CoreExport.h" | 26 #include "core/CoreExport.h" |
| 27 #include "core/dom/Text.h" | 27 #include "core/dom/Text.h" |
| 28 #include "core/layout/LayoutObject.h" | 28 #include "core/layout/LayoutObject.h" |
| 29 #include "core/layout/line/FloatToLayoutUnit.h" | |
| 30 #include "platform/LengthFunctions.h" | 29 #include "platform/LengthFunctions.h" |
| 31 #include "platform/text/TextPath.h" | 30 #include "platform/text/TextPath.h" |
| 32 #include "wtf/Forward.h" | 31 #include "wtf/Forward.h" |
| 33 #include "wtf/PassRefPtr.h" | 32 #include "wtf/PassRefPtr.h" |
| 34 | 33 |
| 35 namespace blink { | 34 namespace blink { |
| 36 | 35 |
| 37 class AbstractInlineTextBox; | 36 class AbstractInlineTextBox; |
| 38 class InlineTextBox; | 37 class InlineTextBox; |
| 39 | 38 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 bool is8Bit() const { return m_text.is8Bit(); } | 79 bool is8Bit() const { return m_text.is8Bit(); } |
| 81 const LChar* characters8() const { return m_text.impl()->characters8(); } | 80 const LChar* characters8() const { return m_text.impl()->characters8(); } |
| 82 const UChar* characters16() const { return m_text.impl()->characters16(); } | 81 const UChar* characters16() const { return m_text.impl()->characters16(); } |
| 83 bool hasEmptyText() const { return m_text.isEmpty(); } | 82 bool hasEmptyText() const { return m_text.isEmpty(); } |
| 84 UChar characterAt(unsigned) const; | 83 UChar characterAt(unsigned) const; |
| 85 UChar uncheckedCharacterAt(unsigned) const; | 84 UChar uncheckedCharacterAt(unsigned) const; |
| 86 UChar operator[](unsigned i) const { return uncheckedCharacterAt(i); } | 85 UChar operator[](unsigned i) const { return uncheckedCharacterAt(i); } |
| 87 unsigned textLength() const { return m_text.length(); } // non virtual imple
mentation of length() | 86 unsigned textLength() const { return m_text.length(); } // non virtual imple
mentation of length() |
| 88 void positionLineBox(InlineBox*); | 87 void positionLineBox(InlineBox*); |
| 89 | 88 |
| 90 virtual float width(unsigned from, unsigned len, const Font&, float xPos, Te
xtDirection, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* =
0) const; | 89 virtual float width(unsigned from, unsigned len, const Font&, LayoutUnit xPo
s, TextDirection, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverfl
ow* = 0) const; |
| 91 virtual float width(unsigned from, unsigned len, float xPos, TextDirection,
bool firstLine = false, HashSet<const SimpleFontData*>* fallbackFonts = 0, Glyph
Overflow* = 0) const; | 90 virtual float width(unsigned from, unsigned len, LayoutUnit xPos, TextDirect
ion, bool firstLine = false, HashSet<const SimpleFontData*>* fallbackFonts = 0,
GlyphOverflow* = 0) const; |
| 92 | 91 |
| 93 float minLogicalWidth() const; | 92 float minLogicalWidth() const; |
| 94 float maxLogicalWidth() const; | 93 float maxLogicalWidth() const; |
| 95 | 94 |
| 96 void trimmedPrefWidths(FloatWillBeLayoutUnit leadWidth, | 95 void trimmedPrefWidths(LayoutUnit leadWidth, |
| 97 FloatWillBeLayoutUnit& firstLineMinWidth, bool& hasBreakableStart, | 96 LayoutUnit& firstLineMinWidth, bool& hasBreakableStart, |
| 98 FloatWillBeLayoutUnit& lastLineMinWidth, bool& hasBreakableEnd, | 97 LayoutUnit& lastLineMinWidth, bool& hasBreakableEnd, |
| 99 bool& hasBreakableChar, bool& hasBreak, | 98 bool& hasBreakableChar, bool& hasBreak, |
| 100 FloatWillBeLayoutUnit& firstLineMaxWidth, FloatWillBeLayoutUnit& lastLin
eMaxWidth, | 99 LayoutUnit& firstLineMaxWidth, LayoutUnit& lastLineMaxWidth, |
| 101 FloatWillBeLayoutUnit& minWidth, FloatWillBeLayoutUnit& maxWidth, bool&
stripFrontSpaces, | 100 LayoutUnit& minWidth, LayoutUnit& maxWidth, bool& stripFrontSpaces, |
| 102 TextDirection); | 101 TextDirection); |
| 103 | 102 |
| 104 virtual IntRect linesBoundingBox() const; | 103 virtual IntRect linesBoundingBox() const; |
| 105 LayoutRect linesVisualOverflowBoundingBox() const; | 104 LayoutRect linesVisualOverflowBoundingBox() const; |
| 106 | 105 |
| 107 FloatPoint firstRunOrigin() const; | 106 FloatPoint firstRunOrigin() const; |
| 108 float firstRunX() const; | 107 float firstRunX() const; |
| 109 float firstRunY() const; | 108 float firstRunY() const; |
| 110 | 109 |
| 111 virtual void setText(PassRefPtr<StringImpl>, bool force = false); | 110 virtual void setText(PassRefPtr<StringImpl>, bool force = false); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 inline LayoutText* Text::layoutObject() const | 235 inline LayoutText* Text::layoutObject() const |
| 237 { | 236 { |
| 238 return toLayoutText(CharacterData::layoutObject()); | 237 return toLayoutText(CharacterData::layoutObject()); |
| 239 } | 238 } |
| 240 | 239 |
| 241 void applyTextTransform(const ComputedStyle*, String&, UChar); | 240 void applyTextTransform(const ComputedStyle*, String&, UChar); |
| 242 | 241 |
| 243 } // namespace blink | 242 } // namespace blink |
| 244 | 243 |
| 245 #endif // LayoutText_h | 244 #endif // LayoutText_h |
| OLD | NEW |