Bug 1334330 - Part 5: stylo: Use GenericSpecifiedValue abstraction for <li>,<pre>,<ol>,<ul>,<textarea>; r=bz,emilio
MozReview-Commit-ID: JQaa26ay5va
This commit is contained in:
@@ -113,25 +113,23 @@ HTMLSharedElement::ParseAttribute(int32_t aNamespaceID,
|
||||
|
||||
static void
|
||||
DirectoryMapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
GenericSpecifiedValues* aGenericData)
|
||||
GenericSpecifiedValues* aData)
|
||||
{
|
||||
nsRuleData* aData = aGenericData->AsRuleData();
|
||||
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(List)) {
|
||||
nsCSSValue* listStyleType = aData->ValueForListStyleType();
|
||||
if (listStyleType->GetUnit() == eCSSUnit_Null) {
|
||||
if (aData->ShouldComputeStyleStruct(NS_STYLE_INHERIT_BIT(List))) {
|
||||
if (!aData->PropertyIsSet(eCSSProperty_list_style_type)) {
|
||||
// type: enum
|
||||
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::type);
|
||||
if (value) {
|
||||
if (value->Type() == nsAttrValue::eEnum) {
|
||||
listStyleType->SetIntValue(value->GetEnumValue(), eCSSUnit_Enumerated);
|
||||
aData->SetKeywordValue(eCSSProperty_list_style_type, value->GetEnumValue());
|
||||
} else {
|
||||
listStyleType->SetIntValue(NS_STYLE_LIST_STYLE_DISC, eCSSUnit_Enumerated);
|
||||
aData->SetKeywordValue(eCSSProperty_list_style_type, NS_STYLE_LIST_STYLE_DISC);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aGenericData);
|
||||
nsGenericHTMLElement::MapCommonAttributesInto(aAttributes, aData);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(bool)
|
||||
|
||||
Reference in New Issue
Block a user