Investigate using a separate enum to represent legend align="" values




CSS Parsing and Computation
a year ago
a year ago


(Reporter: jeremychen, Unassigned)


(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)


Per bug 1341018 comment 4, 

> One thing to note is that these values as used for <legend align="">
> attribute parsing are not then used as values for text-align or
> vertical-align themselves, or in functions that work on those values for
> layout.  Instead it looks like we just do some switching on the values:
> 12cf11303392edac9f1da0c02e3d9ad2ecc8f4d3/layout/forms/nsFieldSetFrame.
> cpp#514-536
> This makes me think that we should be using a separate enum to represent
> legend align="" values, rather than trying to re-use the style consts or
> enums for text-align and vertical-align.
> Note also that nsFieldSetFrame here is working on values as returned by
> GetLogicalAlign(), which converts NS_STYLE_TEXT_ALIGN_{LEFT,RIGHT} into
> NS_STYLE_TEST_ALIGN_{START,END}.  So if we had a separate enum to represent
> values of <legend align=""> then we have to add the two logical values
> (Start and End) or perhaps have a separate enum for the complete set of
> logical align="" values (Start, End, Center, Top, Bottom).
> Unfortunately, nsAttrValue doesn't support storage of attributes values as
> enum classes -- nsAttrValue::EnumTable has values stored as int16_ts.

We have to get this thing done before removing/converting property values for text-align/text-align-last/vertical-align.
Blocks: 1341018


a year ago
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.