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

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

Issue 2887333003: Generate StyleRareInheritedData in ComputedStyleBase. (Closed)
Patch Set: Rebase 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
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | 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 b83b1bd63d5b8abc2220f2117ffdb5df408951b0..cd2e1f48feaf7c2722bc8028abc8fd2cce488091 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -72,11 +72,11 @@ ASSERT_SIZE(BorderValue, SameSizeAsBorderValue);
// re-create the same structure for an accurate size comparison.
struct SameSizeAsComputedStyle : public RefCounted<SameSizeAsComputedStyle> {
struct ComputedStyleBase {
- void* data_refs[5];
+ void* data_refs[6];
unsigned bitfields_[4];
} base_;
- void* data_refs[2];
+ void* data_refs[1];
void* own_ptrs[1];
void* data_ref_svg_style;
};
@@ -138,7 +138,6 @@ ALWAYS_INLINE ComputedStyle::ComputedStyle()
rare_non_inherited_data_.Access()->grid_.Init();
rare_non_inherited_data_.Access()->grid_item_.Init();
rare_non_inherited_data_.Access()->scroll_snap_.Init();
- rare_inherited_data_.Init();
svg_style_.Init();
}
@@ -146,7 +145,6 @@ ALWAYS_INLINE ComputedStyle::ComputedStyle(const ComputedStyle& o)
: ComputedStyleBase(o),
RefCounted<ComputedStyle>(),
rare_non_inherited_data_(o.rare_non_inherited_data_),
- rare_inherited_data_(o.rare_inherited_data_),
svg_style_(o.svg_style_) {}
static StyleRecalcChange DiffPseudoStyles(const ComputedStyle& old_style,
@@ -322,7 +320,6 @@ void ComputedStyle::InheritFrom(const ComputedStyle& inherit_parent,
EUserModify current_user_modify = UserModify();
ComputedStyleBase::InheritFrom(inherit_parent, is_at_shadow_boundary);
- rare_inherited_data_ = inherit_parent.rare_inherited_data_;
if (svg_style_ != inherit_parent.svg_style_)
svg_style_.Access()->InheritFrom(inherit_parent.svg_style_.Get());
@@ -462,8 +459,7 @@ bool ComputedStyle::IndependentInheritedEqual(
bool ComputedStyle::NonIndependentInheritedEqual(
const ComputedStyle& other) const {
return ComputedStyleBase::NonIndependentInheritedEqual(other) &&
- svg_style_->InheritedEqual(*other.svg_style_) &&
- rare_inherited_data_ == other.rare_inherited_data_;
+ svg_style_->InheritedEqual(*other.svg_style_);
}
bool ComputedStyle::LoadingCustomFontsEqual(const ComputedStyle& other) const {
@@ -480,8 +476,7 @@ bool ComputedStyle::NonInheritedEqual(const ComputedStyle& other) const {
bool ComputedStyle::InheritedDataShared(const ComputedStyle& other) const {
// This is a fast check that only looks if the data structures are shared.
return ComputedStyleBase::InheritedDataShared(other) &&
- svg_style_.Get() == other.svg_style_.Get() &&
- rare_inherited_data_.Get() == other.rare_inherited_data_.Get();
+ svg_style_.Get() == other.svg_style_.Get();
}
static bool DependenceOnContentHeightHasChanged(const ComputedStyle& a,
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698