Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: Source/core/rendering/RenderText.h

Issue 17214005: Rename RenderText member variables to better reflect what they do. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderText.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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, 2008, 2009 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 unsigned textLength() const { return m_text.length(); } // non virtual imple mentation of length() 79 unsigned textLength() const { return m_text.length(); } // non virtual imple mentation of length()
80 void positionLineBox(InlineBox*); 80 void positionLineBox(InlineBox*);
81 81
82 virtual float width(unsigned from, unsigned len, const Font&, float xPos, Ha shSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const; 82 virtual float width(unsigned from, unsigned len, const Font&, float xPos, Ha shSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
83 virtual float width(unsigned from, unsigned len, float xPos, bool firstLine = false, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const; 83 virtual float width(unsigned from, unsigned len, float xPos, bool firstLine = false, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
84 84
85 float minLogicalWidth() const; 85 float minLogicalWidth() const;
86 float maxLogicalWidth() const; 86 float maxLogicalWidth() const;
87 87
88 void trimmedPrefWidths(float leadWidth, 88 void trimmedPrefWidths(float leadWidth,
89 float& beginMinW, bool& beginWS, 89 float& firstLineMinWidth, bool& hasBreakableStart,
90 float& endMinW, bool& endWS, 90 float& lastLineMinWidth, bool& hasBreakableEnd,
91 bool& hasBreakableChar, bool& hasBreak, 91 bool& hasBreakableChar, bool& hasBreak,
92 float& beginMaxW, float& endMaxW, 92 float& firstLineMaxWidth, float& lastLineMaxWidth,
93 float& minW, float& maxW, bool& stripFrontSpaces); 93 float& minWidth, float& maxWidth, bool& stripFrontSpaces);
94 94
95 virtual IntRect linesBoundingBox() const; 95 virtual IntRect linesBoundingBox() const;
96 LayoutRect linesVisualOverflowBoundingBox() const; 96 LayoutRect linesVisualOverflowBoundingBox() const;
97 97
98 FloatPoint firstRunOrigin() const; 98 FloatPoint firstRunOrigin() const;
99 float firstRunX() const; 99 float firstRunX() const;
100 float firstRunY() const; 100 float firstRunY() const;
101 101
102 virtual void setText(PassRefPtr<StringImpl>, bool force = false); 102 virtual void setText(PassRefPtr<StringImpl>, bool force = false);
103 void setTextWithOffset(PassRefPtr<StringImpl>, unsigned offset, unsigned len , bool force = false); 103 void setTextWithOffset(PassRefPtr<StringImpl>, unsigned offset, unsigned len , bool force = false);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 float widthFromCache(const Font&, int start, int len, float xPos, HashSet<co nst SimpleFontData*>* fallbackFonts, GlyphOverflow*) const; 174 float widthFromCache(const Font&, int start, int len, float xPos, HashSet<co nst SimpleFontData*>* fallbackFonts, GlyphOverflow*) const;
175 bool isAllASCII() const { return m_isAllASCII; } 175 bool isAllASCII() const { return m_isAllASCII; }
176 void updateNeedsTranscoding(); 176 void updateNeedsTranscoding();
177 177
178 void secureText(UChar mask); 178 void secureText(UChar mask);
179 179
180 // We put the bitfield first to minimize padding on 64-bit. 180 // We put the bitfield first to minimize padding on 64-bit.
181 bool m_hasBreakableChar : 1; // Whether or not we can be broken into multipl e lines. 181 bool m_hasBreakableChar : 1; // Whether or not we can be broken into multipl e lines.
182 bool m_hasBreak : 1; // Whether or not we have a hard break (e.g., <pre> wit h '\n'). 182 bool m_hasBreak : 1; // Whether or not we have a hard break (e.g., <pre> wit h '\n').
183 bool m_hasTab : 1; // Whether or not we have a variable width tab character (e.g., <pre> with '\t'). 183 bool m_hasTab : 1; // Whether or not we have a variable width tab character (e.g., <pre> with '\t').
184 bool m_hasBeginWS : 1; // Whether or not we begin with WS (only true if we a ren't pre) 184 bool m_hasBreakableStart : 1;
185 bool m_hasEndWS : 1; // Whether or not we end with WS (only true if we aren' t pre) 185 bool m_hasBreakableEnd : 1;
186 bool m_linesDirty : 1; // This bit indicates that the text run has already d irtied specific 186 bool m_linesDirty : 1; // This bit indicates that the text run has already d irtied specific
187 // line boxes, and this hint will enable layoutInline Children to avoid 187 // line boxes, and this hint will enable layoutInline Children to avoid
188 // just dirtying everything when character data is mo dified (e.g., appended/inserted 188 // just dirtying everything when character data is mo dified (e.g., appended/inserted
189 // or removed). 189 // or removed).
190 bool m_containsReversedText : 1; 190 bool m_containsReversedText : 1;
191 bool m_isAllASCII : 1; 191 bool m_isAllASCII : 1;
192 bool m_canUseSimpleFontCodePath : 1; 192 bool m_canUseSimpleFontCodePath : 1;
193 mutable bool m_knownToHaveNoOverflowAndNoFallbackFonts : 1; 193 mutable bool m_knownToHaveNoOverflowAndNoFallbackFonts : 1;
194 bool m_needsTranscoding : 1; 194 bool m_needsTranscoding : 1;
195 195
196 float m_minWidth; 196 float m_minWidth;
197 float m_maxWidth; 197 float m_maxWidth;
198 float m_beginMinWidth; 198 float m_firstLineMinWidth;
199 float m_endMinWidth; 199 float m_lastLineLineMinWidth;
200 200
201 String m_text; 201 String m_text;
202 202
203 InlineTextBox* m_firstTextBox; 203 InlineTextBox* m_firstTextBox;
204 InlineTextBox* m_lastTextBox; 204 InlineTextBox* m_lastTextBox;
205 }; 205 };
206 206
207 inline UChar RenderText::uncheckedCharacterAt(unsigned i) const 207 inline UChar RenderText::uncheckedCharacterAt(unsigned i) const
208 { 208 {
209 ASSERT_WITH_SECURITY_IMPLICATION(i < textLength()); 209 ASSERT_WITH_SECURITY_IMPLICATION(i < textLength());
(...skipping 27 matching lines...) Expand all
237 inline void RenderText::checkConsistency() const 237 inline void RenderText::checkConsistency() const
238 { 238 {
239 } 239 }
240 #endif 240 #endif
241 241
242 void applyTextTransform(const RenderStyle*, String&, UChar); 242 void applyTextTransform(const RenderStyle*, String&, UChar);
243 243
244 } // namespace WebCore 244 } // namespace WebCore
245 245
246 #endif // RenderText_h 246 #endif // RenderText_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698