# HG changeset patch # User bpatel # Date 1492622808 25200 # Node ID 68536b95691cfb6d176948a37f955420860df308 # Parent 7c4f03097a05674e4fd26fb27059ea212e8c9977 8176452: Javadoc UI style issue with index in description. Reviewed-by: jjg, ksrini diff -r 7c4f03097a05 -r 68536b95691c src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css Wed Apr 19 13:38:36 2017 +0200 +++ b/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 { diff -r 7c4f03097a05 -r 68536b95691c test/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java --- a/test/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java Wed Apr 19 13:38:36 2017 +0200 +++ b/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. ""); + + "href=\"../stylesheet.css\" title=\"Style\">", + "
Test comment for a class which has an " + + "anchor_with_name and\n" + + " an anchor_with_id.
"); + + checkOutput("pkg/package-summary.html", true, + "\n" + + "
Test comment for a class which has an " + + "anchor_with_name and\n" + + " an anchor_with_id.
\n" + + ""); checkOutput("index.html", true, ""); @@ -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" + "}"); } } diff -r 7c4f03097a05 -r 68536b95691c test/jdk/javadoc/doclet/testStylesheet/pkg/A.java --- a/test/jdk/javadoc/doclet/testStylesheet/pkg/A.java Wed Apr 19 13:38:36 2017 +0200 +++ b/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 anchor_with_name and + * an anchor_with_id. + */ public class A {}