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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 bool nodeAtPoint(HitTestResult&, const HitTestLocation&, const LayoutPoint&,
HitTestAction) final { ASSERT_NOT_REACHED(); return false; } | 215 bool nodeAtPoint(HitTestResult&, const HitTestLocation&, const LayoutPoint&,
HitTestAction) final { ASSERT_NOT_REACHED(); return false; } |
216 | 216 |
217 void deleteTextBoxes(); | 217 void deleteTextBoxes(); |
218 bool containsOnlyWhitespace(unsigned from, unsigned len) const; | 218 bool containsOnlyWhitespace(unsigned from, unsigned len) const; |
219 float widthFromFont(const Font&, int start, int len, float leadWidth, float
textWidthSoFar, TextDirection, HashSet<const SimpleFontData*>* fallbackFonts, Fl
oatRect* glyphBoundsAccumulation) const; | 219 float widthFromFont(const Font&, int start, int len, float leadWidth, float
textWidthSoFar, TextDirection, HashSet<const SimpleFontData*>* fallbackFonts, Fl
oatRect* glyphBoundsAccumulation) const; |
220 | 220 |
221 void secureText(UChar mask); | 221 void secureText(UChar mask); |
222 | 222 |
223 bool isText() const = delete; // This will catch anyone doing an unnecessary
check. | 223 bool isText() const = delete; // This will catch anyone doing an unnecessary
check. |
224 | 224 |
225 LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObjec
t* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const ov
erride; | 225 LayoutRect localOverflowRectForPaintInvalidation() const override; |
226 | 226 |
227 void checkConsistency() const; | 227 void checkConsistency() const; |
228 | 228 |
229 // We put the bitfield first to minimize padding on 64-bit. | 229 // We put the bitfield first to minimize padding on 64-bit. |
230 bool m_hasBreakableChar : 1; // Whether or not we can be broken into multipl
e lines. | 230 bool m_hasBreakableChar : 1; // Whether or not we can be broken into multipl
e lines. |
231 bool m_hasBreak : 1; // Whether or not we have a hard break (e.g., <pre> wit
h '\n'). | 231 bool m_hasBreak : 1; // Whether or not we have a hard break (e.g., <pre> wit
h '\n'). |
232 bool m_hasTab : 1; // Whether or not we have a variable width tab character
(e.g., <pre> with '\t'). | 232 bool m_hasTab : 1; // Whether or not we have a variable width tab character
(e.g., <pre> with '\t'). |
233 bool m_hasBreakableStart : 1; | 233 bool m_hasBreakableStart : 1; |
234 bool m_hasBreakableEnd : 1; | 234 bool m_hasBreakableEnd : 1; |
235 bool m_hasEndWhiteSpace : 1; | 235 bool m_hasEndWhiteSpace : 1; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 inline LayoutText* Text::layoutObject() const | 295 inline LayoutText* Text::layoutObject() const |
296 { | 296 { |
297 return toLayoutText(CharacterData::layoutObject()); | 297 return toLayoutText(CharacterData::layoutObject()); |
298 } | 298 } |
299 | 299 |
300 void applyTextTransform(const ComputedStyle*, String&, UChar); | 300 void applyTextTransform(const ComputedStyle*, String&, UChar); |
301 | 301 |
302 } // namespace blink | 302 } // namespace blink |
303 | 303 |
304 #endif // LayoutText_h | 304 #endif // LayoutText_h |
OLD | NEW |