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

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

Issue 2716813002: Remove inheritance on SameSizeAsComputedStyle. (Closed)
Patch Set: Add comment 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..cfac92a8ce86e3a8b2830cc66b18eb67a88b4b4a 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,9 @@ struct SameSizeAsComputedStyle : public ComputedStyleBase,
} m_nonInheritedData;
};
+// If this assert fails, it means that size of ComputedStyle has changed. Please
+// update the SameSizeAsComputedStyle struct to mirror the updated storage of
sashab 2017/02/24 06:05:41 Check that you really *do* want to increase the si
esprehn 2017/02/24 17:59:48 Word.
shend 2017/02/27 19:36:44 Done.
+// 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