RFR: JDK-8239817 Eliminate use of contentContainer and friends

Jonathan Gibbons jonathan.gibbons at oracle.com
Sat Feb 29 00:12:20 UTC 2020


Also, I have nominated one of the tests to add the bug number to.  In 
this test, a reference to contentContainer was removed.

It seems we didn't any tests for other instances of *Container, and it 
seems silly to write tests for constructions that can no longer be 
generated, because the entries in the HtmlStyle class have been deleted. 
So, for those other instances I claim a virtual noreg-cleanup noreg-trivial.

-- Jon


On 02/28/2020 03:51 PM, Jonathan Gibbons wrote:
> 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
>



More information about the javadoc-dev mailing list