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

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

Issue 2923333002: Generate StyleRareNonInheritedData in ComputedStyleBase. (Closed)
Patch Set: Rebase Created 3 years, 6 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 6edef9a9e0e459b9c6d63e30ad81af0b1ea865d1..1125edfb810c2f9ad03bb2d47b7aa784c22e5bff 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -72,11 +72,10 @@ ASSERT_SIZE(BorderValue, SameSizeAsBorderValue);
// re-create the same structure for an accurate size comparison.
struct SameSizeAsComputedStyle : public RefCounted<SameSizeAsComputedStyle> {
struct ComputedStyleBase {
- void* data_refs[6];
+ void* data_refs[7];
unsigned bitfields_[4];
} base_;
- void* data_refs[1];
void* own_ptrs[1];
void* data_ref_svg_style;
};
@@ -122,7 +121,7 @@ RefPtr<ComputedStyle> ComputedStyle::Clone(const ComputedStyle& other) {
ALWAYS_INLINE ComputedStyle::ComputedStyle()
: ComputedStyleBase(), RefCounted<ComputedStyle>() {
- rare_non_inherited_data_.Init();
+ // TODO(shend): Generate these.
rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Init();
rare_non_inherited_data_.Access()->flexible_box_data_.Init();
rare_non_inherited_data_.Access()->multi_col_data_.Init();
@@ -137,7 +136,6 @@ ALWAYS_INLINE ComputedStyle::ComputedStyle()
ALWAYS_INLINE ComputedStyle::ComputedStyle(const ComputedStyle& o)
: ComputedStyleBase(o),
RefCounted<ComputedStyle>(),
- rare_non_inherited_data_(o.rare_non_inherited_data_),
svg_style_(o.svg_style_) {}
static StyleRecalcChange DiffPseudoStyles(const ComputedStyle& old_style,
@@ -317,7 +315,6 @@ void ComputedStyle::CopyNonInheritedFromCached(const ComputedStyle& other) {
DCHECK(MatchedPropertiesCache::IsStyleCacheable(other));
ComputedStyleBase::CopyNonInheritedFromCached(other);
- rare_non_inherited_data_ = other.rare_non_inherited_data_;
// The flags are copied one-by-one because they contain
// bunch of stuff other than real style data.
@@ -442,7 +439,6 @@ bool ComputedStyle::LoadingCustomFontsEqual(const ComputedStyle& other) const {
bool ComputedStyle::NonInheritedEqual(const ComputedStyle& other) const {
// compare everything except the pseudoStyle pointer
return ComputedStyleBase::NonInheritedEqual(other) &&
- rare_non_inherited_data_ == other.rare_non_inherited_data_ &&
svg_style_->NonInheritedEqual(*other.svg_style_);
}
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/DataPersistent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698