It looks like the post lost formatting on the way - most importantly the
numbers next to each step and nesting in the list. I made a formatted
version of this post at
https://docs.google.com/document/d/1rEPcu7ei-kK5Dvt7sBgqa_vP37QFIUtVd33JkCK1mvM/edit
.
Here's a (hopefully) fixed version of the list:
1. Load all XUL documents as XHTML using the prototype cache. This doesn’t
require any file renaming, we will just detect a .xul file and act like
it’s .xhtml. This is tracked in bug 1550801. There are only a few known
changes required to make this work properly, for example:
a) Fixup calls to `document.createElement` to
`document.createXULElement` since the default namespace will now be HTML
(Bug 1551320).
b) Remove any remaining references to XULDocument. Most of these have
been removed already, but there are some callers that didn’t apply to the
main browser document that haven’t been removed yet (Bug 1551344)
c) This does _not_ require changing whitespace aware API callers (i.e.
calls to .childNodes->.children), since the prototype cache drops
whitespace in both XUL and XHMTL.
2. Delete the XULDocument implementation.
3. For files where there are no (important) XUL elements in the markup,
rename .xul->.html. This requires doing at least:
a) Fixup whitespace-aware API callers (i.e. calls to
.childNodes->.children).
b) Write a tool to parse and automatically convert these documents as
much as possible. For instance, stop using self closing tags, migrate
`<xul:window>`->`<html>`, convert ProcessingInstruction stylesheets to
`<link>`, etc.
c) Update bugs and comments referencing the old file name
4. For files that don’t match the heuristics from (3), rename .xul->.xhtml.
This is simpler than (3), since we don’t have to worry about whitespace
aware API, parsing issues, etc. In this case everything should work
identically with the file name changed. The main extra task here is:
d) Update bugs and comments referencing the old file name
5. For the now-xhtml documents from (4), apply a subset of changes from
(3). For instance, migrate `<xul:window>`->`<html>`, convert
ProcessingInstruction stylesheets to `<link>`, etc).
On Tue, May 14, 2019 at 8:24 AM Brian Grinstead <
bgrin...@mozilla.com>
wrote:
> 1. Load all XUL documents as XHTML using the prototype cache. This
> doesn’t require any file renaming, we will just detect a .xul file and act
> like it’s .xhtml. This is tracked in bug 1550801
> <
https://bugzilla.mozilla.org/show_bug.cgi?id=1550801>. There are only
> a few known changes required to make this work properly, for example:
> 1. Fixup calls to `document.createElement` to
> 2. Remove any remaining references to XULDocument. Most of these
> 3. This does _not_ require changing whitespace aware API callers
> (i.e. calls to .childNodes->.children), since the prototype cache drops
> whitespace in both XUL and XHMTL.
> 2. Delete the XULDocument implementation.
> 3. For files where there are no (important) XUL elements in the
> markup, rename .xul->.html. This requires doing at least:
> 1. Fixup whitespace-aware API callers (i.e. calls to
> .childNodes->.children).
> 2. Write a tool to parse and automatically convert these documents
> as much as possible. For instance, stop using self closing tags, migrate
> `<xul:window>`->`<html>`, convert ProcessingInstruction stylesheets to
> `<link>`, etc.
> 3. Update bugs and comments referencing the old file name
> 4. For files that don’t match the heuristics from (3), rename
> .xul->.xhtml. This is simpler than (3), since we don’t have to worry about
> whitespace aware API, parsing issues, etc. In this case everything should
> work identically with the file name changed. The main extra task here is:
> 1. Update bugs and comments referencing the old file name
> 5. For the now-xhtml documents from (4), apply a subset of changes