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

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 39005f6f113dcdafee63cb29eda6253930d8d8bb..f2cc6d2e32b1657ce3f2ab36b8f372bc8c3f0bd4 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();
@@ -139,7 +138,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,
@@ -319,7 +317,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.
@@ -444,7 +441,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_);
}

Powered by Google App Engine
This is Rietveld 408576698