Changeset 97052 in webkit
- Timestamp:
- Oct 10, 2011, 3:14:25 AM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
rendering/InlineFlowBox.h (modified) (2 diffs)
-
rendering/RootInlineBox.cpp (modified) (4 diffs)
-
rendering/RootInlineBox.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r97051 r97052 1 2011-10-10 Andreas Kling <kling@webkit.org> 2 3 Shrink RootInlineBox. 4 https://bugs.webkit.org/show_bug.cgi?id=69707 5 6 Reviewed by Antti Koivisto. 7 8 Move the bitfields from RootInlineBox up into its base class (InlineFlowBox.) 9 This shrinks RootInlineBox by one CPU word without growing InlineFlowBox. 10 Enum bitfields were changed to "unsigned" for the MSVC signedness quirk. 11 12 Also move one 32-bit member to the head of RootInlineBox so it falls into the 13 padding at the end of InlineFlowBox on 64-bit. 14 15 This reduces memory consumption by 780 kB (on 64-bit) when loading the full 16 HTML5 spec. 17 18 * rendering/InlineFlowBox.h: 19 (WebCore::InlineFlowBox::InlineFlowBox): 20 * rendering/RootInlineBox.cpp: 21 (WebCore::RootInlineBox::RootInlineBox): 22 (WebCore::RootInlineBox::lineBreakBidiStatus): 23 * rendering/RootInlineBox.h: 24 1 25 2011-10-10 Pavel Podivilov <podivilov@chromium.org> 2 26 -
trunk/Source/WebCore/rendering/InlineFlowBox.h
r94912 r97052 47 47 , m_includeLogicalRightEdge(false) 48 48 , m_descendantsHaveSameLineHeightAndBaseline(true) 49 , m_baselineType(AlphabeticBaseline) 50 , m_hasAnnotationsBefore(false) 51 , m_hasAnnotationsAfter(false) 49 52 #ifndef NDEBUG 50 53 , m_hasBadChildList(false) … … 297 300 bool m_descendantsHaveSameLineHeightAndBaseline : 1; 298 301 299 #ifndef NDEBUG 302 // The following members are only used by RootInlineBox but moved here to keep the bits packed. 303 304 // Whether or not this line uses alphabetic or ideographic baselines by default. 305 unsigned m_baselineType : 1; // FontBaseline 306 307 // If the line contains any ruby runs, then this will be true. 308 bool m_hasAnnotationsBefore : 1; 309 bool m_hasAnnotationsAfter : 1; 310 311 unsigned m_lineBreakBidiStatusEor : 5; // WTF::Unicode::Direction 312 unsigned m_lineBreakBidiStatusLastStrong : 5; // WTF::Unicode::Direction 313 unsigned m_lineBreakBidiStatusLast : 5; // WTF::Unicode::Direction 314 315 // End of RootInlineBox-specific members. 316 317 #ifndef NDEBUG 318 private: 300 319 bool m_hasBadChildList; 301 320 #endif -
trunk/Source/WebCore/rendering/RootInlineBox.cpp
r95750 r97052 35 35 #include "RenderBlock.h" 36 36 #include "VerticalPositionCache.h" 37 #include <wtf/unicode/Unicode.h> 37 38 38 39 using namespace std; … … 45 46 RootInlineBox::RootInlineBox(RenderBlock* block) 46 47 : InlineFlowBox(block) 48 , m_lineBreakPos(0) 47 49 , m_lineBreakObj(0) 48 , m_lineBreakPos(0)49 50 , m_lineTop(0) 50 51 , m_lineBottom(0) … … 53 54 , m_paginationStrut(0) 54 55 , m_paginatedLineWidth(0) 55 , m_baselineType(AlphabeticBaseline)56 , m_hasAnnotationsBefore(false)57 , m_hasAnnotationsAfter(false)58 56 { 59 57 setIsHorizontal(block->isHorizontalWritingMode()); … … 515 513 BidiStatus RootInlineBox::lineBreakBidiStatus() const 516 514 { 517 return BidiStatus( m_lineBreakBidiStatusEor, m_lineBreakBidiStatusLastStrong, m_lineBreakBidiStatusLast, m_lineBreakContext);515 return BidiStatus(static_cast<WTF::Unicode::Direction>(m_lineBreakBidiStatusEor), static_cast<WTF::Unicode::Direction>(m_lineBreakBidiStatusLastStrong), static_cast<WTF::Unicode::Direction>(m_lineBreakBidiStatusLast), m_lineBreakContext); 518 516 } 519 517 -
trunk/Source/WebCore/rendering/RootInlineBox.h
r95750 r97052 185 185 int beforeAnnotationsAdjustment() const; 186 186 187 // This folds into the padding at the end of InlineFlowBox on 64-bit. 188 unsigned m_lineBreakPos; 189 187 190 // Where this line ended. The exact object and the position within that object are stored so that 188 191 // we can create an InlineIterator beginning just after the end of this line. 189 192 RenderObject* m_lineBreakObj; 190 unsigned m_lineBreakPos;191 193 RefPtr<BidiContext> m_lineBreakContext; 192 194 … … 203 205 // good for as long as the line has not been marked dirty. 204 206 OwnPtr<Vector<RenderBox*> > m_floats; 205 206 // Whether or not this line uses alphabetic or ideographic baselines by default.207 unsigned m_baselineType : 1; // FontBaseline208 209 // If the line contains any ruby runs, then this will be true.210 bool m_hasAnnotationsBefore : 1;211 bool m_hasAnnotationsAfter : 1;212 213 WTF::Unicode::Direction m_lineBreakBidiStatusEor : 5;214 WTF::Unicode::Direction m_lineBreakBidiStatusLastStrong : 5;215 WTF::Unicode::Direction m_lineBreakBidiStatusLast : 5;216 207 }; 217 208
Note:
See TracChangeset
for help on using the changeset viewer.