OpenJDK / jdk / hs
changeset 44813:eac0b6c86a43
8176452: Javadoc UI style issue with index in description.
Reviewed-by: jjg, ksrini
author | bpatel |
---|---|
date | Wed, 19 Apr 2017 10:26:48 -0700 |
parents | 1d9c041728a6 |
children | d008ab12a00a |
files | langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css langtools/test/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java langtools/test/jdk/javadoc/doclet/testStylesheet/pkg/A.java |
diffstat | 3 files changed, 48 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css Wed Apr 19 13:38:36 2017 +0200 +++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css Wed Apr 19 10:26:48 2017 -0700 @@ -27,21 +27,13 @@ text-decoration:none; color:#4A6782; } -a:hover, a:focus { +a[href]:hover, a[href]:focus { text-decoration:none; color:#bb7a2a; } -a:active { - text-decoration:none; - color:#4A6782; -} a[name] { color:#353833; } -a[name]:hover { - text-decoration:none; - color:#353833; -} a[name]:before, a[name]:target, a[id]:before, a[id]:target { content:""; display:inline-block; @@ -579,15 +571,13 @@ .packagesSummary th.colLast, .packagesSummary td.colLast { white-space:normal; } -td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, -td.colSecond a:link, td.colSecond a:active, td.colSecond a:visited, td.colSecond a:hover, -th.colFirst a:link, th.colFirst a:active, th.colFirst a:visited, th.colFirst a:hover, -th.colSecond a:link, th.colSecond a:active, th.colSecond a:visited, th.colSecond a:hover, -th.colConstructorName a:link, th.colConstructorName a:active, th.colConstructorName a:visited, -th.colConstructorName 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 { +td.colFirst a:link, td.colFirst a:visited, +td.colSecond a:link, td.colSecond a:visited, +th.colFirst a:link, th.colFirst a:visited, +th.colSecond a:link, th.colSecond a:visited, +th.colConstructorName a:link, th.colConstructorName a:visited, +td.colLast a:link, td.colLast a:visited, +.constantValuesContainer td a:link, .constantValuesContainer td a:visited { font-weight:bold; } .tableSubHeadingColor {
--- a/langtools/test/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java Wed Apr 19 13:38:36 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java Wed Apr 19 10:26:48 2017 -0700 @@ -24,7 +24,7 @@ /* * @test * @bug 4494033 7028815 7052425 8007338 8023608 8008164 8016549 8072461 8154261 8162363 8160196 8151743 8177417 - * 8175218 + * 8175218 8176452 * @summary Run tests on doclet stylesheet. * @author jamieh * @library ../lib @@ -173,13 +173,36 @@ + "}\n" + ".searchTagResult:before, .searchTagResult:target {\n" + " color:red;\n" + + "}", + "a[href]:hover, a[href]:focus {\n" + + " text-decoration:none;\n" + + " color:#bb7a2a;\n" + + "}", + "td.colFirst a:link, td.colFirst a:visited,\n" + + "td.colSecond a:link, td.colSecond a:visited,\n" + + "th.colFirst a:link, th.colFirst a:visited,\n" + + "th.colSecond a:link, th.colSecond a:visited,\n" + + "th.colConstructorName a:link, th.colConstructorName a:visited,\n" + + "td.colLast a:link, td.colLast a:visited,\n" + + ".constantValuesContainer td a:link, .constantValuesContainer td a:visited {\n" + + " font-weight:bold;\n" + "}"); - // Test whether a link to the stylesheet file is inserted properly - // in the class documentation. checkOutput("pkg/A.html", true, + // Test whether a link to the stylesheet file is inserted properly + // in the class documentation. "<link rel=\"stylesheet\" type=\"text/css\" " - + "href=\"../stylesheet.css\" title=\"Style\">"); + + "href=\"../stylesheet.css\" title=\"Style\">", + "<div class=\"block\">Test comment for a class which has an <a name=\"named_anchor\">" + + "anchor_with_name</a> and\n" + + " an <a id=\"named_anchor1\">anchor_with_id</a>.</div>"); + + checkOutput("pkg/package-summary.html", true, + "<td class=\"colLast\">\n" + + "<div class=\"block\">Test comment for a class which has an <a name=\"named_anchor\">" + + "anchor_with_name</a> and\n" + + " an <a id=\"named_anchor1\">anchor_with_id</a>.</div>\n" + + "</td>"); checkOutput("index.html", true, "<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheet.css\" title=\"Style\">"); @@ -188,6 +211,14 @@ "* {\n" + " margin:0;\n" + " padding:0;\n" + + "}", + "a:active {\n" + + " text-decoration:none;\n" + + " color:#4A6782;\n" + + "}", + "a[name]:hover {\n" + + " text-decoration:none;\n" + + " color:#353833;\n" + "}"); } }
--- a/langtools/test/jdk/javadoc/doclet/testStylesheet/pkg/A.java Wed Apr 19 13:38:36 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testStylesheet/pkg/A.java Wed Apr 19 10:26:48 2017 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017 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,4 +23,8 @@ package pkg; +/** + * Test comment for a class which has an <a name="named_anchor">anchor_with_name</a> and + * an <a id="named_anchor1">anchor_with_id</a>. + */ public class A {}