RFR: JDK-8280393: Promote use of HtmlTree factory methods [v2]
Hannes Wallnöfer
hannesw at openjdk.java.net
Fri Jan 21 08:28:20 UTC 2022
On Thu, 20 Jan 2022 18:13:45 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> Hannes Wallnöfer has updated the pull request incrementally with one additional commit since the last revision:
>>
>> JDK-8280393: Remove unnecessary class attribute
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java line 74:
>
>> 72: @Override
>> 73: public Content getMethodsContentHeader(boolean isLastContent) {
>> 74: return new HtmlTree(TagName.LI).setStyle(HtmlStyle.blockList);
>
> While I agree that this is a direct simplification of the existing code, I thought our CSS style was to put/declare the style just on the `ul` element, and then use `ul.STYLE > li` in the stylesheet.
You are right, the class attribute is not needed. I left it there because my goal was not to cause any output changes. However, after removing the attribute, tests still pass and the change in the "Serialized Form" page does not affect the appearance of the page (I checked both in the browser and in the stylesheet). I'll therefore add a commit to remove the style from this `<li>` element.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7162
More information about the javadoc-dev
mailing list