Wed, 23 Oct 2013 13:54:13 -0700
8026770: javadoc creates invalid HTML in profile summary pages
Reviewed-by: jjg
1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Wed Oct 23 10:28:10 2013 -0700 1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Wed Oct 23 13:54:13 2013 -0700 1.3 @@ -391,8 +391,7 @@ 1.4 tbody.addContent(tr); 1.5 } 1.6 table.addContent(tbody); 1.7 - Content li = HtmlTree.LI(HtmlStyle.blockList, table); 1.8 - summaryContentTree.addContent(li); 1.9 + summaryContentTree.addContent(table); 1.10 } 1.11 } 1.12
2.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java Wed Oct 23 10:28:10 2013 -0700 2.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java Wed Oct 23 13:54:13 2013 -0700 2.3 @@ -175,8 +175,11 @@ 2.4 */ 2.5 public void addClassesSummary(ClassDoc[] classes, String label, 2.6 String tableSummary, String[] tableHeader, Content packageSummaryContentTree) { 2.7 + HtmlTree li = new HtmlTree(HtmlTag.LI); 2.8 + li.addStyle(HtmlStyle.blockList); 2.9 addClassesSummary(classes, label, tableSummary, tableHeader, 2.10 - packageSummaryContentTree, profileValue); 2.11 + li, profileValue); 2.12 + packageSummaryContentTree.addContent(li); 2.13 } 2.14 2.15 /**
3.1 --- a/test/com/sun/javadoc/testProfiles/TestProfiles.java Wed Oct 23 10:28:10 2013 -0700 3.2 +++ b/test/com/sun/javadoc/testProfiles/TestProfiles.java Wed Oct 23 13:54:13 2013 -0700 3.3 @@ -23,7 +23,7 @@ 3.4 3.5 /* 3.6 * @test 3.7 - * @bug 8006124 8009684 8016921 8023700 8024096 8008164 8026567 3.8 + * @bug 8006124 8009684 8016921 8023700 8024096 8008164 8026567 8026770 3.9 * @summary Test javadoc support for profiles. 3.10 * @author Bhavesh Patel, Evgeniya Stepanova 3.11 * @library ../lib/ 3.12 @@ -85,6 +85,20 @@ 3.13 "<h3><a href=\"pkg2/compact2-package-summary.html\" " 3.14 + "target=\"classFrame\">pkg2</a></h3>" 3.15 }, 3.16 + {PROFILE_BUG_ID + FS + "compact2-summary.html", 3.17 + "<ul class=\"blockList\">" + NL + "<li class=\"blockList\">" + NL 3.18 + + "<h3><a href=\"pkg2/compact2-package-summary.html\" target=\"classFrame\">" 3.19 + + "pkg2</a></h3>" + NL + "<table class=\"typeSummary\" border=\"0\" " 3.20 + + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, " 3.21 + + "listing classes, and an explanation\">" 3.22 + }, 3.23 + {PROFILE_BUG_ID + FS + "compact2-summary.html", 3.24 + "<ul class=\"blockList\">" + NL + "<li class=\"blockList\">" + NL 3.25 + + "<h3><a href=\"pkg4/compact2-package-summary.html\" target=\"classFrame\">" 3.26 + + "pkg4</a></h3>" + NL + "<table class=\"typeSummary\" border=\"0\" " 3.27 + + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, " 3.28 + + "listing classes, and an explanation\">" 3.29 + }, 3.30 // Tests for profileName-package-summary.html listing the summary for a 3.31 // package in a profile. 3.32 {PROFILE_BUG_ID + FS + "pkg5" + FS + "compact3-package-summary.html", 3.33 @@ -94,6 +108,12 @@ 3.34 {PROFILE_BUG_ID + FS + "pkg5" + FS + "compact3-package-summary.html", 3.35 "<div class=\"subTitle\">compact3</div>" 3.36 }, 3.37 + {PROFILE_BUG_ID + FS + "pkg5" + FS + "compact3-package-summary.html", 3.38 + "<ul class=\"blockList\">" + NL + "<li class=\"blockList\">" + NL 3.39 + + "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" " 3.40 + + "cellspacing=\"0\" summary=\"Interface Summary table, listing " 3.41 + + "interfaces, and an explanation\">" 3.42 + }, 3.43 //Test for "overview-frame.html" showing the "All Profiles" link. 3.44 {PROFILE_BUG_ID + FS + "overview-frame.html", 3.45 "<span><a href=\"profile-overview-frame.html\" " 3.46 @@ -171,6 +191,21 @@ 3.47 + "target=\"classFrame\">Anno1Pkg4</a></li>" 3.48 }, 3.49 {PROFILE_BUG_ID + FS + "compact1-summary.html","<li>Use</li>" 3.50 + }, 3.51 + {PROFILE_BUG_ID + FS + "compact2-summary.html", 3.52 + "<ul class=\"blockList\">" + NL + "<li class=\"blockList\">" + NL 3.53 + + "<h3><a href=\"pkg2/compact2-package-summary.html\" target=\"classFrame\">" 3.54 + + "pkg2</a></h3>" + NL + "<li class=\"blockList\">" + NL 3.55 + + "<table class=\"typeSummary\" border=\"0\" " 3.56 + + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, " 3.57 + + "listing classes, and an explanation\">" 3.58 + }, 3.59 + {PROFILE_BUG_ID + FS + "pkg5" + FS + "compact3-package-summary.html", 3.60 + "<ul class=\"blockList\">" + NL + "<li class=\"blockList\">" + NL 3.61 + + "<li class=\"blockList\">" + NL 3.62 + + "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" " 3.63 + + "cellspacing=\"0\" summary=\"Interface Summary table, listing " 3.64 + + "interfaces, and an explanation\">" 3.65 } 3.66 }; 3.67 private static final String[][] PACKAGES_TEST = {