RFR: JDK-8261499: Simplify HTML for javadoc links
Hannes Wallnöfer
hannesw at openjdk.java.net
Wed Feb 10 18:26:50 UTC 2021
This change gets rid of `<span>` elements used in conjunction with HTML links whose only purpose is to apply a CSS class to the link. Instead, the CSS class attribute is applied directly to the link's `<a href="...">` element.
There are three CSS styles for links previously used with embedded or embedding `<span>` elements:
- `type-name-link`, which was applied to a `<span>` element inside the link. This was generated by passing `true` as argument for the `strong` parameter in various get*Link methods.
- `member-name-link` and `search-tag-link`, which were applied to a `<span>` element wrapping the link.
I could find no visual changes in the generated documentation with one exception:
[Class and interface links in the second column of "Uses" page tables][1] were previously wrapped in a `<span class="member-name-link">` element causing the whole class name (including non-linked parts such as type parameters) to be displayed with a bold font. With this change, the `type-name-link` style is applied only to the active link, leaving non-linked parts such as type parameters with normal font-weight.
[1]: https://download.java.net/java/early_access/jdk17/docs/api/java.base/java/util/class-use/Map.html#java.util
-------------
Commit messages:
- JDK-8261499: Include search-tag-link
- JDK-8261499: Missing space
- JDK-8261499: Simplify HTML for javadoc links
Changes: https://git.openjdk.java.net/jdk/pull/2516/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2516&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8261499
Stats: 714 lines in 40 files changed: 30 ins; 44 del; 640 mod
Patch: https://git.openjdk.java.net/jdk/pull/2516.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/2516/head:pull/2516
PR: https://git.openjdk.java.net/jdk/pull/2516
More information about the javadoc-dev
mailing list