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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 virtual bool canBeSelectionLeaf() const OVERRIDE { return true; } | 114 virtual bool canBeSelectionLeaf() const OVERRIDE { return true; } |
115 virtual void setSelectionState(SelectionState s) OVERRIDE FINAL; | 115 virtual void setSelectionState(SelectionState s) OVERRIDE FINAL; |
116 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO
bject* paintInvalidationContainer, bool clipToVisibleContent = true) OVERRIDE; | 116 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO
bject* paintInvalidationContainer, bool clipToVisibleContent = true) OVERRIDE; |
117 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0) OVERRIDE; | 117 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0) OVERRIDE; |
118 | 118 |
119 LayoutUnit marginLeft() const { return minimumValueForLength(style()->margin
Left(), 0); } | 119 LayoutUnit marginLeft() const { return minimumValueForLength(style()->margin
Left(), 0); } |
120 LayoutUnit marginRight() const { return minimumValueForLength(style()->margi
nRight(), 0); } | 120 LayoutUnit marginRight() const { return minimumValueForLength(style()->margi
nRight(), 0); } |
121 | 121 |
122 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons
t OVERRIDE FINAL; | 122 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons
t OVERRIDE FINAL; |
| 123 virtual const RenderLayerModelObject* containerForPaintInvalidation() const
OVERRIDE; |
123 | 124 |
124 InlineTextBox* firstTextBox() const { return m_firstTextBox; } | 125 InlineTextBox* firstTextBox() const { return m_firstTextBox; } |
125 InlineTextBox* lastTextBox() const { return m_lastTextBox; } | 126 InlineTextBox* lastTextBox() const { return m_lastTextBox; } |
126 | 127 |
127 virtual int caretMinOffset() const OVERRIDE; | 128 virtual int caretMinOffset() const OVERRIDE; |
128 virtual int caretMaxOffset() const OVERRIDE; | 129 virtual int caretMaxOffset() const OVERRIDE; |
129 unsigned renderedTextLength() const; | 130 unsigned renderedTextLength() const; |
130 | 131 |
131 virtual int previousOffset(int current) const OVERRIDE FINAL; | 132 virtual int previousOffset(int current) const OVERRIDE FINAL; |
132 virtual int previousOffsetForBackwardDeletion(int current) const OVERRIDE FI
NAL; | 133 virtual int previousOffsetForBackwardDeletion(int current) const OVERRIDE FI
NAL; |
(...skipping 21 matching lines...) Expand all Loading... |
154 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; | 155 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; |
155 | 156 |
156 virtual void setTextInternal(PassRefPtr<StringImpl>); | 157 virtual void setTextInternal(PassRefPtr<StringImpl>); |
157 virtual UChar previousCharacter() const; | 158 virtual UChar previousCharacter() const; |
158 | 159 |
159 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur
rentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) cons
t OVERRIDE; | 160 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur
rentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) cons
t OVERRIDE; |
160 | 161 |
161 virtual InlineTextBox* createTextBox(); // Subclassed by SVG. | 162 virtual InlineTextBox* createTextBox(); // Subclassed by SVG. |
162 | 163 |
163 private: | 164 private: |
| 165 // RenderText objects don't know how to invalidate paint for themselves, sin
ce they don't know how to compute their bounds. Instead, they |
| 166 // invalidate paint for the containing block or layer, as computed by this m
ethod. |
| 167 const RenderObject* containingObjectForPaintInvalidation() const; |
| 168 |
164 void computePreferredLogicalWidths(float leadWidth); | 169 void computePreferredLogicalWidths(float leadWidth); |
165 void computePreferredLogicalWidths(float leadWidth, HashSet<const SimpleFont
Data*>& fallbackFonts, GlyphOverflow&); | 170 void computePreferredLogicalWidths(float leadWidth, HashSet<const SimpleFont
Data*>& fallbackFonts, GlyphOverflow&); |
166 | 171 |
167 bool computeCanUseSimpleFontCodePath() const; | 172 bool computeCanUseSimpleFontCodePath() const; |
168 | 173 |
169 // Make length() private so that callers that have a RenderText* | 174 // Make length() private so that callers that have a RenderText* |
170 // will use the more efficient textLength() instead, while | 175 // will use the more efficient textLength() instead, while |
171 // callers with a RenderObject* can continue to use length(). | 176 // callers with a RenderObject* can continue to use length(). |
172 virtual unsigned length() const OVERRIDE FINAL { return textLength(); } | 177 virtual unsigned length() const OVERRIDE FINAL { return textLength(); } |
173 | 178 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 inline RenderText* Text::renderer() const | 241 inline RenderText* Text::renderer() const |
237 { | 242 { |
238 return toRenderText(CharacterData::renderer()); | 243 return toRenderText(CharacterData::renderer()); |
239 } | 244 } |
240 | 245 |
241 void applyTextTransform(const RenderStyle*, String&, UChar); | 246 void applyTextTransform(const RenderStyle*, String&, UChar); |
242 | 247 |
243 } // namespace blink | 248 } // namespace blink |
244 | 249 |
245 #endif // RenderText_h | 250 #endif // RenderText_h |
OLD | NEW |