Index: Source/core/layout/LayoutObject.cpp |
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp |
index b197aefe32cca310ed1bc3fc7369cfddb28585bd..09cd278a316051ac7c80ead32bf16eb6b03ebecd 100644 |
--- a/Source/core/layout/LayoutObject.cpp |
+++ b/Source/core/layout/LayoutObject.cpp |
@@ -88,6 +88,7 @@ |
#include "platform/graphics/paint/DisplayItemList.h" |
#include "wtf/Partitions.h" |
#include "wtf/RefCountedLeakCounter.h" |
+#include "wtf/SizeAssertions.h" |
#include "wtf/text/StringBuilder.h" |
#include "wtf/text/WTFString.h" |
#include <algorithm> |
@@ -107,6 +108,8 @@ static bool gDisablePaintInvalidationStateAsserts = false; |
using namespace HTMLNames; |
+ASSERT_SIZE(LayoutObject, 56, 80); |
+ |
const LayoutUnit& caretWidth() |
{ |
static LayoutUnit gCaretWidth(1); |
@@ -114,7 +117,6 @@ const LayoutUnit& caretWidth() |
} |
#if ENABLE(ASSERT) |
- |
LayoutObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope(LayoutObject& layoutObject) |
: m_layoutObject(layoutObject) |
, m_preexistingForbidden(m_layoutObject.isSetNeedsLayoutForbidden()) |
@@ -128,20 +130,6 @@ LayoutObject::SetLayoutNeededForbiddenScope::~SetLayoutNeededForbiddenScope() |
} |
#endif |
-struct SameSizeAsLayoutObject { |
- virtual ~SameSizeAsLayoutObject() { } // Allocate vtable pointer. |
- void* pointers[5]; |
-#if ENABLE(ASSERT) |
- unsigned m_debugBitfields : 2; |
-#endif |
- unsigned m_bitfields; |
- unsigned m_bitfields2; |
- LayoutRect rect; // Stores the previous paint invalidation rect. |
- LayoutPoint position; // Stores the previous position from the paint invalidation container. |
-}; |
- |
-static_assert(sizeof(LayoutObject) == sizeof(SameSizeAsLayoutObject), "LayoutObject should stay small"); |
- |
bool LayoutObject::s_affectsParentBlock = false; |
typedef HashMap<const LayoutObject*, LayoutRect> SelectionPaintInvalidationMap; |