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

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

Issue 2840503002: Generate StyleInheritedData 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 8481abe7d32b5698d1e82738094ec3a2993e13da..301d986a51c91324af8296c19f547107bb8a7a0e 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -71,11 +71,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[4];
+ void* data_refs[5];
unsigned bitfields_[4];
} base_;
- void* data_refs[3];
+ void* data_refs[2];
void* own_ptrs[1];
void* data_ref_svg_style;
};
@@ -131,7 +131,6 @@ ALWAYS_INLINE ComputedStyle::ComputedStyle()
rare_non_inherited_data_.Access()->grid_item_.Init();
rare_non_inherited_data_.Access()->scroll_snap_.Init();
rare_inherited_data_.Init();
- inherited_data_.Init();
svg_style_.Init();
}
@@ -140,7 +139,6 @@ ALWAYS_INLINE ComputedStyle::ComputedStyle(const ComputedStyle& o)
RefCounted<ComputedStyle>(),
rare_non_inherited_data_(o.rare_non_inherited_data_),
rare_inherited_data_(o.rare_inherited_data_),
- inherited_data_(o.inherited_data_),
svg_style_(o.svg_style_) {}
static StyleRecalcChange DiffPseudoStyles(const ComputedStyle& old_style,
@@ -317,7 +315,6 @@ void ComputedStyle::InheritFrom(const ComputedStyle& inherit_parent,
ComputedStyleBase::InheritFrom(inherit_parent, is_at_shadow_boundary);
rare_inherited_data_ = inherit_parent.rare_inherited_data_;
- inherited_data_ = inherit_parent.inherited_data_;
if (svg_style_ != inherit_parent.svg_style_)
svg_style_.Access()->InheritFrom(inherit_parent.svg_style_.Get());
@@ -457,7 +454,6 @@ bool ComputedStyle::IndependentInheritedEqual(
bool ComputedStyle::NonIndependentInheritedEqual(
const ComputedStyle& other) const {
return ComputedStyleBase::NonIndependentInheritedEqual(other) &&
- inherited_data_ == other.inherited_data_ &&
svg_style_->InheritedEqual(*other.svg_style_) &&
rare_inherited_data_ == other.rare_inherited_data_;
}
@@ -476,7 +472,6 @@ 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) &&
- inherited_data_.Get() == other.inherited_data_.Get() &&
svg_style_.Get() == other.svg_style_.Get() &&
rare_inherited_data_.Get() == other.rare_inherited_data_.Get();
}
« 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