Bug 1334330 - Part 4: stylo: Use GenericSpecifiedValue abstraction for <br>; r=bz,emilio

MozReview-Commit-ID: LjoqZ5R8tNb
This commit is contained in:
Manish Goregaokar
2017-01-26 16:51:01 -08:00
parent 2d1e54b302
commit a1fe121f74

View File

@@ -53,19 +53,17 @@ HTMLBRElement::ParseAttribute(int32_t aNamespaceID,
void
HTMLBRElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
GenericSpecifiedValues* aGenericData)
GenericSpecifiedValues* aData)
{
nsRuleData* aData = aGenericData->AsRuleData();
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Display)) {
nsCSSValue* clear = aData->ValueForClear();
if (clear->GetUnit() == eCSSUnit_Null) {
if (aData->ShouldComputeStyleStruct(NS_STYLE_INHERIT_BIT(Display))) {
if (!aData->PropertyIsSet(eCSSProperty_clear)) {
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::clear);
if (value && value->Type() == nsAttrValue::eEnum)
clear->SetIntValue(value->GetEnumValue(), eCSSUnit_Enumerated);
aData->SetKeywordValue(eCSSProperty_clear, value->GetEnumValue());
}
}
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aGenericData);
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
}
NS_IMETHODIMP_(bool)