Bug 1449798 - Remove GenericSpecifiedValues::ShouldComputeStyleStruct and mSIDs. r=emilio
This was useful because nsRuleData in the old style system may not hold all the data, but the only subclass ServoSpecifiedValues is always able to hold any data, and thus passes NS_STYLE_INHERIT_MASK to mSIDS. Given this, this method and mSIDs seems to be useless and can be removed. MozReview-Commit-ID: 4vWcV4DRS2i
This commit is contained in:
@@ -84,21 +84,19 @@ void
|
||||
HTMLIFrameElement::MapAttributesIntoRule(const nsMappedAttributes* aAttributes,
|
||||
GenericSpecifiedValues* aData)
|
||||
{
|
||||
if (aData->ShouldComputeStyleStruct(NS_STYLE_INHERIT_BIT(Border))) {
|
||||
// frameborder: 0 | 1 (| NO | YES in quirks mode)
|
||||
// If frameborder is 0 or No, set border to 0
|
||||
// else leave it as the value set in html.css
|
||||
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::frameborder);
|
||||
if (value && value->Type() == nsAttrValue::eEnum) {
|
||||
int32_t frameborder = value->GetEnumValue();
|
||||
if (NS_STYLE_FRAME_0 == frameborder ||
|
||||
NS_STYLE_FRAME_NO == frameborder ||
|
||||
NS_STYLE_FRAME_OFF == frameborder) {
|
||||
aData->SetPixelValueIfUnset(eCSSProperty_border_top_width, 0.0f);
|
||||
aData->SetPixelValueIfUnset(eCSSProperty_border_right_width, 0.0f);
|
||||
aData->SetPixelValueIfUnset(eCSSProperty_border_bottom_width, 0.0f);
|
||||
aData->SetPixelValueIfUnset(eCSSProperty_border_left_width, 0.0f);
|
||||
}
|
||||
// frameborder: 0 | 1 (| NO | YES in quirks mode)
|
||||
// If frameborder is 0 or No, set border to 0
|
||||
// else leave it as the value set in html.css
|
||||
const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::frameborder);
|
||||
if (value && value->Type() == nsAttrValue::eEnum) {
|
||||
int32_t frameborder = value->GetEnumValue();
|
||||
if (NS_STYLE_FRAME_0 == frameborder ||
|
||||
NS_STYLE_FRAME_NO == frameborder ||
|
||||
NS_STYLE_FRAME_OFF == frameborder) {
|
||||
aData->SetPixelValueIfUnset(eCSSProperty_border_top_width, 0.0f);
|
||||
aData->SetPixelValueIfUnset(eCSSProperty_border_right_width, 0.0f);
|
||||
aData->SetPixelValueIfUnset(eCSSProperty_border_bottom_width, 0.0f);
|
||||
aData->SetPixelValueIfUnset(eCSSProperty_border_left_width, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user