The neterror page serves a number of different use cases, which effectivly pick and choose elements from the page's DOM to display. Previously this logic was partly defined in the HTML, partly in the CSS, and partly in JS, using a couple of different methods. This change normalises all of that such that:
- All optional elements are initially hidden.
- Hiding is always controlled by an element's `hidden` attribute.
- Setting a CSS `display` style does not override the `hidden` attribute.
In addition to making the page easier to reason about, this allows for the CSS styles of the page to not be considered essential for its display, which means that they (and their dependencies) do not need to be included in `toolkit/themes/shared/minimal-toolkit.jar.inc.mn`.
The HTML and CSS of the page are also somewhat simplified, leaving out unused or unnecessary elements and styles.
Some tests affected by these changes are cleaned up to be slightly less flaky. Some are set to be skipped in verify mode under OS X, as they have a tendency to time out in chaos mode.
Differential Revision: https://phabricator.services.mozilla.com/D157726