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

Unified Diff: Source/core/layout/LayoutBlockFlow.cpp

Issue 1317143005: [WIP] do something :-) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698