Index: Source/core/layout/LayoutBlockFlow.cpp |
diff --git a/Source/core/layout/LayoutBlockFlow.cpp b/Source/core/layout/LayoutBlockFlow.cpp |
index fe9339df5d8e2767186d1a764933139a4662d2e6..b1c0764f63008768ec0f17f46c531bf117b8001e 100644 |
--- a/Source/core/layout/LayoutBlockFlow.cpp |
+++ b/Source/core/layout/LayoutBlockFlow.cpp |
@@ -57,17 +57,13 @@ |
#include "platform/RuntimeEnabledFeatures.h" |
#include "platform/geometry/TransformState.h" |
#include "platform/text/BidiTextRun.h" |
+#include "wtf/SizeAssertions.h" |
namespace blink { |
-bool LayoutBlockFlow::s_canPropagateFloatIntoSibling = false; |
- |
-struct SameSizeAsMarginInfo { |
- uint16_t bitfields; |
- LayoutUnit margins[2]; |
-}; |
+ASSERT_SIZE(LayoutBlockFlow::MarginValues, 16, 16); |
-static_assert(sizeof(LayoutBlockFlow::MarginValues) == sizeof(LayoutUnit[4]), "MarginValues should stay small"); |
+bool LayoutBlockFlow::s_canPropagateFloatIntoSibling = false; |
class MarginInfo { |
// Collapsing flags for whether we can collapse our margins with our children's margins. |
@@ -153,6 +149,9 @@ public: |
void setLastChildIsSelfCollapsingBlockWithClearance(bool value) { m_lastChildIsSelfCollapsingBlockWithClearance = value; } |
bool lastChildIsSelfCollapsingBlockWithClearance() const { return m_lastChildIsSelfCollapsingBlockWithClearance; } |
}; |
+ |
+ASSERT_SIZE(MarginInfo, 12, 12); |
+ |
static bool inNormalFlow(LayoutBox* child) |
{ |
LayoutBlock* curr = child->containingBlock(); |
@@ -170,7 +169,6 @@ static bool inNormalFlow(LayoutBox* child) |
LayoutBlockFlow::LayoutBlockFlow(ContainerNode* node) |
: LayoutBlock(node) |
{ |
- static_assert(sizeof(MarginInfo) == sizeof(SameSizeAsMarginInfo), "MarginInfo should stay small"); |
setChildrenInline(true); |
} |