Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp |
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
index 6ffa36a18ecac80713d9b4ba8f05ea7370791bce..b0ed0f1560e1c4e6d488d12b1ac5efbdabf506f4 100644 |
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
@@ -80,6 +80,76 @@ struct SameSizeAsComputedStyle : public RefCounted<SameSizeAsComputedStyle> { |
void* data_ref_svg_style; |
}; |
+/* Length */ |
+struct AlignmentSizeLength { |
+ char v; /* aligned to float */ |
+ Length data; |
+}; |
+static_assert(sizeof(AlignmentSizeLength) == sizeof(float) + sizeof(Length), |
+ "Alignment of Length is incorrect"); |
+ |
+/* LengthBox */ |
+struct AlignmentSizeLengthBox { |
+ char v; /* aligned to float */ |
+ LengthBox data; |
+}; |
+static_assert(sizeof(AlignmentSizeLengthBox) == |
+ sizeof(float) + sizeof(LengthBox), |
+ "Alignment of LengthBox is incorrect"); |
+ |
+/* Color */ |
+struct AlignmentSizeColor { |
+ char v; /* aligned to unsigned */ |
+ Color data; |
+}; |
+static_assert(sizeof(AlignmentSizeColor) == sizeof(unsigned) + sizeof(Color), |
+ "Alignment of Color is incorrect"); |
+ |
+/* BorderValue */ |
+struct AlignmentSizeBorderValue { |
+ char v; /* aligned to unsigned */ |
+ BorderValue data; |
+}; |
+static_assert(sizeof(AlignmentSizeBorderValue) == |
+ sizeof(unsigned) + sizeof(BorderValue), |
+ "Alignment of BorderValue is incorrect"); |
+ |
+/* NinePieceImage */ |
+struct AlignmentSizeNinePieceImage { |
+ char v; /* aligned to void* */ |
+ NinePieceImage data; |
+}; |
+static_assert(sizeof(AlignmentSizeNinePieceImage) == |
+ sizeof(void*) + sizeof(NinePieceImage), |
+ "Alignment of NinePieceImage is incorrect"); |
+ |
+/* LengthSize */ |
+struct AlignmentSizeLengthSize { |
+ char v; /* aligned to float */ |
+ LengthSize data; |
+}; |
+static_assert(sizeof(AlignmentSizeLengthSize) == |
+ sizeof(float) + sizeof(LengthSize), |
+ "Alignment of LengthSize is incorrect"); |
+ |
+/* BorderData */ |
+struct AlignmentSizeBorderData { |
+ char v; /* aligned to void* */ |
+ BorderData data; |
+}; |
+static_assert(sizeof(AlignmentSizeBorderData) == |
+ sizeof(void*) + sizeof(BorderData), |
+ "Alignment of BorderData is incorrect"); |
+ |
+/* FillLayer */ |
+struct AlignmentSizeFillLayer { |
+ char v; /* aligned to void* */ |
+ FillLayer data; |
+}; |
+static_assert(sizeof(AlignmentSizeFillLayer) == |
+ sizeof(void*) + sizeof(FillLayer), |
+ "Alignment of FillLayer is incorrect"); |
+ |
// If this assert fails, it means that size of ComputedStyle has changed. Please |
// check that you really *do* what to increase the size of ComputedStyle, then |
// update the SameSizeAsComputedStyle struct to match the updated storage of |