blob: 33c74d4eb4d2cdaa04e01813b0f7ec248c27ee6c [file] [log] [blame]
{% from 'macros.tmpl' import license %}
{{license()}}
#include "core/ComputedStyleBase.h"
namespace blink {
void ComputedStyleBase::inheritFrom(const ComputedStyleBase& inheritParent,
IsAtShadowBoundary isAtShadowBoundary) {
{% for field in fields if field.is_enum and field.property['inherited'] %}
{{field.name}} = inheritParent.{{field.name}};
{% endfor %}
}
void ComputedStyleBase::copyNonInheritedFromCached(
const ComputedStyleBase& other) {
{% for field in fields if (field.is_enum and not field.property['inherited']) or field.is_inherited_flag %}
{{field.name}} = other.{{field.name}};
{% endfor %}
}
void ComputedStyleBase::propagateIndependentInheritedProperties(
const ComputedStyleBase& parentStyle) {
{% for field in fields if field.is_enum and field.property['independent'] %}
if ({{field.is_inherited_method_name}}())
{{field.setter_method_name}}(parentStyle.{{field.getter_method_name}}());
{% endfor %}
}
} // namespace blink