Open Bug 1563415 (de-xul-elements) Opened 5 years ago Updated 1 year ago

[meta] Start using HTML elements to replace XUL elements

Categories

(Toolkit :: XUL Widgets, task)

task

Tracking

()

People

(Reporter: ntim, Unassigned)

References

(Depends on 29 open bugs)

Details

(Keywords: meta)

After the De-XBL project is done, most custom elements that replace XBL bindings are XUL custom elements. It would be nice to start using HTML elements so XULElement can be removed completely.

I've started doing this with the textbox de-XBL conversions:

  • bug 1547372 uses HTML inputs for simple textboxes
  • bug 1437641 converts HTML number textboxes to <input type=number>
  • bug 1513343 converts XUL multiline textboxes to HTML textareas
  • bug 1534455 converts autocomplete textboxes to customized HTML input elements

Here are a few learnings from the bugs above:

  • Some styling will need to be adapted to target HTML elements too
  • The flex="1" attribute doesn't work on HTML elements (they were replaced with either inline styles, or CSS in stylesheets)
  • There's some slight behaviour change that happened involving popups after converting XUL multiline textboxes, see bug 1546367
  • From what I see, we seem to have 4 different types of elements:
    1. elements with direct/almost direct HTML replacements (eg. textbox, textbox type=number, multiline textbox)
    2. elements with based on HTML elements (eg. bug 1534455), those should be replaceable with customized built-in HTML elements (note: XUL buttons, while they have an HTML equivalent, the fact that they contain child markup means that they belong in the next category)
    3. other elements, notably the ones involving child markup, it might be possible to use normal HTML CEs, but I haven't really tried, so I can't tell.
    4. some special cases like XUL trees
  • It's possible to simplify some elements to move them from category 3 to 2, like bug 1556561 that removes the child markup from autocomplete textboxes

Haven't come across this so far, but it might be worth looking out for:

  • Some platform code (a11y for example) might be checking explicitly for the XUL namespace
  • The BaseControl/BaseText/etc. base classes, which seem tied to XUL interfaces. I think it'd be nice to get rid of them, especially BaseControl that doesn't seem to add much value.
Depends on: 1513325
Depends on: 1513334
Depends on: 1513323
Depends on: 1515988
Depends on: replace-text-link
Blocks: 1540278

Those projects are independent: bug 1540278 plans to convert XUL docs to XHTML docs, which doesn't depend on this project.

No longer blocks: 1540278

Right, I thought it said “burn down the number of XUL elements in tree”.

Depends on: 1580983
Depends on: 1492582
Depends on: 1583377
Depends on: 1584283
Depends on: 1584641
Depends on: 1585482
Depends on: 1586591
Depends on: 1446335
Depends on: 1448807
Depends on: war-on-xbl
Depends on: 1588142
Depends on: 1588848
Alias: de-xul-elements
Depends on: 1590178
Depends on: 1590576
Depends on: 1590856
Depends on: 1590897
Depends on: 1590903
Depends on: 1591026
No longer depends on: 1591026
Depends on: 1591355
Depends on: 1592351
Depends on: 1592344
Depends on: 1584935
Depends on: 1592369
Depends on: 1592799
Depends on: 1593023
Depends on: 1593042
Depends on: 1593091
Depends on: 1516091
Depends on: 1593303
Depends on: 1592334
Depends on: 1593848
Depends on: 1594587
Depends on: 232598
Depends on: 1596296
Depends on: 1596530
Depends on: 1596579
Depends on: 1550061
Depends on: 1596946
Depends on: 1597832
Depends on: 1602095
Depends on: 1655656
No longer depends on: 1597832
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.