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 {
bool is_set_from_shorthand,
int index_in_shorthands_vector,
bool important,
bool implicit,
bool inherited)
bool implicit)
: property_(&property),
is_set_from_shorthand_(is_set_from_shorthand),
index_in_shorthands_vector_(index_in_shorthands_vector),
important_(important),
implicit_(implicit),
inherited_(inherited) {}
implicit_(implicit) {}
CSSPropertyID ShorthandID() const;
const CSSProperty& Property() const { return *property_; }
......@@ -57,7 +55,6 @@ struct CSSPropertyValueMetadata {
// Whether or not the property was set implicitly as the result of a
// shorthand.
unsigned implicit_ : 1;
unsigned inherited_ : 1;
};
class CORE_EXPORT CSSPropertyValue {
......@@ -74,8 +71,7 @@ class CORE_EXPORT CSSPropertyValue {
is_set_from_shorthand,
index_in_shorthands_vector,
important,
implicit,
property.IsInherited()),
implicit),
value_(value) {}
// FIXME: Remove this.
......
......@@ -72,7 +72,6 @@ class CORE_EXPORT CSSPropertyValueSet
CSSPropertyName Name() const;
bool IsImportant() const { return PropertyMetadata().important_; }
bool IsInherited() const { return PropertyMetadata().inherited_; }
bool IsImplicit() const { return PropertyMetadata().implicit_; }
const CSSValue& Value() const { return PropertyValue(); }
......
......@@ -89,29 +89,23 @@ class StylePropertySerializer {
CSSPropertyValueSet::PropertyReference property)
: value_(&property.Value()),
property_(property.Property()),
is_important_(property.IsImportant()),
is_inherited_(property.IsInherited()) {}
is_important_(property.IsImportant()) {}
// TODO(sashab): Make this take a const CSSValue&.
PropertyValueForSerializer(const CSSProperty& property,
const CSSValue* value,
bool is_important)
: value_(value),
property_(property),
is_important_(is_important),
is_inherited_(value->IsInheritedValue()) {}
: value_(value), property_(property), is_important_(is_important) {}
const CSSProperty& Property() const { return property_; }
const CSSValue* Value() const { return value_; }
bool IsImportant() const { return is_important_; }
bool IsInherited() const { return is_inherited_; }
bool IsValid() const { return value_; }
private:
const CSSValue* value_;
const CSSProperty& property_;
bool is_important_;
bool is_inherited_;
};
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