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

Unified Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp

Issue 2324083002: Added ASSERT_SIZE checks to CSSValueList and CSSPrimitiveValue (Closed)
Patch Set: Changed void* to double in SameSizeAs check for PrimitiveValue Created 4 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 | « no previous file | third_party/WebKit/Source/core/css/CSSValueList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
index 5c2dcb865baf8ea3c9a4516375d6301fc305d6eb..eb5a04daf6ae195bc5252f350737f95a68b2d6d7 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
@@ -26,6 +26,7 @@
#include "core/css/CSSToLengthConversionData.h"
#include "core/css/CSSValuePool.h"
#include "platform/LayoutUnit.h"
+#include "wtf/SizeAssertions.h"
#include "wtf/StdLibExtras.h"
using namespace WTF;
@@ -41,6 +42,11 @@ const int minValueForCssLength = INT_MIN / kFixedPointDenominator + 2;
} // namespace
+struct SameSizeAsCSSPrimitiveValue : CSSValue {
+ double num;
+};
+ASSERT_SIZE(CSSPrimitiveValue, SameSizeAsCSSPrimitiveValue);
+
float CSSPrimitiveValue::clampToCSSLengthRange(double value)
{
return clampTo<float>(value, minValueForCssLength, maxValueForCssLength);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSValueList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698