Bug 1617472 - Use enums for text-align / text-align-last. r=jfkthame
This also fixes some backwards logic in nsBlockFrame::ReflowDirtyLines, and adds some static assertions to nsGenericHTMLElement that almost cause a very subtle bug. Depends on D63792 Differential Revision: https://phabricator.services.mozilla.com/D63793
This commit is contained in:
@@ -863,8 +863,8 @@ void HTMLTableElement::MapAttributesIntoRule(
|
||||
// illegal)
|
||||
value = aAttributes->GetAttr(nsGkAtoms::align);
|
||||
if (value && value->Type() == nsAttrValue::eEnum) {
|
||||
if (value->GetEnumValue() == NS_STYLE_TEXT_ALIGN_CENTER ||
|
||||
value->GetEnumValue() == NS_STYLE_TEXT_ALIGN_MOZ_CENTER) {
|
||||
if (value->GetEnumValue() == uint8_t(StyleTextAlign::Center) ||
|
||||
value->GetEnumValue() == uint8_t(StyleTextAlign::MozCenter)) {
|
||||
aDecls.SetAutoValueIfUnset(eCSSProperty_margin_left);
|
||||
aDecls.SetAutoValueIfUnset(eCSSProperty_margin_right);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user