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 * |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 float firstRunX() const; | 141 float firstRunX() const; |
142 float firstRunY() const; | 142 float firstRunY() const; |
143 | 143 |
144 virtual void setText(PassRefPtr<StringImpl>, bool force = false); | 144 virtual void setText(PassRefPtr<StringImpl>, bool force = false); |
145 void setTextWithOffset(PassRefPtr<StringImpl>, unsigned offset, unsigned len
, bool force = false); | 145 void setTextWithOffset(PassRefPtr<StringImpl>, unsigned offset, unsigned len
, bool force = false); |
146 | 146 |
147 virtual void transformText(); | 147 virtual void transformText(); |
148 | 148 |
149 bool canBeSelectionLeaf() const override { return true; } | 149 bool canBeSelectionLeaf() const override { return true; } |
150 void setSelectionState(SelectionState) final; | 150 void setSelectionState(SelectionState) final; |
151 LayoutRect selectionRectForPaintInvalidation(const LayoutBoxModelObject* pai
ntInvalidationContainer) const override; | 151 LayoutRect localSelectionRect() const final; |
152 LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidt
hToEndOfLine = nullptr) override; | 152 LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidt
hToEndOfLine = nullptr) override; |
153 | 153 |
154 InlineTextBox* firstTextBox() const { return m_firstTextBox; } | 154 InlineTextBox* firstTextBox() const { return m_firstTextBox; } |
155 InlineTextBox* lastTextBox() const { return m_lastTextBox; } | 155 InlineTextBox* lastTextBox() const { return m_lastTextBox; } |
156 | 156 |
157 // True if we have inline text box children which implies rendered text (or
whitespace) output. | 157 // True if we have inline text box children which implies rendered text (or
whitespace) output. |
158 bool hasTextBoxes() const { return firstTextBox(); } | 158 bool hasTextBoxes() const { return firstTextBox(); } |
159 | 159 |
160 int caretMinOffset() const override; | 160 int caretMinOffset() const override; |
161 int caretMaxOffset() const override; | 161 int caretMaxOffset() const override; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 bool nodeAtPoint(HitTestResult&, const HitTestLocation&, const LayoutPoint&,
HitTestAction) final { ASSERT_NOT_REACHED(); return false; } | 213 bool nodeAtPoint(HitTestResult&, const HitTestLocation&, const LayoutPoint&,
HitTestAction) final { ASSERT_NOT_REACHED(); return false; } |
214 | 214 |
215 void deleteTextBoxes(); | 215 void deleteTextBoxes(); |
216 bool containsOnlyWhitespace(unsigned from, unsigned len) const; | 216 bool containsOnlyWhitespace(unsigned from, unsigned len) const; |
217 float widthFromFont(const Font&, int start, int len, float leadWidth, float
textWidthSoFar, TextDirection, HashSet<const SimpleFontData*>* fallbackFonts, Fl
oatRect* glyphBoundsAccumulation) const; | 217 float widthFromFont(const Font&, int start, int len, float leadWidth, float
textWidthSoFar, TextDirection, HashSet<const SimpleFontData*>* fallbackFonts, Fl
oatRect* glyphBoundsAccumulation) const; |
218 | 218 |
219 void secureText(UChar mask); | 219 void secureText(UChar mask); |
220 | 220 |
221 bool isText() const = delete; // This will catch anyone doing an unnecessary
check. | 221 bool isText() const = delete; // This will catch anyone doing an unnecessary
check. |
222 | 222 |
223 LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObjec
t* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const ov
erride; | 223 LayoutRect localOverflowRectForPaintInvalidation() const override; |
224 | 224 |
225 void checkConsistency() const; | 225 void checkConsistency() const; |
226 | 226 |
227 // We put the bitfield first to minimize padding on 64-bit. | 227 // We put the bitfield first to minimize padding on 64-bit. |
228 bool m_hasBreakableChar : 1; // Whether or not we can be broken into multipl
e lines. | 228 bool m_hasBreakableChar : 1; // Whether or not we can be broken into multipl
e lines. |
229 bool m_hasBreak : 1; // Whether or not we have a hard break (e.g., <pre> wit
h '\n'). | 229 bool m_hasBreak : 1; // Whether or not we have a hard break (e.g., <pre> wit
h '\n'). |
230 bool m_hasTab : 1; // Whether or not we have a variable width tab character
(e.g., <pre> with '\t'). | 230 bool m_hasTab : 1; // Whether or not we have a variable width tab character
(e.g., <pre> with '\t'). |
231 bool m_hasBreakableStart : 1; | 231 bool m_hasBreakableStart : 1; |
232 bool m_hasBreakableEnd : 1; | 232 bool m_hasBreakableEnd : 1; |
233 bool m_hasEndWhiteSpace : 1; | 233 bool m_hasEndWhiteSpace : 1; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 inline LayoutText* Text::layoutObject() const | 293 inline LayoutText* Text::layoutObject() const |
294 { | 294 { |
295 return toLayoutText(CharacterData::layoutObject()); | 295 return toLayoutText(CharacterData::layoutObject()); |
296 } | 296 } |
297 | 297 |
298 void applyTextTransform(const ComputedStyle*, String&, UChar); | 298 void applyTextTransform(const ComputedStyle*, String&, UChar); |
299 | 299 |
300 } // namespace blink | 300 } // namespace blink |
301 | 301 |
302 #endif // LayoutText_h | 302 #endif // LayoutText_h |
OLD | NEW |