Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8258659: Eliminate whitespace comments from generated pages
Reviewed-by: hannesw
  • Loading branch information
jonathan-gibbons committed Jan 11, 2021
1 parent 3861960 commit c956e7a69c1a2ff08d809d65a9c20ecf49f7cca7
@@ -83,8 +83,6 @@ public class Navigation {
private final String rowListTitle;
private final Content searchLabel;

private static final Content EMPTY_COMMENT = new Comment(" ");

public enum PageMode {
ALL_CLASSES,
ALL_PACKAGES,
@@ -953,7 +951,7 @@ public Content getContent() {
tree.add(subDiv);

tree.add(MarkerComments.END_OF_TOP_NAVBAR);
tree.add(HtmlTree.SPAN(HtmlStyle.skipNav, EMPTY_COMMENT)
tree.add(HtmlTree.SPAN(HtmlStyle.skipNav, HtmlTree.EMPTY)
.setId(SectionName.SKIP_NAVBAR_TOP.getName()));

return tree;
@@ -23,7 +23,7 @@

/*
* @test
* @bug 4638136 7198273 8025633 8081854 8182765
* @bug 4638136 7198273 8025633 8081854 8182765 8258659
* @summary Add ability to skip over nav bar for accessibility
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -54,8 +54,6 @@ public void test() {
<a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a>""",
// Top navbar <span id>
"""
<span class="skip-nav" id="skip.navbar.top">
<!-- -->
</span>""");
<span class="skip-nav" id="skip.navbar.top"></span>""");
}
}
@@ -85,7 +85,6 @@ public void test() {
"""
<section class="details" id="annotation.interface.element.detail">""",
"<h2>Element Details</h2>",
"<!-- -->",
"</a>",
"<ul class=\"member-list\">",
"<li>",
@@ -24,7 +24,7 @@
/*
* @test
* @bug 4131628 4664607 7025314 8023700 7198273 8025633 8026567 8081854 8150188 8151743 8196027 8182765
* 8196200 8196202 8223378
* 8196200 8196202 8223378 8258659
* @summary Make sure the Next/Prev Class links iterate through all types.
* Make sure the navagation is 2 columns, not 3.
* @library /tools/lib ../../lib
@@ -89,9 +89,7 @@ public void test(Path ignore) {
checkOutput("pkg/A.html", true,
"""
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip.navbar.top">
<!-- -->
</span></nav>
<span class="skip-nav" id="skip.navbar.top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
@@ -100,9 +98,7 @@ public void test(Path ignore) {
checkOutput("pkg/package-summary.html", true,
"""
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip.navbar.top">
<!-- -->
</span></nav>
<span class="skip-nav" id="skip.navbar.top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
@@ -122,9 +118,7 @@ public void test1(Path ignore) {
checkOutput("pkg/A.html", true,
"""
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip.navbar.top">
<!-- -->
</span></nav>
<span class="skip-nav" id="skip.navbar.top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
@@ -133,9 +127,7 @@ public void test1(Path ignore) {
checkOutput("pkg/package-summary.html", true,
"""
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip.navbar.top">
<!-- -->
</span></nav>
<span class="skip-nav" id="skip.navbar.top"></span></nav>
""");
}

@@ -153,9 +145,7 @@ public void test2(Path ignore) {
"""
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="skip-nav"><a id="skip.navbar.top">
<!-- -->
</a></div>
<div class="skip-nav"><a id="skip.navbar.top"></a></div>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->""");
@@ -164,9 +154,7 @@ public void test2(Path ignore) {
"""
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="skip-nav"><a id="skip.navbar.top">
<!-- -->
</a></div>
<div class="skip-nav"><a id="skip.navbar.top"></a></div>
</nav>""");
}

0 comments on commit c956e7a

Please sign in to comment.