8183511: improve style for deprecated text
authorbpatel
Tue, 26 Sep 2017 20:03:48 -0700
changeset 47272 e0d686cdf608
parent 47271 dc9b1da1314b
child 47273 f60a42d4b8cd
8183511: improve style for deprecated text Reviewed-by: jjg, ksrini
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlStyle.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeBuilder.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ClassBuilder.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css
test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java
test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java
test/langtools/jdk/javadoc/doclet/testModules/TestModules.java
test/langtools/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java
test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java
test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java
test/langtools/jdk/javadoc/doclet/testTagOutput/TestTagOutput.java
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java	Tue Sep 26 20:03:48 2017 -0700
@@ -364,7 +364,7 @@
         List<? extends DocTree> tags;
         Content span = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(element));
         HtmlTree div = new HtmlTree(HtmlTag.DIV);
-        div.addStyle(HtmlStyle.block);
+        div.addStyle(HtmlStyle.deprecationBlock);
         if (utils.isDeprecated(element)) {
             div.addContent(span);
             tags = utils.getBlockTags(element, DocTree.Kind.DEPRECATED);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java	Tue Sep 26 20:03:48 2017 -0700
@@ -355,7 +355,7 @@
             writer.getTagletWriterInstance(false));
         if (!output.isEmpty()) {
             Content deprecatedContent = output;
-            Content div = HtmlTree.DIV(HtmlStyle.block, deprecatedContent);
+            Content div = HtmlTree.DIV(HtmlStyle.deprecationBlock, deprecatedContent);
             contentTree.addContent(div);
         }
     }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java	Tue Sep 26 20:03:48 2017 -0700
@@ -278,7 +278,8 @@
      */
     @Override
     public void addAnnotationTypeSignature(String modifiers, Content annotationInfoTree) {
-        annotationInfoTree.addContent(new HtmlTree(HtmlTag.BR));
+        Content hr = new HtmlTree(HtmlTag.HR);
+        annotationInfoTree.addContent(hr);
         Content pre = new HtmlTree(HtmlTag.PRE);
         addAnnotationInfo(annotationType, pre);
         pre.addContent(modifiers);
@@ -324,13 +325,11 @@
      */
     @Override
     public void addAnnotationTypeDeprecationInfo(Content annotationInfoTree) {
-        Content hr = new HtmlTree(HtmlTag.HR);
-        annotationInfoTree.addContent(hr);
         List<? extends DocTree> deprs = utils.getBlockTags(annotationType, DocTree.Kind.DEPRECATED);
         if (utils.isDeprecated(annotationType)) {
             CommentHelper ch = utils.getCommentHelper(annotationType);
             Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(annotationType));
-            Content div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
+            Content div = HtmlTree.DIV(HtmlStyle.deprecationBlock, deprLabel);
             if (!deprs.isEmpty()) {
 
                 List<? extends DocTree> commentTags = ch.getDescription(configuration, deprs.get(0));
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java	Tue Sep 26 20:03:48 2017 -0700
@@ -293,7 +293,8 @@
      */
     @Override
     public void addClassSignature(String modifiers, Content classInfoTree) {
-        classInfoTree.addContent(new HtmlTree(HtmlTag.BR));
+        Content hr = new HtmlTree(HtmlTag.HR);
+        classInfoTree.addContent(hr);
         Content pre = new HtmlTree(HtmlTag.PRE);
         addAnnotationInfo(typeElement, pre);
         pre.addContent(modifiers);
@@ -606,12 +607,10 @@
      */
     @Override
     public void addClassDeprecationInfo(Content classInfoTree) {
-        Content hr = new HtmlTree(HtmlTag.HR);
-        classInfoTree.addContent(hr);
         List<? extends DocTree> deprs = utils.getBlockTags(typeElement, DocTree.Kind.DEPRECATED);
         if (utils.isDeprecated(typeElement)) {
             Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(typeElement));
-            Content div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
+            Content div = HtmlTree.DIV(HtmlStyle.deprecationBlock, deprLabel);
             if (!deprs.isEmpty()) {
                 CommentHelper ch = utils.getCommentHelper(typeElement);
                 DocTree dt = deprs.get(0);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java	Tue Sep 26 20:03:48 2017 -0700
@@ -929,7 +929,7 @@
         if (utils.isDeprecated(mdle)) {
             CommentHelper ch = utils.getCommentHelper(mdle);
             HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV);
-            deprDiv.addStyle(HtmlStyle.deprecatedContent);
+            deprDiv.addStyle(HtmlStyle.deprecationBlock);
             Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(mdle));
             deprDiv.addContent(deprPhrase);
             if (!deprs.isEmpty()) {
@@ -1064,7 +1064,7 @@
         if (utils.isDeprecated(pkg)) {
             deprs = utils.getDeprecatedTrees(pkg);
             HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV);
-            deprDiv.addStyle(HtmlStyle.deprecatedContent);
+            deprDiv.addStyle(HtmlStyle.deprecationBlock);
             Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(pkg));
             deprDiv.addContent(deprPhrase);
             if (!deprs.isEmpty()) {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java	Tue Sep 26 20:03:48 2017 -0700
@@ -171,7 +171,7 @@
         if (utils.isDeprecated(packageElement)) {
             CommentHelper ch = utils.getCommentHelper(packageElement);
             HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV);
-            deprDiv.addStyle(HtmlStyle.deprecatedContent);
+            deprDiv.addStyle(HtmlStyle.deprecationBlock);
             Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(packageElement));
             deprDiv.addContent(deprPhrase);
             if (!deprs.isEmpty()) {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlStyle.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlStyle.java	Tue Sep 26 20:03:48 2017 -0700
@@ -53,9 +53,9 @@
     constantsSummary,
     constantValuesContainer,
     contentContainer,
-    deprecatedContent,
     deprecatedLabel,
     deprecatedSummary,
+    deprecationBlock,
     deprecationComment,
     description,
     descfrmTypeLabel,
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeBuilder.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeBuilder.java	Tue Sep 26 20:03:48 2017 -0700
@@ -147,8 +147,8 @@
             throws DocletException {
         Content annotationInfoTree = writer.getAnnotationInfoTreeHeader();
 
+        buildAnnotationTypeSignature(annotationInfoTree);
         buildDeprecationInfo(annotationInfoTree);
-        buildAnnotationTypeSignature(annotationInfoTree);
         buildAnnotationTypeDescription(annotationInfoTree);
         buildAnnotationTypeTagInfo(annotationInfoTree);
 
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ClassBuilder.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ClassBuilder.java	Tue Sep 26 20:03:48 2017 -0700
@@ -175,8 +175,8 @@
         buildInterfaceUsageInfo(classInfoTree);
         buildNestedClassInfo(classInfoTree);
         buildFunctionalInterfaceInfo(classInfoTree);
+        buildClassSignature(classInfoTree);
         buildDeprecationInfo(classInfoTree);
-        buildClassSignature(classInfoTree);
         buildClassDescription(classInfoTree);
         buildClassTagInfo(classInfoTree);
 
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Tue Sep 26 19:19:09 2017 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Tue Sep 26 20:03:48 2017 -0700
@@ -645,6 +645,17 @@
 .deprecationComment, .emphasizedPhrase, .interfaceName {
     font-style:italic;
 }
+.deprecationBlock {
+    font-size:14px;
+    font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
+    border-style:solid;
+    border-width:thin;
+    border-radius:10px;
+    padding:10px;
+    margin-bottom:10px;
+    margin-right:10px;
+    display:inline-block;
+}
 
 div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase,
 div.block div.block span.interfaceName {
--- a/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java	Tue Sep 26 20:03:48 2017 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4927552 8026567 8071982 8162674 8175200 8175218
+ * @bug      4927552 8026567 8071982 8162674 8175200 8175218 8183511
  * @summary  <DESC>
  * @author   jamieh
  * @library  ../lib
@@ -81,85 +81,85 @@
                 + "extends java.lang.Object</pre>",
                 "<pre>@Deprecated(forRemoval=true)\n"
                 + "public&nbsp;int field</pre>\n"
-                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;</div>",
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;</div>",
                 "<pre>@Deprecated(forRemoval=true)\n"
                 + "public&nbsp;DeprecatedClassByAnnotation&#8203;()</pre>\n"
-                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;</div>",
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;</div>",
                 "<pre>@Deprecated\n"
                 + "public&nbsp;void&nbsp;method&#8203;()</pre>\n"
-                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>");
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>");
 
         checkOutput("pkg/TestAnnotationType.html", true,
-                "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">annotation_test1 passes.</span></div>\n"
-                + "</div>\n"
-                + "<br>\n"
+                "<hr>\n"
                 + "<pre>@Deprecated(forRemoval=true)\n"
                 + "@Documented\n"
-                + "public @interface <span class=\"memberNameLabel\">TestAnnotationType</span></pre>",
+                + "public @interface <span class=\"memberNameLabel\">TestAnnotationType</span></pre>\n"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
+                + "<div class=\"block\"><span class=\"deprecationComment\">annotation_test1 passes.</span></div>\n"
+                + "</div>\n",
                 "<pre>@Deprecated(forRemoval=true)\n"
                 + "static final&nbsp;int&nbsp;field</pre>\n"
-                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated, for removal: This "
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This "
                 + "API element is subject to removal in a future version.</span>&nbsp;<span class=\"deprecationComment\">annotation_test4 passes.</span></div>",
                 "<pre>@Deprecated(forRemoval=true)\n"
                 + "int&nbsp;required</pre>\n"
-                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;"
                 + "<span class=\"deprecationComment\">annotation_test3 passes.</span></div>",
                 "<pre>java.lang.String&nbsp;optional</pre>\n"
-                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;<span class=\"deprecationComment\">annotation_test2 passes.</span></div>");
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;<span class=\"deprecationComment\">annotation_test2 passes.</span></div>");
 
         checkOutput("pkg/TestClass.html", true,
-                "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes.</span></div>\n"
-                + "</div>\n"
-                + "<br>\n"
+                "<hr>\n"
                 + "<pre>@Deprecated(forRemoval=true)\n"
                 + "public class <span class=\"typeNameLabel\">TestClass</span>\n"
-                + "extends java.lang.Object</pre>",
+                + "extends java.lang.Object</pre>\n"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
+                + "<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes.</span></div>\n"
+                + "</div>",
                 "<pre>@Deprecated(forRemoval=true)\n"
                 + "public&nbsp;TestClass&#8203;()</pre>\n"
-                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;"
                 + "<span class=\"deprecationComment\">class_test3 passes.</span></div>");
 
         checkOutput("pkg/TestEnum.html", true,
-                "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">enum_test1 passes.</span></div>\n"
-                + "</div>\n"
-                + "<br>\n"
+                "<hr>\n"
                 + "<pre>@Deprecated(forRemoval=true)\n"
                 + "public enum <span class=\"typeNameLabel\">TestEnum</span>\n"
-                + "extends java.lang.Enum&lt;<a href=\"../pkg/TestEnum.html\" title=\"enum in pkg\">TestEnum</a>&gt;</pre>",
+                + "extends java.lang.Enum&lt;<a href=\"../pkg/TestEnum.html\" title=\"enum in pkg\">TestEnum</a>&gt;</pre>\n"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
+                + "<div class=\"block\"><span class=\"deprecationComment\">enum_test1 passes.</span></div>\n"
+                + "</div>",
                 "<pre>@Deprecated(forRemoval=true)\n"
                 + "public static final&nbsp;<a href=\"../pkg/TestEnum.html\" title=\"enum in pkg\">TestEnum</a> FOR_REMOVAL</pre>\n"
-                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;"
                 + "<span class=\"deprecationComment\">enum_test3 passes.</span></div>");
 
         checkOutput("pkg/TestError.html", true,
-                "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">error_test1 passes.</span></div>\n"
-                + "</div>\n"
-                + "<br>\n"
+                "<hr>\n"
                 + "<pre>@Deprecated(forRemoval=true)\n"
                 + "public class <span class=\"typeNameLabel\">TestError</span>\n"
-                + "extends java.lang.Error</pre>");
+                + "extends java.lang.Error</pre>\n"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
+                + "<div class=\"block\"><span class=\"deprecationComment\">error_test1 passes.</span></div>\n"
+                + "</div>");
 
         checkOutput("pkg/TestException.html", true,
-                "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">exception_test1 passes.</span></div>\n"
-                + "</div>\n"
-                + "<br>\n"
+                "<hr>\n"
                 + "<pre>@Deprecated(forRemoval=true)\n"
                 + "public class <span class=\"typeNameLabel\">TestException</span>\n"
-                + "extends java.lang.Exception</pre>");
+                + "extends java.lang.Exception</pre>\n"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
+                + "<div class=\"block\"><span class=\"deprecationComment\">exception_test1 passes.</span></div>\n"
+                + "</div>");
 
         checkOutput("pkg/TestInterface.html", true,
-                "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">interface_test1 passes.</span></div>\n"
-                + "</div>\n"
-                + "<br>\n"
+                "<hr>\n"
                 + "<pre>@Deprecated(forRemoval=true)\n"
                 + "public class <span class=\"typeNameLabel\">TestInterface</span>\n"
-                + "extends java.lang.Object</pre>");
+                + "extends java.lang.Object</pre>\n"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
+                + "<div class=\"block\"><span class=\"deprecationComment\">interface_test1 passes.</span></div>\n"
+                + "</div>");
 
         checkOutput("deprecated-list.html", true,
                 "<ul>\n"
--- a/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Tue Sep 26 20:03:48 2017 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6786690 6820360 8025633 8026567 8175200
+ * @bug 6786690 6820360 8025633 8026567 8175200 8183511
  * @summary This test verifies the nesting of definition list tags.
  * @author Bhavesh Patel
  * @library ../lib
@@ -385,7 +385,7 @@
         checkOutput("serialized-form.html", expectFound,
                 "<pre>boolean " +
                 "undecorated</pre>\n" +
-                "<div class=\"block\"><span class=\"deprecatedLabel\">" +
+                "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">" +
                 "Deprecated.</span>&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n" +
                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>" +
                 "setUndecorated(boolean)</code></a>.</span></div>\n" +
--- a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java	Tue Sep 26 20:03:48 2017 -0700
@@ -25,7 +25,7 @@
  * @test
  * @bug 8154119 8154262 8156077 8157987 8154261 8154817 8135291 8155995 8162363
  *      8168766 8168688 8162674 8160196 8175799 8174974 8176778 8177562 8175218 8175823 8166306
- *      8178043 8181622
+ *      8178043 8181622 8183511
  * @summary Test modules support in javadoc.
  * @author bpatel
  * @library ../lib
@@ -446,7 +446,7 @@
     void checkHtml5Description(boolean found) {
         checkOutput("moduleA-summary.html", found,
                 "<section role=\"region\">\n"
-                + "<div class=\"deprecatedContent\"><span class=\"deprecatedLabel\">Deprecated, for removal:"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal:"
                 + " This API element is subject to removal in a future version.</span>\n"
                 + "<div class=\"block\"><span class=\"deprecationComment\">This module is deprecated.</span></div>\n"
                 + "</div>\n"
@@ -1015,7 +1015,7 @@
 
     void checkModuleDeprecation(boolean found) {
         checkOutput("moduleA-summary.html", found,
-                "<div class=\"deprecatedContent\"><span class=\"deprecatedLabel\">Deprecated, for removal:"
+                "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal:"
                 + " This API element is subject to removal in a future version.</span>\n"
                 + "<div class=\"block\"><span class=\"deprecationComment\">This module is deprecated.</span></div>\n"
                 + "</div>");
@@ -1031,12 +1031,12 @@
                 + "</td>\n"
                 + "</tr>");
         checkOutput("moduleB-summary.html", !found,
-                "<div class=\"deprecatedContent\"><span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>\n"
                 + "<div class=\"block\"><span class=\"deprecationComment\">This module is deprecated using just the javadoc tag.</span></div>");
         checkOutput("moduletags-summary.html", found,
                 "<p>@Deprecated\n"
                 + "</p>",
-                "<div class=\"deprecatedContent\"><span class=\"deprecatedLabel\">Deprecated.</span></div>");
+                "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span></div>");
     }
 
     void checkModuleAnnotation() {
--- a/test/langtools/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java	Tue Sep 26 20:03:48 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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,7 +23,7 @@
 
 /*
  * @test
- * @bug      6492694 8026567 8048351 8162363
+ * @bug      6492694 8026567 8048351 8162363 8183511
  * @summary  Test package deprecation.
  * @author   bpatel
  * @library  ../lib/
@@ -48,7 +48,7 @@
         checkExit(Exit.OK);
 
         checkOutput("pkg1/package-summary.html", true,
-            "<div class=\"deprecatedContent\"><span class=\"deprecatedLabel\">Deprecated.</span>\n" +
+            "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>\n" +
             "<div class=\"block\"><span class=\"deprecationComment\">This package is Deprecated." +
             "</span></div>"
         );
--- a/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java	Tue Sep 26 20:03:48 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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,7 +23,7 @@
 
 /*
  * @test
- * @bug 6802694 8025633 8026567
+ * @bug 6802694 8025633 8026567 8183511
  * @summary This test verifies deprecation info in serialized-form.html.
  * @author Bhavesh Patel
  * @library ../lib
@@ -135,7 +135,7 @@
     void checkNoComment(boolean expectFound) {
         checkOutput("serialized-form.html", expectFound,
                 "<pre>boolean undecorated</pre>\n"
-                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;<span class=\"deprecationComment\">"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;<span class=\"deprecationComment\">"
                 + "As of JDK version 1.5, replaced by\n"
                 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>"
                 + "setUndecorated(boolean)</code></a>.</span></div>\n"
--- a/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java	Tue Sep 26 20:03:48 2017 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug      4494033 7028815 7052425 8007338 8023608 8008164 8016549 8072461 8154261 8162363 8160196 8151743 8177417
- *           8175218 8176452 8181215 8182263
+ *           8175218 8176452 8181215 8182263 8183511
  * @summary  Run tests on doclet stylesheet.
  * @author   jamieh
  * @library  ../lib
@@ -186,6 +186,17 @@
                 + ".constantValuesContainer td a:link, .constantValuesContainer td a:visited {\n"
                 + "    font-weight:bold;\n"
                 + "}",
+                ".deprecationBlock {\n"
+                + "    font-size:14px;\n"
+                + "    font-family:'DejaVu Serif', Georgia, \"Times New Roman\", Times, serif;\n"
+                + "    border-style:solid;\n"
+                + "    border-width:thin;\n"
+                + "    border-radius:10px;\n"
+                + "    padding:10px;\n"
+                + "    margin-bottom:10px;\n"
+                + "    margin-right:10px;\n"
+                + "    display:inline-block;\n"
+                + "}",
                 "#reset {\n"
                 + "    background-color: rgb(255,255,255);\n"
                 + "    background-image:url('resources/x.png');\n"
--- a/test/langtools/jdk/javadoc/doclet/testTagOutput/TestTagOutput.java	Tue Sep 26 19:19:09 2017 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testTagOutput/TestTagOutput.java	Tue Sep 26 20:03:48 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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,7 +23,7 @@
 
 /*
  * @test
- * @bug 8026370 8026567
+ * @bug 8026370 8026567 8183511
  * @summary This test checks the generated tag output.
  * @author Bhavesh Patel
  * @library ../lib
@@ -47,12 +47,12 @@
         checkExit(Exit.OK);
 
         checkOutput("pkg1/DeprecatedTag.html", true,
-            "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>",
-            "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;" +
+            "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>",
+            "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;" +
             "<span class=\"deprecationComment\">Do not use this.</span></div>");
 
         checkOutput("pkg1/DeprecatedTag.html", false,
-            "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated." +
+            "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated." +
             "</span>&nbsp;<span class=\"deprecationComment\"></span></div>");
     }
 }