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

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

Issue 2716813002: Remove inheritance on SameSizeAsComputedStyle. (Closed)
Patch Set: Change comments Created 3 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 08720ae4b90cfe764ad1910260a44adf9e7d3fff..e51852c27cc3bd0c3f8689b3f7c0df5cf1295862 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -70,8 +70,11 @@ ASSERT_SIZE(BorderValue, SameSizeAsBorderValue);
// Since different compilers/architectures pack ComputedStyle differently,
// re-create the same structure for an accurate size comparison.
-struct SameSizeAsComputedStyle : public ComputedStyleBase,
- public RefCounted<ComputedStyle> {
+struct SameSizeAsComputedStyle : public RefCounted<SameSizeAsComputedStyle> {
+ struct ComputedStyleBase {
+ unsigned m_bitfields[3];
+ } m_base;
+
void* dataRefs[7];
void* ownPtrs[1];
void* dataRefSvgStyle;
@@ -85,6 +88,10 @@ struct SameSizeAsComputedStyle : public ComputedStyleBase,
} m_nonInheritedData;
};
+// 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
+// ComputedStyle.
ASSERT_SIZE(ComputedStyle, SameSizeAsComputedStyle);
PassRefPtr<ComputedStyle> ComputedStyle::create() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698