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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2879813002: Make ComputedStyleBase a templated class to allow it to use functions on ComputedStyle (Closed)
Patch Set: alancutter@'s suggestions Created 3 years, 7 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
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 56d1acbf7857b734517687b151f9fe8a33157107..7a9971e82a4727cf7f997e85f882be0fa6f5ffa9 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -81,6 +81,11 @@ struct SameSizeAsComputedStyle : public RefCounted<SameSizeAsComputedStyle> {
void* data_ref_svg_style;
};
+// If this fails, the packing algorithm in make_computed_style_base.py has
+// failed to produce the optimal packed size. To fix, update the algorithm to
+// ensure that the buckets are placed so that each takes up at most 1 word.
+ASSERT_SIZE(ComputedStyleBase<ComputedStyle>, SameSizeAsComputedStyleBase);
+
// 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

Powered by Google App Engine
This is Rietveld 408576698