8008164: Invisible table captions in javadoc-generated html
authorbpatel
Fri, 04 Oct 2013 13:32:30 -0700
changeset 20613 ab4801a53abb
parent 20612 4761f3ff7afb
child 20614 994200acf1e4
8008164: Invisible table captions in javadoc-generated html Reviewed-by: jjg
langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css
langtools/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java
langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg1/TestTable.java
langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg2/TestUse.java
langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java
langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java
langtools/test/com/sun/javadoc/testStylesheet/TestStylesheet.java
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java	Fri Oct 04 10:00:28 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java	Fri Oct 04 13:32:30 2013 -0700
@@ -413,7 +413,7 @@
     protected void addDeprecatedAPI(List<Doc> deprmembers, String headingKey,
             String tableSummary, String[] tableHeader, Content contentTree) {
         if (deprmembers.size() > 0) {
-            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+            Content table = HtmlTree.TABLE(HtmlStyle.deprecatedSummary, 0, 3, 0, tableSummary,
                 writer.getTableCaption(configuration.getResource(headingKey)));
             table.addContent(writer.getSummaryTableHeader(tableHeader, "col"));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
@@ -453,7 +453,7 @@
         List<? extends ProgramElementDoc> members = mems;
         boolean printedUseTableHeader = false;
         if (members.size() > 0) {
-            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+            Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, tableSummary,
                     writer.getTableCaption(heading));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
             Iterator<? extends ProgramElementDoc> it = members.iterator();
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Fri Oct 04 10:00:28 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Fri Oct 04 13:32:30 2013 -0700
@@ -263,7 +263,7 @@
      * @param contentTree the content tree to which the packages list will be added
      */
     protected void addPackageList(Content contentTree) throws IOException {
-        Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
+        Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
                 getTableCaption(configuration.getResource(
                 "doclet.ClassUse_Packages.that.use.0",
                 getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc
@@ -298,7 +298,7 @@
                 pkgToPackageAnnotations.isEmpty()) {
             return;
         }
-        Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
+        Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
                 getTableCaption(configuration.getResource(
                 "doclet.ClassUse_PackageAnnotation",
                 getLink(new LinkInfoImpl(configuration,
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java	Fri Oct 04 10:00:28 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java	Fri Oct 04 13:32:30 2013 -0700
@@ -207,7 +207,7 @@
      * @return the table caption and header
      */
     protected Content getClassName(Content classStr) {
-        Content table = HtmlTree.TABLE(0, 3, 0, constantsTableSummary,
+        Content table = HtmlTree.TABLE(HtmlStyle.constantsSummary, 0, 3, 0, constantsTableSummary,
                 getTableCaption(classStr));
         table.addContent(getSummaryTableHeader(constantsTableHeader, "col"));
         return table;
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Fri Oct 04 10:00:28 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Fri Oct 04 13:32:30 2013 -0700
@@ -356,7 +356,7 @@
         if(classes.length > 0) {
             Arrays.sort(classes);
             Content caption = getTableCaption(new RawHtml(label));
-            Content table = HtmlTree.TABLE(HtmlStyle.packageSummary, 0, 3, 0,
+            Content table = HtmlTree.TABLE(HtmlStyle.typeSummary, 0, 3, 0,
                     tableSummary, caption);
             table.addContent(getSummaryTableHeader(tableHeader, "col"));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
@@ -937,7 +937,7 @@
     protected void addPackageDeprecatedAPI(List<Doc> deprPkgs, String headingKey,
             String tableSummary, String[] tableHeader, Content contentTree) {
         if (deprPkgs.size() > 0) {
-            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+            Content table = HtmlTree.TABLE(HtmlStyle.deprecatedSummary, 0, 3, 0, tableSummary,
                     getTableCaption(configuration.getResource(headingKey)));
             table.addContent(getSummaryTableHeader(tableHeader, "col"));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Fri Oct 04 10:00:28 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Fri Oct 04 13:32:30 2013 -0700
@@ -151,7 +151,7 @@
      * @param contentTree the content tree to which the package list will be added
      */
     protected void addPackageList(Content contentTree) throws IOException {
-        Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
+        Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary,
                 getTableCaption(configuration.getResource(
                 "doclet.ClassUse_Packages.that.use.0",
                 getPackageLink(pkgdoc, Util.getPackageName(pkgdoc)))));
@@ -196,7 +196,7 @@
             }
             String tableSummary = configuration.getText("doclet.Use_Table_Summary",
                     configuration.getText("doclet.classes"));
-            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+            Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, tableSummary,
                     getTableCaption(configuration.getResource(
                     "doclet.ClassUse_Classes.in.0.used.by.1",
                     getPackageLink(pkgdoc, Util.getPackageName(pkgdoc)),
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Fri Oct 04 10:00:28 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Fri Oct 04 13:32:30 2013 -0700
@@ -169,7 +169,7 @@
         if(classes.length > 0) {
             Arrays.sort(classes);
             Content caption = getTableCaption(new RawHtml(label));
-            Content table = HtmlTree.TABLE(HtmlStyle.packageSummary, 0, 3, 0,
+            Content table = HtmlTree.TABLE(HtmlStyle.typeSummary, 0, 3, 0,
                     tableSummary, caption);
             table.addContent(getSummaryTableHeader(tableHeader, "col"));
             Content tbody = new HtmlTree(HtmlTag.TBODY);
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java	Fri Oct 04 10:00:28 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java	Fri Oct 04 13:32:30 2013 -0700
@@ -92,7 +92,7 @@
         else {
             caption = getTableCaption(mw.getCaption());
         }
-        Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0,
+        Content table = HtmlTree.TABLE(HtmlStyle.memberSummary, 0, 3, 0,
                 mw.getTableSummary(), caption);
         table.addContent(getSummaryTableHeader(mw.getSummaryTableHeader(cd), "col"));
         for (int i = 0; i < tableContents.size(); i++) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java	Fri Oct 04 10:00:28 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java	Fri Oct 04 13:32:30 2013 -0700
@@ -48,8 +48,11 @@
     colFirst,
     colLast,
     colOne,
+    constantsSummary,
     constantValuesContainer,
     contentContainer,
+    deprecatedContent,
+    deprecatedSummary,
     description,
     details,
     docSummary,
@@ -61,11 +64,11 @@
     inheritance,
     italic,
     legalCopy,
+    memberSummary,
     nameValue,
     navBarCell1Rev,
     navList,
     overviewSummary,
-    packageSummary,
     rowColor,
     serializedFormContainer,
     skipNav,
@@ -76,9 +79,10 @@
     subNavList,
     subTitle,
     summary,
-    deprecatedContent,
     tabEnd,
     tableTab,
     title,
-    topNav;
+    topNav,
+    typeSummary,
+    useSummary;
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Fri Oct 04 10:00:28 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Fri Oct 04 13:32:30 2013 -0700
@@ -619,25 +619,6 @@
     }
 
     /**
-     * Generates a Table tag with border, width and summary attributes and
-     * some content.
-     *
-     * @param border border for the table
-     * @param width width of the table
-     * @param summary summary for the table
-     * @param body content for the table
-     * @return an HtmlTree object for the TABLE tag
-     */
-    public static HtmlTree TABLE(int border, int width, String summary,
-            Content body) {
-        HtmlTree htmltree = new HtmlTree(HtmlTag.TABLE, nullCheck(body));
-        htmltree.addAttr(HtmlAttr.BORDER, Integer.toString(border));
-        htmltree.addAttr(HtmlAttr.WIDTH, Integer.toString(width));
-        htmltree.addAttr(HtmlAttr.SUMMARY, nullCheck(summary));
-        return htmltree;
-    }
-
-    /**
      * Generates a Table tag with style class, border, cell padding,
      * cellspacing and summary attributes and some content.
      *
@@ -662,22 +643,6 @@
     }
 
     /**
-     * Generates a Table tag with border, cell padding,
-     * cellspacing and summary attributes and some content.
-     *
-     * @param border border for the table
-     * @param cellPadding cell padding for the table
-     * @param cellSpacing cell spacing for the table
-     * @param summary summary for the table
-     * @param body content for the table
-     * @return an HtmlTree object for the TABLE tag
-     */
-    public static HtmlTree TABLE(int border, int cellPadding,
-            int cellSpacing, String summary, Content body) {
-        return TABLE(null, border, cellPadding, cellSpacing, summary, body);
-    }
-
-    /**
      * Generates a TD tag with style class attribute and some content.
      *
      * @param styleClass style for the tag
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css	Fri Oct 04 10:00:28 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css	Fri Oct 04 13:32:30 2013 -0700
@@ -348,27 +348,16 @@
 /*
 Table styles
 */
-.contentContainer table, .classUseContainer table, .constantValuesContainer table {
+.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
     border-bottom:1px solid #9eadc0;
-    width:100%;
-}
-.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table {
+    margin:0 0 12px 0px;
     width:100%;
 }
-.contentContainer .description table, .contentContainer .details table {
-    border-bottom:none;
-}
-.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{
-    vertical-align:top;
-    padding-right:20px;
+.overviewSummary, .memberSummary  {
+    padding:0px;
 }
-.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast,
-.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast,
-.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne,
-.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne {
-    padding-right:3px;
-}
-.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption {
+.overviewSummary caption, .memberSummary caption, .typeSummary caption,
+.useSummary caption, .constantsSummary caption, .deprecatedSummary caption {
     position:relative;
     text-align:left;
     background-repeat:no-repeat;
@@ -379,10 +368,18 @@
     padding:0px;
     margin:0px;
 }
-caption a:link, caption a:hover, caption a:active, caption a:visited {
+.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
+.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
+.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
+.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
+.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
+.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
+.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
+.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited {
     color:#FFFFFF;
 }
-.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span {
+.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
+.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
     white-space:nowrap;
     padding-top:8px;
     padding-left:8px;
@@ -390,7 +387,7 @@
     float:left;
     background-image:url(resources/titlebar.gif);
 }
-.contentContainer ul.blockList li.blockList caption span.activeTableTab span {
+.memberSummary caption span.activeTableTab span {
     white-space:nowrap;
     padding-top:8px;
     padding-left:8px;
@@ -398,7 +395,7 @@
     float:left;
     background-image:url(resources/activetitlebar.gif);
 }
-.contentContainer ul.blockList li.blockList caption span.tableTab span {
+.memberSummary caption span.tableTab span {
     white-space:nowrap;
     padding-top:8px;
     padding-left:8px;
@@ -406,14 +403,15 @@
     float:left;
     background-image:url(resources/titlebar.gif);
 }
-.contentContainer ul.blockList li.blockList caption span.tableTab, .contentContainer ul.blockList li.blockList caption span.activeTableTab {
+.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {
     padding-top:0px;
     padding-left:0px;
     background-image:none;
     float:none;
     display:inline-block;
 }
-.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd {
+.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
+.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd {
     width:10px;
     background-image:url(resources/titlebar_end.gif);
     background-repeat:no-repeat;
@@ -421,7 +419,7 @@
     position:relative;
     float:left;
 }
-.contentContainer ul.blockList li.blockList .activeTableTab .tabEnd {
+.memberSummary .activeTableTab .tabEnd {
     width:10px;
     margin-right:5px;
     background-image:url(resources/activetitlebar_end.gif);
@@ -430,7 +428,7 @@
     position:relative;
     float:left;
 }
-.contentContainer ul.blockList li.blockList .tableTab .tabEnd {
+.memberSummary .tableTab .tabEnd {
     width:10px;
     margin-right:5px;
     background-image:url(resources/titlebar_end.gif);
@@ -439,33 +437,23 @@
     position:relative;
     float:left;
 }
-ul.blockList ul.blockList li.blockList table {
-    margin:0 0 12px 0px;
-    width:100%;
-}
-.tableSubHeadingColor {
-    background-color: #EEEEFF;
-}
-.altColor {
-    background-color:#eeeeef;
-}
-.rowColor {
-    background-color:#ffffff;
-}
-.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td {
+.overviewSummary td, .memberSummary td, .typeSummary td,
+.useSummary td, .constantsSummary td, .deprecatedSummary td {
     text-align:left;
     padding:3px 3px 3px 7px;
 }
-th.colFirst, th.colLast, th.colOne, .constantValuesContainer th {
+th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th,
+td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{
+    vertical-align:top;
+    padding-right:3px;
+}
+th.colFirst, th.colLast, th.colOne, .constantsSummary th {
     background:#dee3e9;
     border-top:1px solid #9eadc0;
     border-bottom:1px solid #9eadc0;
     text-align:left;
     padding:3px 3px 3px 7px;
 }
-td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
-    font-weight:bold;
-}
 td.colFirst, th.colFirst {
     border-left:1px solid #9eadc0;
     white-space:nowrap;
@@ -477,18 +465,25 @@
     border-right:1px solid #9eadc0;
     border-left:1px solid #9eadc0;
 }
-table.overviewSummary  {
-    padding:0px;
-    margin-left:0px;
-}
-table.overviewSummary td.colFirst, table.overviewSummary th.colFirst,
-table.overviewSummary td.colOne, table.overviewSummary th.colOne {
+.overviewSummary td.colFirst, .overviewSummary th.colFirst,
+.overviewSummary td.colOne, .overviewSummary th.colOne,
+.memberSummary td.colFirst, .memberSummary th.colFirst,
+.memberSummary td.colOne, .memberSummary th.colOne,
+.typeSummary td.colFirst{
     width:25%;
     vertical-align:middle;
 }
-table.packageSummary td.colFirst, table.overviewSummary th.colFirst {
-    width:25%;
-    vertical-align:middle;
+td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
+    font-weight:bold;
+}
+.tableSubHeadingColor {
+    background-color: #EEEEFF;
+}
+.altColor {
+    background-color:#eeeeef;
+}
+.rowColor {
+    background-color:#ffffff;
 }
 /*
 Content styles
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java	Fri Oct 04 13:32:30 2013 -0700
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8008164
+ * @summary Test styles on HTML tables generated by javadoc.
+ * @author Bhavesh Patel
+ * @library ../lib/
+ * @build JavadocTester TestHtmlTableStyles
+ * @run main TestHtmlTableStyles
+ */
+
+public class TestHtmlTableStyles extends JavadocTester {
+
+    private static final String BUG_ID = "8008164";
+
+    //Input for string search tests.
+    private static final String[][] TEST = {
+        {BUG_ID + FS + "pkg1" + FS + "TestTable.html",
+            "<table border cellpadding=3 cellspacing=1>"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "TestTable.html",
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Field Summary table, listing fields, " +
+            "and an explanation\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "TestTable.html",
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Constructor Summary table, listing " +
+            "constructors, and an explanation\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "TestTable.html",
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Method Summary table, listing methods, " +
+            "and an explanation\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "package-summary.html",
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Class Summary table, listing classes, " +
+            "and an explanation\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "TestTable.html",
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Use table, listing fields, and an explanation\">"
+        },
+        {BUG_ID + FS + "overview-summary.html",
+            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Packages table, listing packages, and an explanation\">"
+        },
+        {BUG_ID + FS + "deprecated-list.html",
+            "<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Deprecated Methods table, listing " +
+            "deprecated methods, and an explanation\">"
+        },
+        {BUG_ID + FS + "constant-values.html",
+            "<table class=\"constantsSummary\" border=\"0\" cellpadding=\"3\" " +
+            "cellspacing=\"0\" summary=\"Constant Field Values table, listing " +
+            "constant fields, and values\">"
+        },
+    };
+
+    private static final String[] ARGS = new String[] {
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) throws Exception {
+        TestHtmlTableStyles tester = new TestHtmlTableStyles();
+        run(tester, ARGS, TEST, NO_TEST);
+        tester.printSummary();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugId() {
+        return BUG_ID;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugName() {
+        return getClass().getName();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg1/TestTable.java	Fri Oct 04 13:32:30 2013 -0700
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+/**
+ * Testing table in documentation comment. In the generated documentation, it
+ * should be displayed as a regular table and not have any styles that the javadoc
+ * generated tables have.
+ *
+ * <table border cellpadding=3 cellspacing=1>
+ * <caption>Summary of test table</caption>
+ *  <tr>
+ *    <td></td>
+ *    <td align=center colspan = 2> First Element (Head)</td>
+ *    <td align=center colspan = 2> Last Element (Tail)</td>
+ *  </tr>
+ *  <tr>
+ *    <td></td>
+ *    <td align=center><em>Throws exception</em></td>
+ *    <td align=center><em>Special value</em></td>
+ *    <td align=center><em>Throws exception</em></td>
+ *    <td align=center><em>Special value</em></td>
+ *  </tr>
+ *  <tr>
+ *    <td>Insert</td>
+ *    <td>addFirst(e)</td>
+ *    <td>offerFirst(e)</td>
+ *    <td>addLast(e)</td>
+ *    <td>offerLast(e)</td>
+ *  </tr>
+ *  <tr>
+ *    <td>Remove</td>
+ *    <td>removeFirst()</td>
+ *    <td>pollFirst()</td>
+ *    <td>removeLast()</td>
+ *    <td>pollLast()</td>
+ *  </tr>
+ * </table>
+ */
+public class TestTable
+{
+    /**
+     * Field in Class.
+     */
+    public String field;
+
+    /**
+     * Field constant in Class.
+     */
+    public static final int fieldCnst = 0;
+
+    /**
+     * Method in Class.
+     */
+    public void methodInClass(int i) {}
+
+    /**
+     * Deprecated method in Class.
+     * @deprecated Do not use it.
+     */
+    public void deprMethod() {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg2/TestUse.java	Fri Oct 04 13:32:30 2013 -0700
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg2;
+
+import pkg1.*;
+
+/**
+ * Testing use of TestTable.
+ */
+public class TestUse
+{
+    public TestTable tTable;
+}
--- a/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java	Fri Oct 04 10:00:28 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java	Fri Oct 04 13:32:30 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      6786688
+ * @bug      6786688 8008164
  * @summary  HTML tables should have table summary, caption and table headers.
  * @author   Bhavesh Patel
  * @library  ../lib/
@@ -50,121 +50,121 @@
 
         //Package summary
         {BUG_ID + FS + "pkg1" + FS + "package-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\"" +
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\"" +
             " cellspacing=\"0\" summary=\"Class Summary table, " +
             "listing classes, and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "package-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\"" +
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\"" +
             " cellspacing=\"0\" summary=\"Interface Summary table, " +
             "listing interfaces, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "package-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\"" +
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\"" +
             " cellspacing=\"0\" summary=\"Enum Summary table, " +
             "listing enums, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "package-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\"" +
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\"" +
             " cellspacing=\"0\" summary=\"Annotation Types Summary table, " +
             "listing annotation types, and an explanation\">"
         },
         // Class documentation
         {BUG_ID + FS + "pkg1" + FS + "C1.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Field Summary table, listing fields, " +
             "and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "C1.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Method Summary table, listing methods, " +
             "and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C2.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Nested Class Summary table, listing " +
             "nested classes, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C2.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Constructor Summary table, listing " +
             "constructors, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C2.ModalExclusionType.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Enum Constant Summary table, listing " +
             "enum constants, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C3.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Required Element Summary table, " +
             "listing required elements, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "C4.html",
-            "<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " +
+            "<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " +
             "cellspacing=\"0\" summary=\"Optional Element Summary table, " +
             "listing optional elements, and an explanation\">"
         },
         // Class use documentation
         {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "I1.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing packages, and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing fields, and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing methods, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing fields, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing methods, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.ModalExclusionType.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing packages, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.ModalExclusionType.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing methods, and an explanation\">"
         },
         // Package use documentation
         {BUG_ID + FS + "pkg1" + FS + "package-use.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing packages, and an explanation\">"
         },
         {BUG_ID + FS + "pkg1" + FS + "package-use.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing classes, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "package-use.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing packages, and an explanation\">"
         },
         {BUG_ID + FS + "pkg2" + FS + "package-use.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
+            "<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use " +
             "table, listing classes, and an explanation\">"
         },
         // Deprecated
         {BUG_ID + FS + "deprecated-list.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
+            "<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
             "summary=\"Deprecated Fields table, listing deprecated fields, " +
             "and an explanation\">"
         },
         {BUG_ID + FS + "deprecated-list.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
+            "<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
             "summary=\"Deprecated Methods table, listing deprecated methods, " +
             "and an explanation\">"
         },
         // Constant values
         {BUG_ID + FS + "constant-values.html",
-            "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
+            "<table class=\"constantsSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " +
             "summary=\"Constant Field Values table, listing " +
             "constant fields, and values\">"
         },
--- a/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java	Fri Oct 04 10:00:28 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java	Fri Oct 04 13:32:30 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      8006124 8009684 8016921 8023700 8024096
+ * @bug      8006124 8009684 8016921 8023700 8024096 8008164
  * @summary  Test javadoc support for profiles.
  * @author   Bhavesh Patel, Evgeniya Stepanova
  * @library  ../lib/
@@ -137,7 +137,7 @@
         },
         // need to add teststring when JDK-8015496 will be fixed
         //Test exception in profiles
-        {PROFILE_BUG_ID + FS + "compact1-summary.html","<table class=\"packageSummary\" "
+        {PROFILE_BUG_ID + FS + "compact1-summary.html","<table class=\"typeSummary\" "
             + "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
             + "summary=\"Exception Summary table, listing exceptions, and an explanation\">"
             + NL + "<caption><span>Exception Summary</span><span class=\"tabEnd\">"
@@ -149,7 +149,7 @@
         },
         //Test errors in profiles
         {PROFILE_BUG_ID + FS + "compact1-summary.html",
-            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
+            "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
             + "summary=\"Error Summary table, listing errors, and an explanation\">"
             + NL + "<caption><span>Error Summary</span><span class=\"tabEnd\">&nbsp;"
             + "</span></caption>" + NL + "<tr>" + NL + "<th class=\"colFirst\""
--- a/langtools/test/com/sun/javadoc/testStylesheet/TestStylesheet.java	Fri Oct 04 10:00:28 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testStylesheet/TestStylesheet.java	Fri Oct 04 13:32:30 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4494033 7028815 7052425 8007338 8023608
+ * @bug      4494033 7028815 7052425 8007338 8023608 8008164
  * @summary  Run tests on doclet stylesheet.
  * @author   jamieh
  * @library  ../lib/
@@ -59,10 +59,8 @@
         {BUG_ID + FS + "stylesheet.css",
             "ul {" + NL + "    list-style-type:disc;" + NL + "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".overviewSummary caption, .packageSummary caption, " +
-            ".contentContainer ul.blockList li.blockList caption, " +
-            ".summary caption, .classUseContainer caption, " +
-            ".constantValuesContainer caption {" + NL +
+            ".overviewSummary caption, .memberSummary caption, .typeSummary caption," + NL +
+            ".useSummary caption, .constantsSummary caption, .deprecatedSummary caption {" + NL +
             "    position:relative;" + NL +
             "    text-align:left;" + NL +
             "    background-repeat:no-repeat;" + NL +
@@ -74,10 +72,8 @@
             "    margin:0px;" + NL +
             "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".overviewSummary caption span, .packageSummary caption span, " +
-            ".contentContainer ul.blockList li.blockList caption span, " +
-            ".summary caption span, .classUseContainer caption span, " +
-            ".constantValuesContainer caption span {" + NL +
+            ".overviewSummary caption span, .memberSummary caption span, .typeSummary caption span," + NL +
+            ".useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {" + NL +
             "    white-space:nowrap;" + NL +
             "    padding-top:8px;" + NL +
             "    padding-left:8px;" + NL +
@@ -86,8 +82,7 @@
             "    background-image:url(resources/titlebar.gif);" + NL +
             "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".contentContainer ul.blockList li.blockList caption " +
-            "span.activeTableTab span {" + NL +
+            ".memberSummary caption span.activeTableTab span {" + NL +
             "    white-space:nowrap;" + NL +
             "    padding-top:8px;" + NL +
             "    padding-left:8px;" + NL +
@@ -96,7 +91,7 @@
             "    background-image:url(resources/activetitlebar.gif);" + NL +
             "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".contentContainer ul.blockList li.blockList caption span.tableTab span {" + NL +
+            ".memberSummary caption span.tableTab span {" + NL +
             "    white-space:nowrap;" + NL +
             "    padding-top:8px;" + NL +
             "    padding-left:8px;" + NL +
@@ -105,8 +100,7 @@
             "    background-image:url(resources/titlebar.gif);" + NL +
             "}"},
         {BUG_ID + FS + "stylesheet.css",
-            ".contentContainer ul.blockList li.blockList caption span.tableTab, " +
-            ".contentContainer ul.blockList li.blockList caption span.activeTableTab {" + NL +
+            ".memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {" + NL +
             "    padding-top:0px;" + NL +
             "    padding-left:0px;" + NL +
             "    background-image:none;" + NL +