Please review a moderately simple update to remove the use of `<div class=contentContainer>` and other similar elements from the generated pages.

The styles associated with contentContainer and friends are moved to the immediately enclosing <main> element, which means they can also be removed from the .header class, used for the main page heading.

There should be no visual change when the pages are viewed in a browser: the main content of each page has the same layout and margins as before, but with less HTML and CSS.

Notes:

The source code changes are generally all about removing the code to create an enclosing <div> element.  Generally, the content that was previously added into the <div> is now added directly into the container to which the div was previously added.

In the HtmlStyle class, the *Container entries are no longer required and have been removed.  Two additional unused members have also been removed.

In the stylesheet, the entries for the list elements leverage the recently added "notes" class and use the ">" construction, as in  "dl.notes > dt". This construction ensures that the style only applies to the immediately enclosed dt (or dd) element, and not to any more deeply nested element. This is both semantically better and more efficient as well.

In the tests, the most notable changes are in TestModules.java. Many of the test cases there are bimodal, and check for the presence or absence of strings depending on the command-line options. In these test cases, it was not enough to remove instances of '<div class=\"contentContainer\">' ... it had to be replaced with what preceded it, to verify that not intervening text was being incorrectly generated.

-- Jon

JBS: https://bugs.openjdk.java.net/browse/JDK-8239817
Webrev: http://cr.openjdk.java.net/~jjg/8239817/webrev.00/index.html

Reply via email to