Commit d92ac156 authored by Anders Hartvoll Ruud's avatar Anders Hartvoll Ruud Committed by Commit Bot

Remove inherited flags

We maintain 'inherited' flags in many places, but they are not used by
anything, so let's remove them.

Change-Id: I9b7e86a85ae1d96a4213a835ea1242d758a277e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2320611Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792593}
parent 3b58d069
...@@ -35,14 +35,12 @@ struct CSSPropertyValueMetadata { ...@@ -35,14 +35,12 @@ struct CSSPropertyValueMetadata {
bool is_set_from_shorthand, bool is_set_from_shorthand,
int index_in_shorthands_vector, int index_in_shorthands_vector,
bool important, bool important,
bool implicit, bool implicit)
bool inherited)
: property_(&property), : property_(&property),
is_set_from_shorthand_(is_set_from_shorthand), is_set_from_shorthand_(is_set_from_shorthand),
index_in_shorthands_vector_(index_in_shorthands_vector), index_in_shorthands_vector_(index_in_shorthands_vector),
important_(important), important_(important),
implicit_(implicit), implicit_(implicit) {}
inherited_(inherited) {}
CSSPropertyID ShorthandID() const; CSSPropertyID ShorthandID() const;
const CSSProperty& Property() const { return *property_; } const CSSProperty& Property() const { return *property_; }
...@@ -57,7 +55,6 @@ struct CSSPropertyValueMetadata { ...@@ -57,7 +55,6 @@ struct CSSPropertyValueMetadata {
// Whether or not the property was set implicitly as the result of a // Whether or not the property was set implicitly as the result of a
// shorthand. // shorthand.
unsigned implicit_ : 1; unsigned implicit_ : 1;
unsigned inherited_ : 1;
}; };
class CORE_EXPORT CSSPropertyValue { class CORE_EXPORT CSSPropertyValue {
...@@ -74,8 +71,7 @@ class CORE_EXPORT CSSPropertyValue { ...@@ -74,8 +71,7 @@ class CORE_EXPORT CSSPropertyValue {
is_set_from_shorthand, is_set_from_shorthand,
index_in_shorthands_vector, index_in_shorthands_vector,
important, important,
implicit, implicit),
property.IsInherited()),
value_(value) {} value_(value) {}
// FIXME: Remove this. // FIXME: Remove this.
......
...@@ -72,7 +72,6 @@ class CORE_EXPORT CSSPropertyValueSet ...@@ -72,7 +72,6 @@ class CORE_EXPORT CSSPropertyValueSet
CSSPropertyName Name() const; CSSPropertyName Name() const;
bool IsImportant() const { return PropertyMetadata().important_; } bool IsImportant() const { return PropertyMetadata().important_; }
bool IsInherited() const { return PropertyMetadata().inherited_; }
bool IsImplicit() const { return PropertyMetadata().implicit_; } bool IsImplicit() const { return PropertyMetadata().implicit_; }
const CSSValue& Value() const { return PropertyValue(); } const CSSValue& Value() const { return PropertyValue(); }
......
...@@ -89,29 +89,23 @@ class StylePropertySerializer { ...@@ -89,29 +89,23 @@ class StylePropertySerializer {
CSSPropertyValueSet::PropertyReference property) CSSPropertyValueSet::PropertyReference property)
: value_(&property.Value()), : value_(&property.Value()),
property_(property.Property()), property_(property.Property()),
is_important_(property.IsImportant()), is_important_(property.IsImportant()) {}
is_inherited_(property.IsInherited()) {}
// TODO(sashab): Make this take a const CSSValue&. // TODO(sashab): Make this take a const CSSValue&.
PropertyValueForSerializer(const CSSProperty& property, PropertyValueForSerializer(const CSSProperty& property,
const CSSValue* value, const CSSValue* value,
bool is_important) bool is_important)
: value_(value), : value_(value), property_(property), is_important_(is_important) {}
property_(property),
is_important_(is_important),
is_inherited_(value->IsInheritedValue()) {}
const CSSProperty& Property() const { return property_; } const CSSProperty& Property() const { return property_; }
const CSSValue* Value() const { return value_; } const CSSValue* Value() const { return value_; }
bool IsImportant() const { return is_important_; } bool IsImportant() const { return is_important_; }
bool IsInherited() const { return is_inherited_; }
bool IsValid() const { return value_; } bool IsValid() const { return value_; }
private: private:
const CSSValue* value_; const CSSValue* value_;
const CSSProperty& property_; const CSSProperty& property_;
bool is_important_; bool is_important_;
bool is_inherited_;
}; };
String GetCustomPropertyText(const PropertyValueForSerializer&, String GetCustomPropertyText(const PropertyValueForSerializer&,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment