Changeset 96422 in webkit
- Timestamp:
- Sep 30, 2011 1:49:27 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r96421 r96422 1 2011-09-30 Andreas Kling <kling@webkit.org> 2 3 REGRESSION(r82611) InlineBox has 33 bits of bitset, causing alignment issues and extra memory use. 4 https://bugs.webkit.org/show_bug.cgi?id=64914 5 6 Reviewed by Antti Koivisto. 7 8 Remove InlineBox::prevOnLineExists() and its two accompanying bitfields 9 since nobody is using them anymore. nextOnLineExists() is still used by 10 GTK+ accessibility code. 11 12 Also added a compile-time assertion to guard against future bloating of 13 the InlineBox class. 14 15 * rendering/InlineBox.cpp: 16 (WebCore::SameSizeAsInlineBox::~SameSizeAsInlineBox): 17 * rendering/InlineBox.h: 18 (WebCore::InlineBox::InlineBox): 19 1 20 2011-09-30 Pierre Rossi <pierre.rossi@gmail.com> 2 21 -
trunk/Source/WebCore/rendering/InlineBox.cpp
r96187 r96422 35 35 36 36 namespace WebCore { 37 38 class SameSizeAsInlineBox { 39 virtual ~SameSizeAsInlineBox() { } 40 void* a[4]; 41 FloatPoint b; 42 float c; 43 uint32_t d; 44 #ifndef NDEBUG 45 bool e; 46 #endif 47 }; 48 49 COMPILE_ASSERT(sizeof(InlineBox) == sizeof(SameSizeAsInlineBox), InlineBox_size_guard); 37 50 38 51 #ifndef NDEBUG … … 259 272 } 260 273 261 bool InlineBox::prevOnLineExists() const262 {263 if (!m_determinedIfPrevOnLineExists) {264 m_determinedIfPrevOnLineExists = true;265 266 if (!parent())267 m_prevOnLineExists = false;268 else if (prevOnLine())269 m_prevOnLineExists = true;270 else271 m_prevOnLineExists = parent()->prevOnLineExists();272 }273 return m_prevOnLineExists;274 }275 276 274 InlineBox* InlineBox::nextLeafChild() const 277 275 { -
trunk/Source/WebCore/rendering/InlineBox.h
r96187 r96422 57 57 , m_isText(false) 58 58 , m_determinedIfNextOnLineExists(false) 59 , m_determinedIfPrevOnLineExists(false)60 59 , m_nextOnLineExists(false) 61 , m_prevOnLineExists(false)62 60 , m_expansion(0) 63 61 #ifndef NDEBUG … … 91 89 , m_isText(false) 92 90 , m_determinedIfNextOnLineExists(false) 93 , m_determinedIfPrevOnLineExists(false)94 91 , m_nextOnLineExists(false) 95 , m_prevOnLineExists(false)96 92 , m_expansion(0) 97 93 #ifndef NDEBUG … … 204 200 } 205 201 bool nextOnLineExists() const; 206 bool prevOnLineExists() const;207 202 208 203 virtual bool isLeaf() const { return true; } … … 365 360 protected: 366 361 mutable bool m_determinedIfNextOnLineExists : 1; 367 mutable bool m_determinedIfPrevOnLineExists : 1;368 362 mutable bool m_nextOnLineExists : 1; 369 mutable bool m_prevOnLineExists : 1;370 363 signed m_expansion : 11; // for justified text 371 364
Note: See TracChangeset
for help on using the changeset viewer.