8176452: Javadoc UI style issue with index in description

Reviewed-by: jjg, ksrini
This commit is contained in:
Bhavesh Patel 2017-04-19 10:26:48 -07:00
parent f92855c682
commit e1b0c0ab27
3 changed files with 48 additions and 23 deletions

View File

@ -27,21 +27,13 @@ a:link, a:visited {
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 @@ td.colSecond, th.colSecond, td.colLast, th.colConstructorName, th.colLast {
.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 {

View File

@ -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 @@ public class TestStylesheet extends JavadocTester {
+ "}\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 @@ public class TestStylesheet extends JavadocTester {
"* {\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"
+ "}");
}
}

View File

@ -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 {}