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:
@@ -1263,12 +1263,14 @@ void nsTreeBodyFrame::AdjustForCellText(nsAutoString& aText, int32_t aRowIndex,
|
||||
aRenderingContext);
|
||||
|
||||
switch (aColumn->GetTextAlignment()) {
|
||||
case NS_STYLE_TEXT_ALIGN_RIGHT: {
|
||||
case mozilla::StyleTextAlign::Right:
|
||||
aTextRect.x += aTextRect.width - width;
|
||||
} break;
|
||||
case NS_STYLE_TEXT_ALIGN_CENTER: {
|
||||
break;
|
||||
case mozilla::StyleTextAlign::Center:
|
||||
aTextRect.x += (aTextRect.width - width) / 2;
|
||||
} break;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
aTextRect.width = width;
|
||||
|
||||
Reference in New Issue
Block a user