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

Unified Diff: third_party/WebKit/Source/core/css/StyleRule.cpp

Issue 2833883002: Reduce StyleRule class size by eliminating padding in the layout. (Closed)
Patch Set: Created 3 years, 8 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/css/StyleRule.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/css/StyleRule.cpp
diff --git a/third_party/WebKit/Source/core/css/StyleRule.cpp b/third_party/WebKit/Source/core/css/StyleRule.cpp
index 95c1c64e24252d9c31ddbb63db57ec885c3589a4..bcc1c054f2aa0e4066f08634134b1284e2dc05c6 100644
--- a/third_party/WebKit/Source/core/css/StyleRule.cpp
+++ b/third_party/WebKit/Source/core/css/StyleRule.cpp
@@ -211,16 +211,16 @@ unsigned StyleRule::AverageSizeInBytes() {
StyleRule::StyleRule(CSSSelectorList selector_list,
StylePropertySet* properties)
: StyleRuleBase(kStyle),
+ should_consider_for_matching_rules_(kConsiderIfNonEmpty),
selector_list_(std::move(selector_list)),
- properties_(properties),
- should_consider_for_matching_rules_(kConsiderIfNonEmpty) {}
+ properties_(properties) {}
StyleRule::StyleRule(CSSSelectorList selector_list,
CSSLazyPropertyParser* lazy_property_parser)
: StyleRuleBase(kStyle),
+ should_consider_for_matching_rules_(kAlwaysConsider),
selector_list_(std::move(selector_list)),
- lazy_property_parser_(lazy_property_parser),
- should_consider_for_matching_rules_(kAlwaysConsider) {}
+ lazy_property_parser_(lazy_property_parser) {}
const StylePropertySet& StyleRule::Properties() const {
if (!properties_) {
@@ -232,9 +232,9 @@ const StylePropertySet& StyleRule::Properties() const {
StyleRule::StyleRule(const StyleRule& o)
: StyleRuleBase(o),
+ should_consider_for_matching_rules_(kConsiderIfNonEmpty),
selector_list_(o.selector_list_.Copy()),
- properties_(o.Properties().MutableCopy()),
- should_consider_for_matching_rules_(kConsiderIfNonEmpty) {}
+ properties_(o.Properties().MutableCopy()) {}
StyleRule::~StyleRule() {}
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleRule.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698