8215307: Pages do not have <h1>
authorjjg
Thu, 21 Feb 2019 14:03:57 -0800
changeset 53879 e7cb0348fa1c
parent 53878 4584d0331318
child 53880 3f1e9372557f
8215307: Pages do not have <h1> Reviewed-by: hannesw
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/AbstractModuleIndexWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractPackageIndexWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesFrameWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllPackagesIndexWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeFieldWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.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/ClassUseWriter.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/ConstantsSummaryWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DeprecatedListWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/EnumConstantWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Headings.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MarkerComments.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleFrameWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexFrameWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModulePackageIndexFrameWriter.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/NestedClassWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageFrameWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexFrameWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageTreeWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageUseWriter.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/PropertyWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlConstants.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Navigation.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css
test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java
test/langtools/jdk/javadoc/doclet/testHeadings/TestHeadings.java
test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java
test/langtools/jdk/javadoc/doclet/testHref/TestHref.java
test/langtools/jdk/javadoc/doclet/testHtmlLandmarkRegions/TestHtmlLandmarkRegions.java
test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java
test/langtools/jdk/javadoc/doclet/testIndexTaglet/TestIndexTaglet.java
test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java
test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java
test/langtools/jdk/javadoc/doclet/testModules/TestModuleServices.java
test/langtools/jdk/javadoc/doclet/testModules/TestModules.java
test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java
test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java
test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java
test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestBadOverride.java
test/langtools/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java
test/langtools/jdk/javadoc/doclet/testSummaryHeading/TestSummaryHeading.java
test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java
test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/TestSystemPropertyTaglet.java
test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocTester.java
test/langtools/jdk/javadoc/lib/javadoc/tester/ShowHeadings.java
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019, 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
@@ -30,7 +30,6 @@
 import java.util.zip.*;
 
 import javax.lang.model.element.Element;
-import javax.lang.model.element.ElementKind;
 import javax.lang.model.element.ExecutableElement;
 import javax.lang.model.element.ModuleElement;
 import javax.lang.model.element.PackageElement;
@@ -38,7 +37,6 @@
 import javax.lang.model.util.SimpleElementVisitor9;
 
 import com.sun.source.doctree.DocTree;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -170,7 +168,7 @@
         String unicode = uc.toString();
         contentTree.addContent(getMarkerAnchorForIndex(unicode));
         Content headContent = new StringContent(unicode);
-        Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, false,
+        Content heading = HtmlTree.HEADING(Headings.CONTENT_HEADING, false,
                 HtmlStyle.title, headContent);
         contentTree.addContent(heading);
     }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -40,12 +40,10 @@
 
 import com.sun.source.doctree.DocTree;
 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
 import jdk.javadoc.internal.doclets.formats.html.markup.Links;
-import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
 import jdk.javadoc.internal.doclets.toolkit.Content;
 import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
 import jdk.javadoc.internal.doclets.toolkit.Resources;
@@ -376,18 +374,6 @@
     }
 
     /**
-     * Get the header for the section.
-     *
-     * @param member the member being documented.
-     * @return a header content for the section.
-     */
-    protected Content getHead(Element member) {
-        Content memberContent = new StringContent(name(member));
-        Content heading = HtmlTree.HEADING(HtmlConstants.MEMBER_HEADING, memberContent);
-        return heading;
-    }
-
-    /**
     * Return true if the given <code>ProgramElement</code> is inherited
     * by the class that is being documented.
     *
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractModuleIndexWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractModuleIndexWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -33,7 +33,6 @@
 import javax.lang.model.element.ModuleElement;
 import javax.lang.model.element.PackageElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -224,7 +223,7 @@
      * @param modules the modules to be documented
      * @param text string which will be used as the heading
      * @param tableSummary summary for the table
-     * @param header the document tree to which the navgational links will be added
+     * @param header the document tree to which the navigational links will be added
      * @param main the document tree to which the modules list will be added
      */
     protected void addIndexContents(Collection<ModuleElement> modules, String text,
@@ -270,7 +269,7 @@
     protected void addConfigurationTitle(Content body) {
         if (configuration.doctitle.length() > 0) {
             Content title = new RawHtml(configuration.doctitle);
-            Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING,
+            Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING,
                     HtmlStyle.title, title);
             Content div = HtmlTree.DIV(HtmlStyle.header, heading);
             body.addContent(div);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractPackageIndexWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractPackageIndexWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -29,7 +29,6 @@
 
 import javax.lang.model.element.PackageElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -180,7 +179,7 @@
     protected void addConfigurationTitle(Content body) {
         if (configuration.doctitle.length() > 0) {
             Content title = new RawHtml(configuration.doctitle);
-            Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING,
+            Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING,
                     HtmlStyle.title, title);
             Content div = HtmlTree.DIV(HtmlStyle.header, heading);
             body.addContent(div);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019, 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
@@ -29,7 +29,6 @@
 
 import javax.lang.model.element.TypeElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -117,7 +116,7 @@
         if (!sset.isEmpty()) {
             TypeElement firstTypeElement = sset.first();
             Content headingContent = contents.getContent(heading);
-            Content sectionHeading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
+            Content sectionHeading = HtmlTree.HEADING(Headings.CONTENT_HEADING, true,
                     headingContent);
             HtmlTree htmlTree = HtmlTree.SECTION(sectionHeading);
             addLevelInfo(!utils.isInterface(firstTypeElement) ? firstTypeElement : null,
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesFrameWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesFrameWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -29,7 +29,6 @@
 import javax.lang.model.element.Element;
 import javax.lang.model.element.TypeElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -112,7 +111,7 @@
         String label = resources.getText("doclet.All_Classes");
         Content body = getBody(false, getWindowTitle(label));
         Content htmlTree = HtmlTree.MAIN();
-        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING,
+        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING,
                 HtmlStyle.bar, contents.allClassesLabel);
         htmlTree.addContent(heading);
         Content ul = new HtmlTree(HtmlTag.UL);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesIndexWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -32,7 +32,6 @@
 
 import com.sun.source.doctree.DocTree;
 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -148,7 +147,7 @@
             }
         }
         Content titleContent = contents.allClassesLabel;
-        Content pHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
+        Content pHeading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
                 HtmlStyle.title, titleContent);
         Content headerDiv = HtmlTree.DIV(HtmlStyle.header, pHeading);
         content.addContent(headerDiv);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllPackagesIndexWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllPackagesIndexWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -27,7 +27,6 @@
 import javax.lang.model.element.PackageElement;
 
 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -94,7 +93,7 @@
         div.setStyle(HtmlStyle.allPackagesContainer);
         addPackages(div);
         Content titleContent = contents.allPackagesLabel;
-        Content pHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
+        Content pHeading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
                 HtmlStyle.title, titleContent);
         Content headerDiv = HtmlTree.DIV(HtmlStyle.header, pHeading);
         mainTree.addContent(headerDiv);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeFieldWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeFieldWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, 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
@@ -33,7 +33,6 @@
 import javax.lang.model.type.TypeMirror;
 
 import jdk.javadoc.internal.doclets.formats.html.markup.TableHeader;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -72,7 +71,7 @@
     public Content getMemberSummaryHeader(TypeElement typeElement,
             Content memberSummaryTree) {
         memberSummaryTree.addContent(
-                HtmlConstants.START_OF_ANNOTATION_TYPE_FIELD_SUMMARY);
+                MarkerComments.START_OF_ANNOTATION_TYPE_FIELD_SUMMARY);
         Content memberTree = writer.getMemberTreeHeader();
         writer.addSummaryHeader(this, typeElement, memberTree);
         return memberTree;
@@ -96,7 +95,7 @@
      * {@inheritDoc}
      */
     public void addAnnotationFieldDetailsMarker(Content memberDetails) {
-        memberDetails.addContent(HtmlConstants.START_OF_ANNOTATION_TYPE_FIELD_DETAILS);
+        memberDetails.addContent(MarkerComments.START_OF_ANNOTATION_TYPE_FIELD_DETAILS);
     }
 
     /**
@@ -107,7 +106,7 @@
         if (!writer.printedAnnotationFieldHeading) {
             memberDetailsTree.addContent(links.createAnchor(
                     SectionName.ANNOTATION_TYPE_FIELD_DETAIL));
-            Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
+            Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
                     contents.fieldDetailsLabel);
             memberDetailsTree.addContent(heading);
             writer.printedAnnotationFieldHeading = true;
@@ -121,7 +120,7 @@
             Content annotationDetailsTree) {
         annotationDetailsTree.addContent(links.createAnchor(name(member)));
         Content annotationDocTree = writer.getMemberTreeHeader();
-        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
+        Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
         heading.addContent(name(member));
         annotationDocTree.addContent(heading);
         return annotationDocTree;
@@ -188,7 +187,7 @@
      * {@inheritDoc}
      */
     public void addSummaryLabel(Content memberTree) {
-        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+        Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
                 contents.fieldSummaryLabel);
         memberTree.addContent(label);
     }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, 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
@@ -33,9 +33,7 @@
 import javax.lang.model.element.ExecutableElement;
 import javax.lang.model.element.TypeElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
-import jdk.javadoc.internal.doclets.formats.html.markup.Navigation;
 import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
 import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeOptionalMemberWriter;
 import jdk.javadoc.internal.doclets.toolkit.Content;
@@ -75,7 +73,7 @@
     public Content getMemberSummaryHeader(TypeElement typeElement,
             Content memberSummaryTree) {
         memberSummaryTree.addContent(
-                HtmlConstants.START_OF_ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY);
+                MarkerComments.START_OF_ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY);
         Content memberTree = writer.getMemberTreeHeader();
         writer.addSummaryHeader(this, typeElement, memberTree);
         return memberTree;
@@ -112,7 +110,7 @@
      */
     @Override
     public void addSummaryLabel(Content memberTree) {
-        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+        Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
                 contents.annotateTypeOptionalMemberSummaryLabel);
         memberTree.addContent(label);
     }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, 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
@@ -33,11 +33,9 @@
 import javax.lang.model.type.TypeMirror;
 
 import jdk.javadoc.internal.doclets.formats.html.markup.TableHeader;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
-import jdk.javadoc.internal.doclets.formats.html.markup.Navigation;
 import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
 import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeRequiredMemberWriter;
 import jdk.javadoc.internal.doclets.toolkit.Content;
@@ -75,7 +73,7 @@
     public Content getMemberSummaryHeader(TypeElement typeElement,
             Content memberSummaryTree) {
         memberSummaryTree.addContent(
-                HtmlConstants.START_OF_ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY);
+                MarkerComments.START_OF_ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY);
         Content memberTree = writer.getMemberTreeHeader();
         writer.addSummaryHeader(this, typeElement, memberTree);
         return memberTree;
@@ -99,7 +97,7 @@
      * {@inheritDoc}
      */
     public void addAnnotationDetailsMarker(Content memberDetails) {
-        memberDetails.addContent(HtmlConstants.START_OF_ANNOTATION_TYPE_DETAILS);
+        memberDetails.addContent(MarkerComments.START_OF_ANNOTATION_TYPE_DETAILS);
     }
 
     /**
@@ -110,7 +108,7 @@
         if (!writer.printedAnnotationHeading) {
             memberDetailsTree.addContent(links.createAnchor(
                     SectionName.ANNOTATION_TYPE_ELEMENT_DETAIL));
-            Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
+            Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
                     contents.annotationTypeDetailsLabel);
             memberDetailsTree.addContent(heading);
             writer.printedAnnotationHeading = true;
@@ -126,7 +124,7 @@
         annotationDetailsTree.addContent(links.createAnchor(
                 simpleName + utils.signature((ExecutableElement) member)));
         Content annotationDocTree = writer.getMemberTreeHeader();
-        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
+        Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
         heading.addContent(simpleName);
         annotationDocTree.addContent(heading);
         return annotationDocTree;
@@ -193,7 +191,7 @@
      * {@inheritDoc}
      */
     public void addSummaryLabel(Content memberTree) {
-        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+        Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
                 contents.annotateTypeRequiredMemberSummaryLabel);
         memberTree.addContent(label);
     }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -32,7 +32,6 @@
 import javax.lang.model.element.TypeElement;
 
 import com.sun.source.doctree.DocTree;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -95,7 +94,7 @@
         navBar.setUserHeader(getUserHeaderFooter(true));
         htmlTree.addContent(navBar.getContent(true));
         bodyTree.addContent(htmlTree);
-        bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
+        bodyTree.addContent(MarkerComments.START_OF_CLASS_DATA);
         HtmlTree div = new HtmlTree(HtmlTag.DIV);
         div.setStyle(HtmlStyle.header);
         if (configuration.showModules) {
@@ -118,7 +117,7 @@
         LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
                 LinkInfoImpl.Kind.CLASS_HEADER, annotationType);
         Content headerContent = new StringContent(header);
-        Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING, true,
+        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
                 HtmlStyle.title, headerContent);
         heading.addContent(getTypeParameterLinks(linkInfo));
         div.addContent(heading);
@@ -139,7 +138,7 @@
      */
     @Override
     public void addFooter(Content contentTree) {
-        contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA);
+        contentTree.addContent(MarkerComments.END_OF_CLASS_DATA);
         Content htmlTree = HtmlTree.FOOTER();
         navBar.setUserFooter(getUserHeaderFooter(false));
         htmlTree.addContent(navBar.getContent(false));
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -42,7 +42,6 @@
 import javax.tools.Diagnostic;
 
 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -325,7 +324,7 @@
                     getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER,
                             typeElement)),
                     getPackageLink(pkg, utils.getPackageName(pkg)));
-            Content heading = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, link);
+            Content heading = HtmlTree.HEADING(Headings.TypeUse.SUMMARY_HEADING, link);
             htmlTree.addContent(heading);
             addClassUse(pkg, htmlTree);
             ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
@@ -452,7 +451,7 @@
         headContent.addContent(contents.getContent("doclet.ClassUse_Title", cltype));
         headContent.addContent(new HtmlTree(HtmlTag.BR));
         headContent.addContent(clname);
-        Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING,
+        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING,
                 true, HtmlStyle.title, headContent);
         Content div = HtmlTree.DIV(HtmlStyle.header, heading);
         mainTree.addContent(div);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -36,7 +36,6 @@
 import javax.lang.model.util.SimpleElementVisitor8;
 
 import com.sun.source.doctree.DocTree;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -116,7 +115,7 @@
         navBar.setUserHeader(getUserHeaderFooter(true));
         htmlTree.addContent(navBar.getContent(true));
         bodyTree.addContent(htmlTree);
-        bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
+        bodyTree.addContent(MarkerComments.START_OF_CLASS_DATA);
         HtmlTree div = new HtmlTree(HtmlTag.DIV);
         div.setStyle(HtmlStyle.header);
         if (configuration.showModules) {
@@ -143,7 +142,7 @@
         //Let's not link to ourselves in the header.
         linkInfo.linkToSelf = false;
         Content headerContent = new StringContent(header);
-        Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING, true,
+        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
                 HtmlStyle.title, headerContent);
         heading.addContent(getTypeParameterLinks(linkInfo));
         div.addContent(heading);
@@ -164,7 +163,7 @@
      */
     @Override
     public void addFooter(Content contentTree) {
-        contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA);
+        contentTree.addContent(MarkerComments.END_OF_CLASS_DATA);
         Content htmlTree = HtmlTree.FOOTER();
         navBar.setUserFooter(getUserHeaderFooter(false));
         htmlTree.addContent(navBar.getContent(false));
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -36,7 +36,6 @@
 import javax.lang.model.element.VariableElement;
 
 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -152,11 +151,11 @@
     @Override
     public void addContentsList(Content contentTree, Content contentListTree) {
         Content titleContent = contents.constantsSummaryTitle;
-        Content pHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
+        Content pHeading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
                 HtmlStyle.title, titleContent);
         Content div = HtmlTree.DIV(HtmlStyle.header, pHeading);
         Content headingContent = contents.contentsHeading;
-        Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
+        Content heading = HtmlTree.HEADING(Headings.CONTENT_HEADING, true,
                 headingContent);
         HtmlTree section = HtmlTree.SECTION(heading);
         section.addContent(contentListTree);
@@ -192,7 +191,7 @@
             pkgNameContent = getPackageLabel(parsedPackageName);
         }
         Content headingContent = new StringContent(".*");
-        Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
+        Content heading = HtmlTree.HEADING(Headings.ConstantsSummary.PACKAGE_HEADING, true,
                 pkgNameContent);
         heading.addContent(headingContent);
         summaryTree = HtmlTree.SECTION(heading);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -34,7 +34,6 @@
 import javax.lang.model.element.ExecutableElement;
 import javax.lang.model.element.TypeElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -98,7 +97,7 @@
     @Override
     public Content getMemberSummaryHeader(TypeElement typeElement,
             Content memberSummaryTree) {
-        memberSummaryTree.addContent(HtmlConstants.START_OF_CONSTRUCTOR_SUMMARY);
+        memberSummaryTree.addContent(MarkerComments.START_OF_CONSTRUCTOR_SUMMARY);
         Content memberTree = writer.getMemberTreeHeader();
         writer.addSummaryHeader(this, typeElement, memberTree);
         return memberTree;
@@ -118,11 +117,11 @@
     @Override
     public Content getConstructorDetailsTreeHeader(TypeElement typeElement,
             Content memberDetailsTree) {
-        memberDetailsTree.addContent(HtmlConstants.START_OF_CONSTRUCTOR_DETAILS);
+        memberDetailsTree.addContent(MarkerComments.START_OF_CONSTRUCTOR_DETAILS);
         Content constructorDetailsTree = writer.getMemberTreeHeader();
         constructorDetailsTree.addContent(links.createAnchor(
                 SectionName.CONSTRUCTOR_DETAIL));
-        Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
+        Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
                 contents.constructorDetailsLabel);
         constructorDetailsTree.addContent(heading);
         return constructorDetailsTree;
@@ -140,7 +139,7 @@
         }
         constructorDetailsTree.addContent(links.createAnchor(writer.getAnchor(constructor)));
         Content constructorDocTree = writer.getMemberTreeHeader();
-        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
+        Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
         heading.addContent(name(constructor));
         constructorDocTree.addContent(heading);
         return constructorDocTree;
@@ -223,7 +222,7 @@
      */
     @Override
     public void addSummaryLabel(Content memberTree) {
-        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+        Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
                 contents.constructorSummaryLabel);
         memberTree.addContent(label);
     }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DeprecatedListWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DeprecatedListWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -38,7 +38,6 @@
 
 import com.sun.source.doctree.DocTree;
 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -336,11 +335,11 @@
      */
     public Content getContentsList(DeprecatedAPIListBuilder deprapi) {
         Content headContent = contents.deprecatedAPI;
-        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
+        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
                 HtmlStyle.title, headContent);
         Content div = HtmlTree.DIV(HtmlStyle.header, heading);
         Content headingContent = contents.contentsHeading;
-        div.addContent(HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
+        div.addContent(HtmlTree.HEADING(Headings.CONTENT_HEADING, true,
                 headingContent));
         Content ul = new HtmlTree(HtmlTag.UL);
         for (DeprElementKind kind : DeprElementKind.values()) {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/EnumConstantWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/EnumConstantWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, 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
@@ -33,11 +33,9 @@
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.element.VariableElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
-import jdk.javadoc.internal.doclets.formats.html.markup.Navigation;
 import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
 import jdk.javadoc.internal.doclets.toolkit.Content;
 import jdk.javadoc.internal.doclets.toolkit.EnumConstantWriter;
@@ -71,7 +69,7 @@
     @Override
     public Content getMemberSummaryHeader(TypeElement typeElement,
             Content memberSummaryTree) {
-        memberSummaryTree.addContent(HtmlConstants.START_OF_ENUM_CONSTANT_SUMMARY);
+        memberSummaryTree.addContent(MarkerComments.START_OF_ENUM_CONSTANT_SUMMARY);
         Content memberTree = writer.getMemberTreeHeader();
         writer.addSummaryHeader(this, typeElement, memberTree);
         return memberTree;
@@ -91,11 +89,11 @@
     @Override
     public Content getEnumConstantsDetailsTreeHeader(TypeElement typeElement,
             Content memberDetailsTree) {
-        memberDetailsTree.addContent(HtmlConstants.START_OF_ENUM_CONSTANT_DETAILS);
+        memberDetailsTree.addContent(MarkerComments.START_OF_ENUM_CONSTANT_DETAILS);
         Content enumConstantsDetailsTree = writer.getMemberTreeHeader();
         enumConstantsDetailsTree.addContent(links.createAnchor(
                 SectionName.ENUM_CONSTANT_DETAIL));
-        Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
+        Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
                 contents.enumConstantDetailLabel);
         enumConstantsDetailsTree.addContent(heading);
         return enumConstantsDetailsTree;
@@ -109,7 +107,7 @@
             Content enumConstantsDetailsTree) {
         enumConstantsDetailsTree.addContent(links.createAnchor(name(enumConstant)));
         Content enumConstantsTree = writer.getMemberTreeHeader();
-        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
+        Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
         heading.addContent(name(enumConstant));
         enumConstantsTree.addContent(heading);
         return enumConstantsTree;
@@ -182,7 +180,7 @@
      */
     @Override
     public void addSummaryLabel(Content memberTree) {
-        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+        Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
                 contents.enumConstantSummary);
         memberTree.addContent(label);
     }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -35,11 +35,9 @@
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.element.VariableElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
-import jdk.javadoc.internal.doclets.formats.html.markup.Navigation;
 import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
 import jdk.javadoc.internal.doclets.toolkit.Content;
 import jdk.javadoc.internal.doclets.toolkit.FieldWriter;
@@ -75,7 +73,7 @@
     @Override
     public Content getMemberSummaryHeader(TypeElement typeElement,
             Content memberSummaryTree) {
-        memberSummaryTree.addContent(HtmlConstants.START_OF_FIELD_SUMMARY);
+        memberSummaryTree.addContent(MarkerComments.START_OF_FIELD_SUMMARY);
         Content memberTree = writer.getMemberTreeHeader();
         writer.addSummaryHeader(this, typeElement, memberTree);
         return memberTree;
@@ -94,11 +92,11 @@
      */
     @Override
     public Content getFieldDetailsTreeHeader(TypeElement typeElement, Content memberDetailsTree) {
-        memberDetailsTree.addContent(HtmlConstants.START_OF_FIELD_DETAILS);
+        memberDetailsTree.addContent(MarkerComments.START_OF_FIELD_DETAILS);
         Content fieldDetailsTree = writer.getMemberTreeHeader();
         fieldDetailsTree.addContent(links.createAnchor(
                 SectionName.FIELD_DETAIL));
-        Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
+        Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
                 contents.fieldDetailsLabel);
         fieldDetailsTree.addContent(heading);
         return fieldDetailsTree;
@@ -111,7 +109,7 @@
     public Content getFieldDocTreeHeader(VariableElement field, Content fieldDetailsTree) {
         fieldDetailsTree.addContent(links.createAnchor(name(field)));
         Content fieldTree = writer.getMemberTreeHeader();
-        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
+        Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
         heading.addContent(name(field));
         fieldTree.addContent(heading);
         return fieldTree;
@@ -186,7 +184,7 @@
      */
     @Override
     public void addSummaryLabel(Content memberTree) {
-        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+        Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
                 contents.fieldSummaryLabel);
         memberTree.addContent(label);
     }
@@ -247,7 +245,7 @@
                     ? resources.getText("doclet.Fields_Inherited_From_Class")
                     : resources.getText("doclet.Fields_Inherited_From_Interface"));
         }
-        Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING,
+        Content labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.INHERITED_SUMMARY_HEADING,
                 label);
         labelHeading.addContent(Contents.SPACE);
         labelHeading.addContent(classLink);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Headings.java	Thu Feb 21 14:03:57 2019 -0800
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 1998, 2019, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+
+/**
+ * Aliases for HTML heading tags (H1..H6) for different kinds of pages.
+ *
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ */
+class Headings {
+    /**
+     * Standard top-level heading for the page title for all pages.
+     */
+    static final HtmlTag PAGE_TITLE_HEADING = HtmlTag.H1;
+
+    /**
+     * Standard second-level heading for sundry pages that do
+     * not have their own page group.
+     */
+    static final HtmlTag CONTENT_HEADING = HtmlTag.H2;
+
+    /**
+     * Headings for the page for a module declaration.
+     */
+    static class ModuleDeclaration {
+        static final HtmlTag SUMMARY_HEADING = HtmlTag.H2;
+    }
+
+    /**
+     * Headings for the page for a type declaration.
+     * This includes classes, interfaces, enums and annotation types.
+     */
+    static class TypeDeclaration {
+        /**
+         * Heading for the different summary lists:
+         * Field Summary, Constructor Summary, Method Summary, etc.
+         */
+        static final HtmlTag SUMMARY_HEADING = HtmlTag.H2;
+
+        /**
+         * Subheading within a summary for the inherited elements:
+         * inherited methods, etc
+         */
+        static final HtmlTag INHERITED_SUMMARY_HEADING = HtmlTag.H3;
+
+        /**
+         * Heading for the different detail lists:
+         * Field Details, Constructor Details, Method Details, etc.
+         */
+        static final HtmlTag DETAILS_HEADING = HtmlTag.H2;
+
+        /**
+         * Subheading with a Details list for an individual element.
+         */
+        static final HtmlTag MEMBER_HEADING = HtmlTag.H3;
+    }
+
+    /**
+     * Headings for the Constants Summary page.
+     */
+    static class ConstantsSummary {
+        static final HtmlTag PACKAGE_HEADING = HtmlTag.H2;
+    }
+
+    /**
+     * Headings for the Serialized Form page.
+     */
+    static class SerializedForm {
+        /**
+         * Heading for the package name, preceding a list of types.
+         */
+        static final HtmlTag PACKAGE_HEADING = HtmlTag.H2;
+
+        /**
+         * Heading for a type name within a package.
+         */
+        static final HtmlTag CLASS_HEADING = HtmlTag.H3;
+
+        /**
+         * Subheading for info within a type.
+         */
+        static final HtmlTag CLASS_SUBHEADING = HtmlTag.H4;
+
+        /**
+         * Heading for an individual member element within a type.
+         */
+        static final HtmlTag MEMBER_HEADING = HtmlTag.H5;
+    }
+
+    /**
+     * Headings for a type Use page.
+     */
+    static class TypeUse {
+        static final HtmlTag SUMMARY_HEADING = HtmlTag.H2;
+    }
+
+    /**
+     * Headings for index frames pages.
+     */
+    static class IndexFrames {
+        /** Heading for a list of module names in an index frame. */
+        static final HtmlTag MODULE_HEADING = HtmlTag.H2;
+        /** Heading for a list of package names in an index frame. */
+        static final HtmlTag PACKAGE_HEADING = HtmlTag.H2;
+    }
+}
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -25,7 +25,6 @@
 
 package jdk.javadoc.internal.doclets.formats.html;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -113,7 +112,7 @@
      */
     protected void addHelpFileContents(Content contentTree) {
         // Heading
-        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false, HtmlStyle.title,
+        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, false, HtmlStyle.title,
                 contents.getContent("doclet.help.main_heading"));
         Content div = HtmlTree.DIV(HtmlStyle.header, heading);
         Content intro = HtmlTree.DIV(HtmlStyle.subTitle,
@@ -126,7 +125,7 @@
 
         // Overview
         if (configuration.createoverview) {
-            Content overviewHeading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+            Content overviewHeading = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                 contents.overviewLabel);
             htmlTree = HtmlTree.SECTION(overviewHeading);
             String overviewKey = configuration.showModules
@@ -143,7 +142,7 @@
 
         // Module
         if (configuration.showModules) {
-            Content moduleHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+            Content moduleHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                     contents.moduleLabel);
             htmlTree = HtmlTree.SECTION(moduleHead);
             Content moduleIntro = contents.getContent("doclet.help.module.intro");
@@ -158,7 +157,7 @@
         }
 
         // Package
-        Content packageHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+        Content packageHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                 contents.packageLabel);
         htmlTree = HtmlTree.SECTION(packageHead);
         Content packageIntro = contents.getContent("doclet.help.package.intro");
@@ -175,7 +174,7 @@
         ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
 
         // Class/interface
-        Content classHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+        Content classHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                 contents.getContent("doclet.help.class_interface.head"));
         htmlTree = HtmlTree.SECTION(classHead);
         Content classIntro = contents.getContent("doclet.help.class_interface.intro");
@@ -210,7 +209,7 @@
         ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
 
         // Annotation Types
-        Content aHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+        Content aHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                 contents.annotationType);
         htmlTree = HtmlTree.SECTION(aHead);
         Content aIntro = contents.getContent("doclet.help.annotation_type.intro");
@@ -226,7 +225,7 @@
         ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
 
         // Enums
-        Content enumHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, contents.enum_);
+        Content enumHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, contents.enum_);
         htmlTree = HtmlTree.SECTION(enumHead);
         Content eIntro = contents.getContent("doclet.help.enum.intro");
         Content enumPara = HtmlTree.P(eIntro);
@@ -241,7 +240,7 @@
 
         // Class Use
         if (configuration.classuse) {
-            Content useHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+            Content useHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                     contents.getContent("doclet.help.use.head"));
             htmlTree = HtmlTree.SECTION(useHead);
             Content useBody = contents.getContent("doclet.help.use.body");
@@ -252,7 +251,7 @@
 
         // Tree
         if (configuration.createtree) {
-            Content treeHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+            Content treeHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                     contents.getContent("doclet.help.tree.head"));
             htmlTree = HtmlTree.SECTION(treeHead);
             Content treeIntro = contents.getContent("doclet.help.tree.intro",
@@ -270,7 +269,7 @@
 
         // Deprecated
         if (!(configuration.nodeprecatedlist || configuration.nodeprecated)) {
-            Content dHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+            Content dHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                     contents.deprecatedAPI);
             htmlTree = HtmlTree.SECTION(dHead);
             Content deprBody = contents.getContent("doclet.help.deprecated.body",
@@ -291,7 +290,7 @@
                 indexlink = links.createLink(DocPaths.INDEX_ALL,
                         resources.getText("doclet.Index"));
             }
-            Content indexHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+            Content indexHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                     contents.getContent("doclet.help.index.head"));
             htmlTree = HtmlTree.SECTION(indexHead);
             Content indexBody = contents.getContent("doclet.help.index.body", indexlink);
@@ -302,7 +301,7 @@
 
         // Frames
         if (configuration.frames) {
-            Content frameHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+            Content frameHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                     contents.getContent("doclet.help.frames.head"));
             htmlTree = HtmlTree.SECTION(frameHead);
             Content framesBody = contents.getContent("doclet.help.frames.body");
@@ -313,7 +312,7 @@
         }
 
         // Serialized Form
-        Content sHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+        Content sHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                 contents.serializedForm);
         htmlTree = HtmlTree.SECTION(sHead);
         Content serialBody = contents.getContent("doclet.help.serial_form.body");
@@ -322,7 +321,7 @@
         ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
 
         // Constant Field Values
-        Content constHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+        Content constHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                 contents.constantsSummaryTitle);
         htmlTree = HtmlTree.SECTION(constHead);
         Content constantsBody = contents.getContent("doclet.help.constants.body",
@@ -333,7 +332,7 @@
         ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
 
         // Search
-        Content searchHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+        Content searchHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                 contents.getContent("doclet.help.search.head"));
         htmlTree = HtmlTree.SECTION(searchHead);
         Content searchBody = contents.getContent("doclet.help.search.body");
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019, 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
@@ -41,11 +41,9 @@
 
 import jdk.javadoc.doclet.Doclet;
 import jdk.javadoc.doclet.DocletEnvironment;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlVersion;
 import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
-import jdk.javadoc.internal.doclets.toolkit.Content;
 import jdk.javadoc.internal.doclets.toolkit.DocletException;
 import jdk.javadoc.internal.doclets.toolkit.Messages;
 import jdk.javadoc.internal.doclets.toolkit.Resources;
@@ -83,6 +81,11 @@
 public class HtmlConfiguration extends BaseConfiguration {
 
     /**
+     * Default charset for HTML.
+     */
+    public static final String HTML_DEFAULT_CHARSET = "utf-8";
+
+    /**
      * Argument for command line option "-header".
      */
     public String header = "";
@@ -762,7 +765,7 @@
     protected boolean finishOptionSettings0() throws DocletException {
         if (docencoding == null) {
             if (charset == null) {
-                docencoding = charset = (encoding == null) ? HtmlConstants.HTML_DEFAULT_CHARSET : encoding;
+                docencoding = charset = (encoding == null) ? HTML_DEFAULT_CHARSET : encoding;
             } else {
                 docencoding = charset;
             }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019, 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
@@ -34,7 +34,6 @@
 import com.sun.source.doctree.DocTree;
 
 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -108,8 +107,7 @@
         li.setStyle(HtmlStyle.blockList);
         if (serializableFieldsTree.isValid()) {
             Content headingContent = new StringContent(heading);
-            Content serialHeading = HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING,
-                    headingContent);
+            Content serialHeading = HtmlTree.HEADING(Headings.SerializedForm.CLASS_SUBHEADING, headingContent);
             li.addContent(serialHeading);
             li.addContent(serializableFieldsTree);
         }
@@ -120,7 +118,7 @@
     public void addMemberHeader(TypeElement fieldType, String fieldTypeStr,
             String fieldDimensions, String fieldName, Content contentTree) {
         Content nameContent = new StringContent(fieldName);
-        Content heading = HtmlTree.HEADING(HtmlConstants.MEMBER_HEADING, nameContent);
+        Content heading = HtmlTree.HEADING(Headings.SerializedForm.MEMBER_HEADING, nameContent);
         contentTree.addContent(heading);
         Content pre = new HtmlTree(HtmlTag.PRE);
         if (fieldType == null) {
@@ -138,7 +136,7 @@
     @Override
     public void addMemberHeader(TypeMirror fieldType, String fieldName, Content contentTree) {
         Content nameContent = new StringContent(fieldName);
-        Content heading = HtmlTree.HEADING(HtmlConstants.MEMBER_HEADING, nameContent);
+        Content heading = HtmlTree.HEADING(HtmlTag.H5, nameContent);
         contentTree.addContent(heading);
         Content pre = new HtmlTree(HtmlTag.PRE);
         Content fieldContent = writer.getLink(new LinkInfoImpl(
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019, 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
@@ -29,7 +29,6 @@
 import javax.lang.model.element.TypeElement;
 
 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -95,8 +94,7 @@
      */
     public Content getSerializableMethods(String heading, Content serializableMethodContent) {
         Content headingContent = new StringContent(heading);
-        Content serialHeading = HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING,
-                headingContent);
+        Content serialHeading = HtmlTree.HEADING(Headings.SerializedForm.CLASS_SUBHEADING, headingContent);
         Content li = HtmlTree.LI(HtmlStyle.blockList, serialHeading);
         li.addContent(serializableMethodContent);
         return li;
@@ -120,7 +118,9 @@
      * @param methodsContentTree the content tree to which the member header will be added
      */
     public void addMemberHeader(ExecutableElement member, Content methodsContentTree) {
-        methodsContentTree.addContent(getHead(member));
+        Content memberContent = new StringContent(name(member));
+        Content heading = HtmlTree.HEADING(Headings.SerializedForm.MEMBER_HEADING, memberContent);
+        methodsContentTree.addContent(heading);
         methodsContentTree.addContent(getSignature(member));
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MarkerComments.java	Thu Feb 21 14:03:57 2019 -0800
@@ -0,0 +1,198 @@
+/*
+ * Copyright (c) 2010, 2019, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.Comment;
+
+/**
+ *  Marker comments to identify regions in the generated files.
+ *
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public class MarkerComments {
+
+    /**
+     * Marker to identify start of top navigation bar.
+     */
+    public static final Comment START_OF_TOP_NAVBAR =
+            new Comment("========= START OF TOP NAVBAR =======");
+
+    /**
+     * Marker to identify start of bottom navigation bar.
+     */
+    public static final Comment START_OF_BOTTOM_NAVBAR =
+            new Comment("======= START OF BOTTOM NAVBAR ======");
+
+    /**
+     * Marker to identify end of top navigation bar.
+     */
+    public static final Comment END_OF_TOP_NAVBAR =
+            new Comment("========= END OF TOP NAVBAR =========");
+
+    /**
+     * Marker to identify end of bottom navigation bar.
+     */
+    public static final Comment END_OF_BOTTOM_NAVBAR =
+            new Comment("======== END OF BOTTOM NAVBAR =======");
+
+    /**
+     * Marker to identify start of module description.
+     */
+    public static final Comment START_OF_MODULE_DESCRIPTION =
+            new Comment("============ MODULE DESCRIPTION ===========");
+
+    /**
+     * Marker to identify start of modules summary.
+     */
+    public static final Comment START_OF_MODULES_SUMMARY =
+            new Comment("============ MODULES SUMMARY ===========");
+
+    /**
+     * Marker to identify start of packages summary.
+     */
+    public static final Comment START_OF_PACKAGES_SUMMARY =
+            new Comment("============ PACKAGES SUMMARY ===========");
+
+    /**
+     * Marker to identify start of services summary.
+     */
+    public static final Comment START_OF_SERVICES_SUMMARY =
+            new Comment("============ SERVICES SUMMARY ===========");
+
+    /**
+     * Marker to identify start of class data.
+     */
+    public static final Comment START_OF_CLASS_DATA =
+            new Comment("======== START OF CLASS DATA ========");
+
+    /**
+     * Marker to identify end of class data.
+     */
+    public static final Comment END_OF_CLASS_DATA =
+            new Comment("========= END OF CLASS DATA =========");
+
+    /**
+     * Marker to identify start of nested class summary.
+     */
+    public static final Comment START_OF_NESTED_CLASS_SUMMARY =
+            new Comment("======== NESTED CLASS SUMMARY ========");
+
+    /**
+     * Marker to identify start of annotation type optional member summary.
+     */
+    public static final Comment START_OF_ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY =
+            new Comment("=========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY ===========");
+
+    /**
+     * Marker to identify start of annotation type required member summary.
+     */
+    public static final Comment START_OF_ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY =
+            new Comment("=========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY ===========");
+
+    /**
+     * Marker to identify start of annotation type required member summary.
+     */
+    public static final Comment START_OF_ANNOTATION_TYPE_FIELD_SUMMARY =
+            new Comment("=========== ANNOTATION TYPE FIELD SUMMARY ===========");
+
+    /**
+     * Marker to identify start of constructor summary.
+     */
+    public static final Comment START_OF_CONSTRUCTOR_SUMMARY =
+            new Comment("======== CONSTRUCTOR SUMMARY ========");
+
+    /**
+     * Marker to identify start of enum constants summary.
+     */
+    public static final Comment START_OF_ENUM_CONSTANT_SUMMARY =
+            new Comment("=========== ENUM CONSTANT SUMMARY ===========");
+
+    /**
+     * Marker to identify start of field summary.
+     */
+    public static final Comment START_OF_FIELD_SUMMARY =
+            new Comment("=========== FIELD SUMMARY ===========");
+
+    /**
+     * Marker to identify start of properties summary.
+     */
+    public static final Comment START_OF_PROPERTY_SUMMARY =
+            new Comment("=========== PROPERTY SUMMARY ===========");
+
+    /**
+     * Marker to identify start of method summary.
+     */
+    public static final Comment START_OF_METHOD_SUMMARY =
+            new Comment("========== METHOD SUMMARY ===========");
+
+    /**
+     * Marker to identify start of annotation type details.
+     */
+    public static final Comment START_OF_ANNOTATION_TYPE_DETAILS =
+            new Comment("============ ANNOTATION TYPE MEMBER DETAIL ===========");
+
+    /**
+     * Marker to identify start of annotation type field details.
+     */
+    public static final Comment START_OF_ANNOTATION_TYPE_FIELD_DETAILS =
+            new Comment("============ ANNOTATION TYPE FIELD DETAIL ===========");
+
+    /**
+     * Marker to identify start of method details.
+     */
+    public static final Comment START_OF_METHOD_DETAILS =
+            new Comment("============ METHOD DETAIL ==========");
+
+    /**
+     * Marker to identify start of field details.
+     */
+    public static final Comment START_OF_FIELD_DETAILS =
+            new Comment("============ FIELD DETAIL ===========");
+
+    /**
+     * Marker to identify start of property details.
+     */
+    public static final Comment START_OF_PROPERTY_DETAILS =
+            new Comment("============ PROPERTY DETAIL ===========");
+
+    /**
+     * Marker to identify start of constructor details.
+     */
+    public static final Comment START_OF_CONSTRUCTOR_DETAILS =
+            new Comment("========= CONSTRUCTOR DETAIL ========");
+
+    /**
+     * Marker to identify start of enum constants details.
+     */
+    public static final Comment START_OF_ENUM_CONSTANT_DETAILS =
+            new Comment("============ ENUM CONSTANT DETAIL ===========");
+
+}
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -36,7 +36,6 @@
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.type.TypeMirror;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -87,7 +86,7 @@
      */
     @Override
     public Content getMemberSummaryHeader(TypeElement typeElement, Content memberSummaryTree) {
-        memberSummaryTree.addContent(HtmlConstants.START_OF_METHOD_SUMMARY);
+        memberSummaryTree.addContent(MarkerComments.START_OF_METHOD_SUMMARY);
         Content memberTree = writer.getMemberTreeHeader();
         writer.addSummaryHeader(this, typeElement, memberTree);
         return memberTree;
@@ -106,10 +105,10 @@
      */
     @Override
     public Content getMethodDetailsTreeHeader(TypeElement typeElement, Content memberDetailsTree) {
-        memberDetailsTree.addContent(HtmlConstants.START_OF_METHOD_DETAILS);
+        memberDetailsTree.addContent(MarkerComments.START_OF_METHOD_DETAILS);
         Content methodDetailsTree = writer.getMemberTreeHeader();
         methodDetailsTree.addContent(links.createAnchor(SectionName.METHOD_DETAIL));
-        Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
+        Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
                 contents.methodDetailLabel);
         methodDetailsTree.addContent(heading);
         return methodDetailsTree;
@@ -126,7 +125,7 @@
         }
         methodDetailsTree.addContent(links.createAnchor(writer.getAnchor(method)));
         Content methodDocTree = writer.getMemberTreeHeader();
-        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
+        Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
         heading.addContent(name(method));
         methodDocTree.addContent(heading);
         return methodDocTree;
@@ -229,7 +228,7 @@
      */
     @Override
     public void addSummaryLabel(Content memberTree) {
-        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+        Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
                 contents.methodSummary);
         memberTree.addContent(label);
     }
@@ -295,7 +294,7 @@
                     ? resources.getText("doclet.Methods_Inherited_From_Class")
                     : resources.getText("doclet.Methods_Inherited_From_Interface"));
         }
-        Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING,
+        Content labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.INHERITED_SUMMARY_HEADING,
                 label);
         labelHeading.addContent(Contents.SPACE);
         labelHeading.addContent(classLink);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleFrameWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleFrameWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -32,7 +32,6 @@
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.util.ElementFilter;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -101,7 +100,7 @@
         DocPath moduleSummary = configuration.useModuleDirectories
                 ? DocPaths.DOT_DOT.resolve(configuration.docPaths.moduleSummary(moduleElement))
                 : configuration.docPaths.moduleSummary(moduleElement);
-        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar,
+        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, HtmlStyle.bar,
                 mdlgen.links.createLink(moduleSummary, mdlLabel, "", "classFrame"));
         htmlTree.addContent(heading);
         HtmlTree div = new HtmlTree(HtmlTag.DIV);
@@ -172,7 +171,7 @@
                     continue;
                 }
                 if (!printedHeader) {
-                    Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+                    Content heading = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                             true, labelContent);
                     htmlTree.addContent(heading);
                     printedHeader = true;
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexFrameWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexFrameWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -32,7 +32,6 @@
 import javax.lang.model.element.PackageElement;
 
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlAttr;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -57,6 +56,12 @@
  * @author Bhavesh Patel
  */
 public class ModuleIndexFrameWriter extends AbstractModuleIndexWriter {
+    /**
+     * The heading (h1 or h2) to use for the module list,
+     * set by addNavigationBarHeader depending on whether or not there
+     * is an additional initial heading.
+     */
+    private HtmlTag moduleListHeading;
 
     /**
      * Construct the ModuleIndexFrameWriter object.
@@ -83,8 +88,9 @@
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void addModulesList(Content main) {
-        Content heading = HtmlTree.HEADING(HtmlConstants.MODULE_HEADING, true,
+        Content heading = HtmlTree.HEADING(moduleListHeading, true,
                 contents.modulesLabel);
         HtmlTree htmlTree = HtmlTree.DIV(HtmlStyle.indexContainer, heading);
         HtmlTree ul = new HtmlTree(HtmlTag.UL);
@@ -125,15 +131,16 @@
      * {@inheritDoc}
      */
     protected void addNavigationBarHeader(Content header) {
-        Content headerContent;
-        if (configuration.packagesheader.length() > 0) {
-            headerContent = new RawHtml(replaceDocRootDir(configuration.packagesheader));
+        String headerContent = !configuration.packagesheader.isEmpty() ? configuration.packagesheader
+                : configuration.header;
+        if (!headerContent.isEmpty()) {
+            Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
+                    HtmlStyle.bar, new RawHtml(replaceDocRootDir(headerContent)));
+            header.addContent(heading);
+            moduleListHeading = Headings.IndexFrames.MODULE_HEADING;
         } else {
-            headerContent = new RawHtml(replaceDocRootDir(configuration.header));
+            moduleListHeading = Headings.PAGE_TITLE_HEADING;
         }
-        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
-                HtmlStyle.bar, headerContent);
-        header.addContent(heading);
     }
 
     /**
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModulePackageIndexFrameWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModulePackageIndexFrameWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -33,7 +33,6 @@
 import javax.lang.model.element.ModuleElement;
 import javax.lang.model.element.PackageElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -57,6 +56,12 @@
  * @author Bhavesh Patel
  */
 public class ModulePackageIndexFrameWriter extends AbstractModuleIndexWriter {
+    /**
+     * The heading (h1 or h2) to use for the module packages list,
+     * set by addNavigationBarHeader depending on whether or not there
+     * is an additional initial heading.
+     */
+    private HtmlTag modulePackagesListHeading;
 
     /**
      * Construct the ModulePackageIndexFrameWriter object.
@@ -89,7 +94,7 @@
     protected void addModulePackagesList(Map<ModuleElement, Set<PackageElement>> modules, String text,
             String tableSummary, Content main, ModuleElement mdle) {
         Content profNameContent = new StringContent(mdle.getQualifiedName().toString());
-        Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
+        Content heading = HtmlTree.HEADING(modulePackagesListHeading, true,
                 getTargetModuleLink("classFrame", profNameContent, mdle));
         heading.addContent(Contents.SPACE);
         heading.addContent(contents.packagesLabel);
@@ -112,7 +117,7 @@
     protected void addModulePackagesList(Set<ModuleElement> modules, String text,
             String tableSummary, Content body, ModuleElement mdle) {
         Content moduleNameContent = new StringContent(mdle.getQualifiedName().toString());
-        Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
+        Content heading = HtmlTree.HEADING(modulePackagesListHeading, true,
                 getTargetModuleLink("classFrame", moduleNameContent, mdle));
         heading.addContent(Contents.SPACE);
         heading.addContent(contents.packagesLabel);
@@ -157,15 +162,16 @@
      * {@inheritDoc}
      */
     protected void addNavigationBarHeader(Content header) {
-        Content headerContent;
-        if (configuration.packagesheader.length() > 0) {
-            headerContent = new RawHtml(replaceDocRootDir(configuration.packagesheader));
+        String headerContent = !configuration.packagesheader.isEmpty() ? configuration.packagesheader
+                : configuration.header;
+        if (!headerContent.isEmpty()) {
+            Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
+                    HtmlStyle.bar, new RawHtml(replaceDocRootDir(headerContent)));
+            header.addContent(heading);
+            modulePackagesListHeading = Headings.IndexFrames.PACKAGE_HEADING;
         } else {
-            headerContent = new RawHtml(replaceDocRootDir(configuration.header));
+            modulePackagesListHeading = Headings.PAGE_TITLE_HEADING;
         }
-        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
-                HtmlStyle.bar, headerContent);
-        header.addContent(heading);
     }
 
     /**
@@ -177,6 +183,7 @@
     /**
      * Do nothing as there is no modules list on this page.
      */
+    @Override
     protected void addModulesList(Content body) {
     }
 
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -46,7 +46,6 @@
 import com.sun.source.doctree.DocTree;
 import jdk.javadoc.doclet.DocletEnvironment.ModuleMode;
 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -213,7 +212,7 @@
         div.addContent(annotationContent);
         Content label = mdle.isOpen() && (configuration.docEnv.getModuleMode() == ModuleMode.ALL)
                 ? contents.openModuleLabel : contents.moduleLabel;
-        Content tHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
+        Content tHeading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
                 HtmlStyle.title, label);
         tHeading.addContent(Contents.SPACE);
         Content moduleHead = new RawHtml(heading);
@@ -461,7 +460,7 @@
             Content htmltree) {
         htmltree.addContent(startMarker);
         htmltree.addContent(links.createAnchor(markerAnchor));
-        htmltree.addContent(HtmlTree.HEADING(HtmlTag.H3, heading));
+        htmltree.addContent(HtmlTree.HEADING(Headings.ModuleDeclaration.SUMMARY_HEADING, heading));
     }
 
     /**
@@ -509,7 +508,7 @@
                             contents.descriptionLabel);
             HtmlTree li = new HtmlTree(HtmlTag.LI);
             li.setStyle(HtmlStyle.blockList);
-            addSummaryHeader(HtmlConstants.START_OF_MODULES_SUMMARY, SectionName.MODULES,
+            addSummaryHeader(MarkerComments.START_OF_MODULES_SUMMARY, SectionName.MODULES,
                     contents.navModules, li);
             if (display(requires)) {
                 String text = resources.getText("doclet.Requires_Summary");
@@ -561,7 +560,7 @@
                 || display(indirectPackages) || display(indirectOpenPackages)) {
             HtmlTree li = new HtmlTree(HtmlTag.LI);
             li.setStyle(HtmlStyle.blockList);
-            addSummaryHeader(HtmlConstants.START_OF_PACKAGES_SUMMARY, SectionName.PACKAGES,
+            addSummaryHeader(MarkerComments.START_OF_PACKAGES_SUMMARY, SectionName.PACKAGES,
                     contents.navPackages, li);
             if (display(packages)) {
                 addPackageSummary(li);
@@ -740,7 +739,7 @@
         if (haveProvides || haveUses) {
             HtmlTree li = new HtmlTree(HtmlTag.LI);
             li.setStyle(HtmlStyle.blockList);
-            addSummaryHeader(HtmlConstants.START_OF_SERVICES_SUMMARY, SectionName.SERVICES,
+            addSummaryHeader(MarkerComments.START_OF_SERVICES_SUMMARY, SectionName.SERVICES,
                     contents.navServices, li);
             TableHeader usesProvidesTableHeader =
                     new TableHeader(contents.typeLabel, contents.descriptionLabel);
@@ -869,7 +868,7 @@
         if (!utils.getFullBody(mdle).isEmpty()) {
             Content tree = HtmlTree.SECTION();
             addDeprecationInfo(tree);
-            tree.addContent(HtmlConstants.START_OF_MODULE_DESCRIPTION);
+            tree.addContent(MarkerComments.START_OF_MODULE_DESCRIPTION);
             tree.addContent(links.createAnchor(SectionName.MODULE_DESCRIPTION));
             addInlineComment(mdle, tree);
             moduleContentTree.addContent(tree);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -34,10 +34,8 @@
 import javax.lang.model.element.Element;
 import javax.lang.model.element.TypeElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
-import jdk.javadoc.internal.doclets.formats.html.markup.Navigation;
 import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
 import jdk.javadoc.internal.doclets.toolkit.Content;
 import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
@@ -72,7 +70,7 @@
     @Override
     public Content getMemberSummaryHeader(TypeElement typeElement,
             Content memberSummaryTree) {
-        memberSummaryTree.addContent(HtmlConstants.START_OF_NESTED_CLASS_SUMMARY);
+        memberSummaryTree.addContent(MarkerComments.START_OF_NESTED_CLASS_SUMMARY);
         Content memberTree = writer.getMemberTreeHeader();
         writer.addSummaryHeader(this, typeElement, memberTree);
         return memberTree;
@@ -91,7 +89,7 @@
      */
     @Override
     public void addSummaryLabel(Content memberTree) {
-        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+        Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
                 contents.nestedClassSummary);
         memberTree.addContent(label);
     }
@@ -155,8 +153,7 @@
                     ? resources.getText("doclet.Nested_Classes_Interfaces_Inherited_From_Interface")
                     : resources.getText("doclet.Nested_Classes_Interfaces_Inherited_From_Class"));
         }
-        Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING,
-                label);
+        Content labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING, label);
         labelHeading.addContent(Contents.SPACE);
         labelHeading.addContent(classLink);
         inheritedTree.addContent(labelHeading);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageFrameWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageFrameWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -30,7 +30,6 @@
 import javax.lang.model.element.PackageElement;
 import javax.lang.model.element.TypeElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -102,7 +101,7 @@
         HtmlTree body = packgen.getBody(false, packgen.getWindowTitle(pkgName));
         Content pkgNameContent = new StringContent(pkgName);
         HtmlTree htmlTree = HtmlTree.MAIN();
-        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar,
+        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, HtmlStyle.bar,
                 packgen.getTargetPackageLink(packageElement, "classFrame", pkgNameContent));
         htmlTree.addContent(heading);
         HtmlTree div = new HtmlTree(HtmlTag.DIV);
@@ -178,7 +177,7 @@
                     continue;
                 }
                 if (!printedHeader) {
-                    Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+                    Content heading = HtmlTree.HEADING(Headings.CONTENT_HEADING,
                                                        true, labelContent);
                     htmlTree.addContent(heading);
                     printedHeader = true;
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexFrameWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexFrameWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -27,7 +27,6 @@
 
 import javax.lang.model.element.PackageElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -79,7 +78,7 @@
      */
     @Override
     protected void addPackagesList(Content main) {
-        Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
+        Content heading = HtmlTree.HEADING(Headings.IndexFrames.PACKAGE_HEADING, true,
                 contents.packagesLabel);
         HtmlTree htmlTree = HtmlTree.DIV(HtmlStyle.indexContainer, heading);
         HtmlTree ul = new HtmlTree(HtmlTag.UL);
@@ -130,7 +129,7 @@
         } else {
             headerContent = new RawHtml(replaceDocRootDir(configuration.header));
         }
-        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
+        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
                 HtmlStyle.bar, headerContent);
         header.addContent(heading);
     }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageTreeWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageTreeWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -27,7 +27,6 @@
 
 import javax.lang.model.element.PackageElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -101,7 +100,7 @@
         HtmlTree mainTree = HtmlTree.MAIN();
         Content headContent = contents.getContent("doclet.Hierarchy_For_Package",
                 utils.getPackageName(packageElement));
-        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
+        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, false,
                 HtmlStyle.title, headContent);
         Content div = HtmlTree.DIV(HtmlStyle.header, heading);
         if (configuration.packages.size() > 1) {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageUseWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageUseWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -34,7 +34,6 @@
 import javax.lang.model.element.TypeElement;
 
 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -252,7 +251,7 @@
         headContent.addContent(contents.getContent("doclet.ClassUse_Title", packageText));
         headContent.addContent(new HtmlTree(HtmlTag.BR));
         headContent.addContent(name);
-        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
+        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
                 HtmlStyle.title, headContent);
         Content div = HtmlTree.DIV(HtmlStyle.header, heading);
         mainTree.addContent(div);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -36,7 +36,6 @@
 
 import com.sun.source.doctree.DocTree;
 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -129,7 +128,7 @@
         Content annotationContent = new HtmlTree(HtmlTag.P);
         addAnnotationInfo(packageElement, annotationContent);
         div.addContent(annotationContent);
-        Content tHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
+        Content tHeading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
                 HtmlStyle.title, contents.packageLabel);
         tHeading.addContent(Contents.SPACE);
         Content packageHead = new StringContent(heading);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -33,7 +33,6 @@
 import javax.lang.model.element.ExecutableElement;
 import javax.lang.model.element.TypeElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -68,7 +67,7 @@
      */
     @Override
     public Content getMemberSummaryHeader(TypeElement typeElement, Content memberSummaryTree) {
-        memberSummaryTree.addContent(HtmlConstants.START_OF_PROPERTY_SUMMARY);
+        memberSummaryTree.addContent(MarkerComments.START_OF_PROPERTY_SUMMARY);
         Content memberTree = writer.getMemberTreeHeader();
         writer.addSummaryHeader(this, typeElement, memberTree);
         return memberTree;
@@ -88,10 +87,10 @@
     @Override
     public Content getPropertyDetailsTreeHeader(TypeElement typeElement,
             Content memberDetailsTree) {
-        memberDetailsTree.addContent(HtmlConstants.START_OF_PROPERTY_DETAILS);
+        memberDetailsTree.addContent(MarkerComments.START_OF_PROPERTY_DETAILS);
         Content propertyDetailsTree = writer.getMemberTreeHeader();
         propertyDetailsTree.addContent(links.createAnchor(SectionName.PROPERTY_DETAIL));
-        Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
+        Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
                 contents.propertyDetailsLabel);
         propertyDetailsTree.addContent(heading);
         return propertyDetailsTree;
@@ -105,7 +104,7 @@
             Content propertyDetailsTree) {
         propertyDetailsTree.addContent(links.createAnchor(name(property)));
         Content propertyDocTree = writer.getMemberTreeHeader();
-        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
+        Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
         heading.addContent(utils.getPropertyLabel(name(property)));
         propertyDocTree.addContent(heading);
         return propertyDocTree;
@@ -200,7 +199,7 @@
      */
     @Override
     public void addSummaryLabel(Content memberTree) {
-        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+        Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
                 contents.propertySummaryLabel);
         memberTree.addContent(label);
     }
@@ -261,7 +260,7 @@
                     ? resources.getText("doclet.Properties_Inherited_From_Class")
                     : resources.getText("doclet.Properties_Inherited_From_Interface"));
         }
-        Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING,
+        Content labelHeading = HtmlTree.HEADING(Headings.TypeDeclaration.INHERITED_SUMMARY_HEADING,
                 label);
         labelHeading.addContent(Contents.SPACE);
         labelHeading.addContent(classLink);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriterImpl.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriterImpl.java	Thu Feb 21 14:03:57 2019 -0800
@@ -29,7 +29,6 @@
 
 import javax.lang.model.element.TypeElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -42,7 +41,7 @@
 import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
 
 /**
- * Generate the Serialized Form Information Page.
+ *  Generates the Serialized Form Information Page, <i>serialized-form.html</i>.
  *
  *  <p><b>This is NOT part of any supported API.
  *  If you write code that depends on this, you do so at your own risk.
@@ -86,7 +85,7 @@
         htmlTree.addContent(navBar.getContent(true));
         bodyTree.addContent(htmlTree);
         Content h1Content = new StringContent(header);
-        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
+        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, true,
                 HtmlStyle.title, h1Content);
         Content div = HtmlTree.DIV(HtmlStyle.header, heading);
         mainTree.addContent(div);
@@ -120,7 +119,7 @@
      * @return a content tree for the package header
      */
     public Content getPackageHeader(String packageName) {
-        Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
+        Content heading = HtmlTree.HEADING(Headings.SerializedForm.PACKAGE_HEADING, true,
                 contents.packageLabel);
         heading.addContent(Contents.SPACE);
         heading.addContent(packageName);
@@ -173,8 +172,7 @@
             contents.getContent(
             "doclet.Class_0_extends_implements_serializable", classLink,
             superClassLink);
-        li.addContent(HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING,
-                className));
+        li.addContent(HtmlTree.HEADING(Headings.SerializedForm.CLASS_HEADING, className));
         return li;
     }
 
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java	Thu Feb 21 14:03:57 2019 -0800
@@ -29,7 +29,6 @@
 
 import javax.lang.model.element.PackageElement;
 
-import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
@@ -108,7 +107,7 @@
     public void generateTreeFile() throws DocFileIOException {
         HtmlTree body = getTreeHeader();
         Content headContent = contents.hierarchyForAllPackages;
-        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
+        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, false,
                 HtmlStyle.title, headContent);
         Content div = HtmlTree.DIV(HtmlStyle.header, heading);
         addPackageTreeLinks(div);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlConstants.java	Thu Feb 21 10:29:16 2019 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,252 +0,0 @@
-/*
- * Copyright (c) 2010, 2016, 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * 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 jdk.javadoc.internal.doclets.formats.html.markup;
-
-import jdk.javadoc.internal.doclets.toolkit.Content;
-
-/**
- * Stores constants for Html Doclet.
- *
- *  <p><b>This is NOT part of any supported API.
- *  If you write code that depends on this, you do so at your own risk.
- *  This code and its internal interfaces are subject to change or
- *  deletion without notice.</b>
- *
- * @author Bhavesh Patel
- */
-public class HtmlConstants {
-
-    /**
-     * Marker to identify start of top navigation bar.
-     */
-    public static final Content START_OF_TOP_NAVBAR =
-            new Comment("========= START OF TOP NAVBAR =======");
-
-    /**
-     * Marker to identify start of bottom navigation bar.
-     */
-    public static final Content START_OF_BOTTOM_NAVBAR =
-            new Comment("======= START OF BOTTOM NAVBAR ======");
-
-    /**
-     * Marker to identify end of top navigation bar.
-     */
-    public static final Content END_OF_TOP_NAVBAR =
-            new Comment("========= END OF TOP NAVBAR =========");
-
-    /**
-     * Marker to identify end of bottom navigation bar.
-     */
-    public static final Content END_OF_BOTTOM_NAVBAR =
-            new Comment("======== END OF BOTTOM NAVBAR =======");
-
-    /**
-     * Marker to identify start of module description.
-     */
-    public static final Content START_OF_MODULE_DESCRIPTION =
-            new Comment("============ MODULE DESCRIPTION ===========");
-
-    /**
-     * Marker to identify start of modules summary.
-     */
-    public static final Content START_OF_MODULES_SUMMARY =
-            new Comment("============ MODULES SUMMARY ===========");
-
-    /**
-     * Marker to identify start of packages summary.
-     */
-    public static final Content START_OF_PACKAGES_SUMMARY =
-            new Comment("============ PACKAGES SUMMARY ===========");
-
-    /**
-     * Marker to identify start of services summary.
-     */
-    public static final Content START_OF_SERVICES_SUMMARY =
-            new Comment("============ SERVICES SUMMARY ===========");
-
-    /**
-     * Marker to identify start of class data.
-     */
-    public static final Content START_OF_CLASS_DATA =
-            new Comment("======== START OF CLASS DATA ========");
-
-    /**
-     * Marker to identify end of class data.
-     */
-    public static final Content END_OF_CLASS_DATA =
-            new Comment("========= END OF CLASS DATA =========");
-
-    /**
-     * Marker to identify start of nested class summary.
-     */
-    public static final Content START_OF_NESTED_CLASS_SUMMARY =
-            new Comment("======== NESTED CLASS SUMMARY ========");
-
-    /**
-     * Marker to identify start of annotation type optional member summary.
-     */
-    public static final Content START_OF_ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY =
-            new Comment("=========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY ===========");
-
-    /**
-     * Marker to identify start of annotation type required member summary.
-     */
-    public static final Content START_OF_ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY =
-            new Comment("=========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY ===========");
-
-    /**
-     * Marker to identify start of annotation type required member summary.
-     */
-    public static final Content START_OF_ANNOTATION_TYPE_FIELD_SUMMARY =
-            new Comment("=========== ANNOTATION TYPE FIELD SUMMARY ===========");
-
-    /**
-     * Marker to identify start of constructor summary.
-     */
-    public static final Content START_OF_CONSTRUCTOR_SUMMARY =
-            new Comment("======== CONSTRUCTOR SUMMARY ========");
-
-    /**
-     * Marker to identify start of enum constants summary.
-     */
-    public static final Content START_OF_ENUM_CONSTANT_SUMMARY =
-            new Comment("=========== ENUM CONSTANT SUMMARY ===========");
-
-    /**
-     * Marker to identify start of field summary.
-     */
-    public static final Content START_OF_FIELD_SUMMARY =
-            new Comment("=========== FIELD SUMMARY ===========");
-
-    /**
-     * Marker to identify start of properties summary.
-     */
-    public static final Content START_OF_PROPERTY_SUMMARY =
-            new Comment("=========== PROPERTY SUMMARY ===========");
-
-    /**
-     * Marker to identify start of method summary.
-     */
-    public static final Content START_OF_METHOD_SUMMARY =
-            new Comment("========== METHOD SUMMARY ===========");
-
-    /**
-     * Marker to identify start of annotation type details.
-     */
-    public static final Content START_OF_ANNOTATION_TYPE_DETAILS =
-            new Comment("============ ANNOTATION TYPE MEMBER DETAIL ===========");
-
-    /**
-     * Marker to identify start of annotation type field details.
-     */
-    public static final Content START_OF_ANNOTATION_TYPE_FIELD_DETAILS =
-            new Comment("============ ANNOTATION TYPE FIELD DETAIL ===========");
-
-    /**
-     * Marker to identify start of method details.
-     */
-    public static final Content START_OF_METHOD_DETAILS =
-            new Comment("============ METHOD DETAIL ==========");
-
-    /**
-     * Marker to identify start of field details.
-     */
-    public static final Content START_OF_FIELD_DETAILS =
-            new Comment("============ FIELD DETAIL ===========");
-
-    /**
-     * Marker to identify start of property details.
-     */
-    public static final Content START_OF_PROPERTY_DETAILS =
-            new Comment("============ PROPERTY DETAIL ===========");
-
-    /**
-     * Marker to identify start of constructor details.
-     */
-    public static final Content START_OF_CONSTRUCTOR_DETAILS =
-            new Comment("========= CONSTRUCTOR DETAIL ========");
-
-    /**
-     * Marker to identify start of enum constants details.
-     */
-    public static final Content START_OF_ENUM_CONSTANT_DETAILS =
-            new Comment("============ ENUM CONSTANT DETAIL ===========");
-
-    /**
-     * Html tag for the page title heading.
-     */
-    public static final HtmlTag TITLE_HEADING = HtmlTag.H1;
-
-    /**
-     * Html tag for the class page title heading.
-     */
-    public static final HtmlTag CLASS_PAGE_HEADING = HtmlTag.H2;
-
-    /**
-     * Html tag for the content heading.
-     */
-    public static final HtmlTag CONTENT_HEADING = HtmlTag.H2;
-
-    /**
-     * Html tag for the package name heading.
-     */
-    public static final HtmlTag PACKAGE_HEADING = HtmlTag.H2;
-
-    /**
-     * Html tag for the module name heading.
-     */
-    public static final HtmlTag MODULE_HEADING = HtmlTag.H2;
-
-    /**
-     * Html tag for the member summary heading.
-     */
-    public static final HtmlTag SUMMARY_HEADING = HtmlTag.H3;
-
-    /**
-     * Html tag for the inherited member summary heading.
-     */
-    public static final HtmlTag INHERITED_SUMMARY_HEADING = HtmlTag.H3;
-
-    /**
-     * Html tag for the member details heading.
-     */
-    public static final HtmlTag DETAILS_HEADING = HtmlTag.H3;
-
-    /**
-     * Html tag for the serialized member heading.
-     */
-    public static final HtmlTag SERIALIZED_MEMBER_HEADING = HtmlTag.H3;
-
-    /**
-     * Html tag for the member heading.
-     */
-    public static final HtmlTag MEMBER_HEADING = HtmlTag.H4;
-
-    /**
-     * Default charset for HTML.
-     */
-    public static final String HTML_DEFAULT_CHARSET = "utf-8";
-}
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Navigation.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Navigation.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, 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
@@ -42,6 +42,7 @@
 import jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter;
 import jdk.javadoc.internal.doclets.formats.html.Contents;
 import jdk.javadoc.internal.doclets.formats.html.HtmlConfiguration;
+import jdk.javadoc.internal.doclets.formats.html.MarkerComments;
 import jdk.javadoc.internal.doclets.formats.html.SectionName;
 import jdk.javadoc.internal.doclets.toolkit.Content;
 import jdk.javadoc.internal.doclets.toolkit.builders.MemberSummaryBuilder;
@@ -106,8 +107,8 @@
     }
 
     enum Position {
-        BOTTOM(HtmlConstants.START_OF_BOTTOM_NAVBAR, HtmlConstants.END_OF_BOTTOM_NAVBAR),
-        TOP(HtmlConstants.START_OF_TOP_NAVBAR, HtmlConstants.END_OF_TOP_NAVBAR);
+        BOTTOM(MarkerComments.START_OF_BOTTOM_NAVBAR, MarkerComments.END_OF_BOTTOM_NAVBAR),
+        TOP(MarkerComments.START_OF_TOP_NAVBAR, MarkerComments.END_OF_TOP_NAVBAR);
 
         final Content startOfNav;
         final Content endOfNav;
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, 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
@@ -304,8 +304,8 @@
                     Content noCustomizationMsg = methodWriter.getNoCustomizationMsg(
                             resources.getText("doclet.Serializable_no_customization"));
                     classContentTree.addContent(methodWriter.getSerializableMethods(
-                    resources.getText("doclet.Serialized_Form_methods"),
-                    noCustomizationMsg));
+                            resources.getText("doclet.Serialized_Form_methods"),
+                            noCustomizationMsg));
                 }
             }
         }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Thu Feb 21 10:29:16 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Thu Feb 21 14:03:57 2019 -0800
@@ -296,25 +296,32 @@
 /*
  * Styles for headings.
  */
-div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
+div.details ul.blockList ul.blockList ul.blockList li.blockList h3,
+div.details ul.blockList ul.blockList ul.blockListLast li.blockList h3,
+div.serializedFormContainer ul.blockList ul.blockList ul.blockList li.blockList h4 {
     background-color:#dee3e9;
     border:1px solid #d0d9e0;
     margin:0 0 6px -8px;
     padding:7px 5px;
 }
-ul.blockList ul.blockList ul.blockList li.blockList h3 {
+div.details h2,
+div.summary h2 {
+    font-style: italic;
+}
+div.details h3,
+div.summary h3 {
+    font-style: normal;
+}
+ul.blockList ul.blockList ul.blockList li.blockList h2 {
     background-color:#dee3e9;
     border:1px solid #d0d9e0;
     margin:0 0 6px -8px;
     padding:7px 5px;
 }
-ul.blockList ul.blockList li.blockList h3 {
+ul.blockList ul.blockList li.blockList h2 {
     padding:0;
     margin:15px 0;
 }
-ul.blockList li.blockList h2 {
-    padding:0px 0 20px 0;
-}
 /*
  * Styles for page layout containers.
  */
@@ -597,7 +604,8 @@
 .docSummary {
     padding:0;
 }
-ul.blockList ul.blockList ul.blockList li.blockList h3 {
+ul.blockList ul.blockList ul.blockList li.blockList h3,
+ul.blockList ul.blockList ul.blockListLast li.blockList h3 {
     font-style:normal;
 }
 div.block {
--- a/test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java	Thu Feb 21 14:03:57 2019 -0800
@@ -57,11 +57,11 @@
                 + "<li><a href=\"#annotation.type."
                 + "field.detail\">Field</a>&nbsp;|&nbsp;</li>",
                 "<!-- =========== ANNOTATION TYPE FIELD SUMMARY =========== -->",
-                "<h3>Field Summary</h3>",
+                "<h2>Field Summary</h2>",
                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"#DEFAULT_NAME\">DEFAULT_NAME</a></span>"
                 + "</code></th>",
                 "<!-- ============ ANNOTATION TYPE FIELD DETAIL =========== -->",
-                "<h4>DEFAULT_NAME</h4>\n"
+                "<h3>DEFAULT_NAME</h3>\n"
                 + "<pre>static final&nbsp;java."
                 + "lang.String&nbsp;DEFAULT_NAME</pre>");
 
@@ -77,13 +77,13 @@
                     "<li class=\"blockList\"><a id=\"annotation.type.element.detail\">",
                     "<!--   -->",
                     "</a>",
-                    "<h3>Element Detail</h3>",
+                    "<h2>Element Detail</h2>",
                     "<a id=\"value()\">",
                     "<!--   -->",
                     "</a>",
                     "<ul class=\"blockListLast\">",
                     "<li class=\"blockList\">",
-                    "<h4>value</h4>",
+                    "<h3>value</h3>",
                     "<pre>int&nbsp;value</pre>" );
 
         checkOutput("pkg/AnnotationType.html", false,
--- a/test/langtools/jdk/javadoc/doclet/testHeadings/TestHeadings.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testHeadings/TestHeadings.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, 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
@@ -37,23 +37,6 @@
 
 public class TestHeadings extends JavadocTester {
 
-    private static final String[][] TEST = {
-
-        {
-        },
-        { "serialized-form.html"
-        },
-        { "serialized-form.html"
-        },
-
-        {
-        },
-        { "overview-frame.html"
-        },
-        {
-        }
-    };
-
     public static void main(String... args) throws Exception {
         TestHeadings tester = new TestHeadings();
         tester.runTests();
@@ -108,7 +91,7 @@
                 "<h2 title=\"Package\">Package&nbsp;pkg1</h2>",
                 "<h3>Class <a href=\"pkg1/C1.html\" title=\"class in pkg1\">"
                 + "pkg1.C1</a> extends java.lang.Object implements Serializable</h3>",
-                "<h3>Serialized Fields</h3>");
+                "<h4>Serialized Fields</h4>");
 
         // Overview Frame
         checkOutput("overview-frame.html", true,
--- a/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testHiddenTag/TestHiddenTag.java	Thu Feb 21 14:03:57 2019 -0800
@@ -67,8 +67,8 @@
         checkOutput("pkg1/A.VisibleInner.html", true,
                 "<code><a href=\"A.html#visibleField\">visibleField</a></code>",
                 "<code><a href=\"A.html#visibleMethod()\">visibleMethod</a></code>",
-                "<h3>Nested classes/interfaces inherited from class&nbsp;pkg1." +
-                "<a href=\"A.html\" title=\"class in pkg1\">A</a></h3>\n" +
+                "<h2>Nested classes/interfaces inherited from class&nbsp;pkg1." +
+                "<a href=\"A.html\" title=\"class in pkg1\">A</a></h2>\n" +
                 "<code><a href=\"A.VisibleInner.html\" title=\"class in pkg1\">" +
                 "A.VisibleInner</a>, <a href=\"A.VisibleInnerExtendsInvisibleInner.html\" " +
                 "title=\"class in pkg1\">A.VisibleInnerExtendsInvisibleInner</a></code></li>\n" +
--- a/test/langtools/jdk/javadoc/doclet/testHref/TestHref.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testHref/TestHref.java	Thu Feb 21 14:03:57 2019 -0800
@@ -75,7 +75,7 @@
 
         checkOutput("pkg/C4.html", true,
                 //Header does not link to the page itself.
-                "Class C4&lt;E extends C4&lt;E&gt;&gt;</h2>",
+                "Class C4&lt;E extends C4&lt;E&gt;&gt;</h1>",
                 //Signature does not link to the page itself.
                 "public abstract class <span class=\"typeNameLabel\">C4&lt;E extends C4&lt;E&gt;&gt;</span>"
         );
--- a/test/langtools/jdk/javadoc/doclet/testHtmlLandmarkRegions/TestHtmlLandmarkRegions.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlLandmarkRegions/TestHtmlLandmarkRegions.java	Thu Feb 21 14:03:57 2019 -0800
@@ -109,7 +109,7 @@
         Path srcDir = base.resolve("src");
         createPackages(srcDir);
 
-        Path outDir = base.resolve("out3");
+        Path outDir = base.resolve("out");
         javadoc("-d", outDir.toString(),
                 "-doctitle", "Document Title",
                 "-header", "Test Header",
@@ -153,7 +153,7 @@
                 + "  </body>\n"
                 + "</html>"));
 
-        Path outDir = base.resolve("out5");
+        Path outDir = base.resolve("out");
         javadoc("-d", outDir.toString(),
                 "-sourcepath", srcDir.toString(),
                 "pkg1", "pkg2");
@@ -171,12 +171,12 @@
 
     void createModules(Path srcDir) throws Exception {
         new ModuleBuilder(tb, "m1")
-                .classes("package p1; public class a{}")
-                .classes("package p2; public class b{}")
+                .classes("package p1; public class a { }")
+                .classes("package p2; public class b { }")
                 .write(srcDir);
         new ModuleBuilder(tb, "m2")
-                .classes("package p3; public class c{}")
-                .classes("package p4; public class d{}")
+                .classes("package p3; public class c { }")
+                .classes("package p4; public class d { }")
                 .write(srcDir);
     }
 
--- a/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java	Thu Feb 21 14:03:57 2019 -0800
@@ -349,46 +349,46 @@
                 + "<li class=\"blockList\"><a id=\"nested.class.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Nested Class Summary</h3>\n"
+                + "<h2>Nested Class Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n<table>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a id=\"field.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Field Summary</h3>\n"
+                + "<h2>Field Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n<table>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Constructor Summary</h3>\n"
+                + "<h2>Constructor Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n<table>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a id=\"method.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Method Summary</h3>",
+                + "<h2>Method Summary</h2>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a id=\"field.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Field Detail</h3>",
+                + "<h2>Field Detail</h2>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Constructor Detail</h3>",
+                + "<h2>Constructor Detail</h2>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a id=\"method.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Method Detail</h3>",
+                + "<h2>Method Detail</h2>",
                 "<footer role=\"contentinfo\">\n"
                 + "<nav role=\"navigation\">\n"
                 + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
@@ -411,7 +411,7 @@
                 + "<li class=\"blockList\"><a id=\"enum.constant.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Enum Constant Summary</h3>\n"
+                + "<h2>Enum Constant Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n",
                 "<table aria-labelledby=\"t0\">\n",
                 "<section role=\"region\">\n"
@@ -419,7 +419,7 @@
                 + "<li class=\"blockList\"><a id=\"method.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Method Summary</h3>\n"
+                + "<h2>Method Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n",
                 "<table aria-labelledby=\"t0\">",
                 "<section role=\"region\">\n"
@@ -427,13 +427,13 @@
                 + "<li class=\"blockList\"><a id=\"enum.constant.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Enum Constant Detail</h3>",
+                + "<h2>Enum Constant Detail</h2>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a id=\"method.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Method Detail</h3>",
+                + "<h2>Method Detail</h2>",
                 "<footer role=\"contentinfo\">\n"
                 + "<nav role=\"navigation\">\n"
                 + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
@@ -456,7 +456,7 @@
                 + "<li class=\"blockList\"><a id=\"method.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Method Summary</h3>\n"
+                + "<h2>Method Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n",
                 "<table aria-labelledby=\"t0\">\n",
                 "<section role=\"region\">\n"
@@ -464,7 +464,7 @@
                 + "<li class=\"blockList\"><a id=\"method.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Method Detail</h3>",
+                + "<h2>Method Detail</h2>",
                 "<footer role=\"contentinfo\">\n"
                 + "<nav role=\"navigation\">\n"
                 + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
@@ -487,13 +487,13 @@
                 + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Constructor Summary</h3>",
+                + "<h2>Constructor Summary</h2>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Constructor Detail</h3>",
+                + "<h2>Constructor Detail</h2>",
                 "<footer role=\"contentinfo\">\n"
                 + "<nav role=\"navigation\">\n"
                 + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
@@ -516,13 +516,13 @@
                 + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Constructor Summary</h3>",
+                + "<h2>Constructor Summary</h2>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Constructor Detail</h3>",
+                + "<h2>Constructor Detail</h2>",
                 "<footer role=\"contentinfo\">\n"
                 + "<nav role=\"navigation\">\n"
                 + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
@@ -545,21 +545,21 @@
                 + "<li class=\"blockList\"><a id=\"annotation.type.required.element.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Required Element Summary</h3>\n"
+                + "<h2>Required Element Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n<table>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a id=\"annotation.type.optional.element.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Optional Element Summary</h3>\n"
+                + "<h2>Optional Element Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n<table>",
                 "<section role=\"region\">\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a id=\"annotation.type.element.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Element Detail</h3>",
+                + "<h2>Element Detail</h2>",
                 "<footer role=\"contentinfo\">\n"
                 + "<nav role=\"navigation\">\n"
                 + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
@@ -581,7 +581,7 @@
                 "<section role=\"region\"><a id=\"pkg\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Uses of <a href=\"../RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+                + "<h2>Uses of <a href=\"../RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h2>\n"
                 + "<div class=\"useSummary\">\n<table>",
                 "<footer role=\"contentinfo\">\n"
                 + "<nav role=\"navigation\">\n"
@@ -823,7 +823,7 @@
                 + "<li class=\"blockList\"><a name=\"nested.class.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Nested Class Summary</h3>\n"
+                + "<h2>Nested Class Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n"
                 + "<table summary=\"Nested Class Summary table, listing nested classes, and an explanation\">",
                 "<!-- =========== FIELD SUMMARY =========== -->\n"
@@ -831,7 +831,7 @@
                 + "<li class=\"blockList\"><a name=\"field.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Field Summary</h3>\n"
+                + "<h2>Field Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n"
                 + "<table summary=\"Field Summary table, listing fields, and an explanation\">",
                 "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
@@ -839,7 +839,7 @@
                 + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Constructor Summary</h3>\n"
+                + "<h2>Constructor Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n"
                 + "<table summary=\"Constructor Summary table, listing constructors, and an explanation\">",
                 "<!-- ========== METHOD SUMMARY =========== -->\n"
@@ -847,7 +847,7 @@
                 + "<li class=\"blockList\"><a name=\"method.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Method Summary</h3>\n"
+                + "<h2>Method Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n"
                 + "<table summary=\"Method Summary table, listing methods, and an explanation\">",
                 "<!-- ============ FIELD DETAIL =========== -->\n"
@@ -855,19 +855,19 @@
                 + "<li class=\"blockList\"><a name=\"field.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Field Detail</h3>",
+                + "<h2>Field Detail</h2>",
                 "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Constructor Detail</h3>",
+                + "<h2>Constructor Detail</h2>",
                 "<!-- ============ METHOD DETAIL ========== -->\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a name=\"method.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Method Detail</h3>");
+                + "<h2>Method Detail</h2>");
 
         // Negated test for enum page
         checkOutput("pkg/AnotherClass.ModalExclusionType.html", false,
@@ -883,7 +883,7 @@
                 + "<li class=\"blockList\"><a name=\"enum.constant.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Enum Constant Summary</h3>\n"
+                + "<h2>Enum Constant Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n"
                 + "<table summary=\"Enum Constant Summary table, listing enum constants, and an explanation\">",
                 "<!-- ========== METHOD SUMMARY =========== -->\n"
@@ -891,7 +891,7 @@
                 + "<li class=\"blockList\"><a name=\"method.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Method Summary</h3>\n"
+                + "<h2>Method Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n"
                 + "<table summary=\"Method Summary table, listing methods, and an explanation\">",
                 "<!-- ============ ENUM CONSTANT DETAIL =========== -->\n"
@@ -899,13 +899,13 @@
                 + "<li class=\"blockList\"><a name=\"enum.constant.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Enum Constant Detail</h3>",
+                + "<h2>Enum Constant Detail</h2>",
                 "<!-- ============ METHOD DETAIL ========== -->\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a name=\"method.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Method Detail</h3>");
+                + "<h2>Method Detail</h2>");
 
         // Negated test for interface page
         checkOutput("pkg2/Interface.html", false,
@@ -921,7 +921,7 @@
                 + "<li class=\"blockList\"><a name=\"method.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Method Summary</h3>\n"
+                + "<h2>Method Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n"
                 + "<table summary=\"Method Summary table, listing methods, and an explanation\">",
                 "<!-- ============ METHOD DETAIL ========== -->\n"
@@ -929,7 +929,7 @@
                 + "<li class=\"blockList\"><a name=\"method.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Method Detail</h3>");
+                + "<h2>Method Detail</h2>");
 
         // Negated test for error page
         checkOutput("pkg/TestError.html", false,
@@ -945,13 +945,13 @@
                 + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Constructor Summary</h3>",
+                + "<h2>Constructor Summary</h2>",
                 "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Constructor Detail</h3>");
+                + "<h2>Constructor Detail</h2>");
 
         // Negated test for exception page
         checkOutput("pkg/TestException.html", false,
@@ -967,13 +967,13 @@
                 + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Constructor Summary</h3>",
+                + "<h2>Constructor Summary</h2>",
                 "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Constructor Detail</h3>");
+                + "<h2>Constructor Detail</h2>");
 
         // Negated test for annotation page
         checkOutput("pkg2/TestAnnotationType.html", false,
@@ -989,7 +989,7 @@
                 + "<li class=\"blockList\"><a name=\"annotation.type.required.element.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Required Element Summary</h3>\n"
+                + "<h2>Required Element Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n"
                 + "<table summary=\"Required Element Summary table, listing required elements, and an explanation\">",
                 "<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->\n"
@@ -997,7 +997,7 @@
                 + "<li class=\"blockList\"><a name=\"annotation.type.optional.element.summary\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Optional Element Summary</h3>\n"
+                + "<h2>Optional Element Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n"
                 + "<table summary=\"Optional Element Summary table, listing optional elements, and an explanation\">",
                 "<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->\n"
@@ -1005,7 +1005,7 @@
                 + "<li class=\"blockList\"><a name=\"annotation.type.element.detail\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Element Detail</h3>");
+                + "<h2>Element Detail</h2>");
 
         // Negated test for class use page
         checkOutput("pkg1/class-use/RegClass.html", false,
@@ -1027,7 +1027,7 @@
                 "<li class=\"blockList\"><a name=\"pkg\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
-                + "<h3>Uses of <a href=\"../RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+                + "<h2>Uses of <a href=\"../RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h2>\n"
                 + "<div class=\"useSummary\">\n<table summary=\"Use table, listing fields, and an explanation\">");
 
         // Negated test for main index page
--- a/test/langtools/jdk/javadoc/doclet/testIndexTaglet/TestIndexTaglet.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testIndexTaglet/TestIndexTaglet.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, 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
@@ -75,12 +75,12 @@
         checkExit(Exit.OK);
 
         checkOrder("pkg/A.html",
-                "<h3>Method Detail</h3>\n",
+                "<h2>Method Detail</h2>\n",
                 "<div class=\"block\">test description with <a id=\"search_phrase_a\" "
                  +    "class=\"searchTagResult\">search_phrase_a</a></div>");
 
         checkOrder("pkg/A.html",
-                "<h3>Method Summary</h3>\n",
+                "<h2>Method Summary</h2>\n",
                 "<div class=\"block\">test description with search_phrase_a</div>");
     }
 
--- a/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java	Thu Feb 21 14:03:57 2019 -0800
@@ -131,7 +131,7 @@
                 "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n");
 
         checkOutput("pkg/ClassWithStaticMembers.html", true,
-                "<h4>f</h4>\n"
+                "<h3>f</h3>\n"
                 + "<pre>public static&nbsp;int f</pre>\n"
                 + "<div class=\"block\">A hider field</div>",
 
@@ -142,7 +142,7 @@
                 + "<div class=\"block\">A hider method</div>\n"
                 + "</td>\n",
 
-                "<h4>staticMethod</h4>\n"
+                "<h3>staticMethod</h3>\n"
                 + "<pre class=\"methodSignature\">public static&nbsp;void&nbsp;staticMethod()</pre>\n"
                 + "<div class=\"block\"><span class=\"descfrmTypeLabel\">"
                 + "Description copied from interface:&nbsp;<code>"
@@ -183,8 +183,8 @@
 
         checkOutput("pkg2/Spliterator.OfDouble.html", true,
             // Ensure the correct type parameters are displayed correctly
-            "<h3>Nested classes/interfaces inherited from interface&nbsp;pkg2."
-            + "<a href=\"Spliterator.html\" title=\"interface in pkg2\">Spliterator</a></h3>\n"
+            "<h2>Nested classes/interfaces inherited from interface&nbsp;pkg2."
+            + "<a href=\"Spliterator.html\" title=\"interface in pkg2\">Spliterator</a></h2>\n"
             + "<code><a href=\"Spliterator.OfDouble.html\" title=\"interface in pkg2\">"
             + "Spliterator.OfDouble</a>, <a href=\"Spliterator.OfInt.html\" "
             + "title=\"interface in pkg2\">Spliterator.OfInt</a>&lt;"
--- a/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java	Thu Feb 21 14:03:57 2019 -0800
@@ -86,14 +86,14 @@
                 + "<a href=\"#pausedProperty\">paused</a></span></code></th>\n"
                 + "<td class=\"colLast\">\n"
                 + "<div class=\"block\">Defines if paused.</div>",
-                "<h4>paused</h4>\n"
+                "<h3>paused</h3>\n"
                 + "<pre>public final&nbsp;<a href=\"C.BooleanProperty.html\" "
                 + "title=\"class in pkg1\">C.BooleanProperty</a> pausedProperty</pre>\n"
                 + "<div class=\"block\">Defines if paused. The second line.</div>",
-                "<h4>isPaused</h4>\n"
+                "<h3>isPaused</h3>\n"
                 + "<pre class=\"methodSignature\">public final&nbsp;double&nbsp;isPaused()</pre>\n"
                 + "<div class=\"block\">Gets the value of the property paused.</div>",
-                "<h4>setPaused</h4>\n"
+                "<h3>setPaused</h3>\n"
                 + "<pre class=\"methodSignature\">public final&nbsp;void&nbsp;setPaused&#8203;(boolean&nbsp;value)</pre>\n"
                 + "<div class=\"block\">Sets the value of the property paused.</div>\n"
                 + "<dl>\n"
@@ -101,7 +101,7 @@
                 + "<dd>Defines if paused. The second line.</dd>\n"
                 + "<dt><span class=\"simpleTagLabel\">Default value:</span></dt>\n"
                 + "<dd>false</dd>",
-                "<h4>isPaused</h4>\n"
+                "<h3>isPaused</h3>\n"
                 + "<pre class=\"methodSignature\">public final&nbsp;double&nbsp;isPaused()</pre>\n"
                 + "<div class=\"block\">Gets the value of the property paused.</div>\n"
                 + "<dl>\n"
@@ -109,13 +109,13 @@
                 + "<dd>Defines if paused. The second line.</dd>\n"
                 + "<dt><span class=\"simpleTagLabel\">Default value:</span></dt>\n"
                 + "<dd>false</dd>",
-                "<h4>rate</h4>\n"
+                "<h3>rate</h3>\n"
                 + "<pre>public final&nbsp;<a href=\"C.DoubleProperty.html\" "
                 + "title=\"class in pkg1\">C.DoubleProperty</a> rateProperty</pre>\n"
                 + "<div class=\"block\">Defines the direction/speed at which the "
                 + "<code>Timeline</code> is expected to\n"
                 + " be played. This is the second line.</div>",
-                "<h4>setRate</h4>\n"
+                "<h3>setRate</h3>\n"
                 + "<pre class=\"methodSignature\">public final&nbsp;void&nbsp;setRate&#8203;(double&nbsp;value)</pre>\n"
                 + "<div class=\"block\">Sets the value of the property rate.</div>\n"
                 + "<dl>\n"
@@ -126,7 +126,7 @@
                 + "<dd>11</dd>\n"
                 + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
                 + "<dd>JavaFX 8.0</dd>",
-                "<h4>getRate</h4>\n"
+                "<h3>getRate</h3>\n"
                 + "<pre class=\"methodSignature\">public final&nbsp;double&nbsp;getRate()</pre>\n"
                 + "<div class=\"block\">Gets the value of the property rate.</div>\n"
                 + "<dl>\n"
@@ -137,7 +137,7 @@
                 + "<dd>11</dd>\n"
                 + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
                 + "<dd>JavaFX 8.0</dd>",
-                "<h3>Property Summary</h3>\n"
+                "<h2>Property Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n<table>\n"
                 + "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>",
                 "<tr class=\"altColor\">\n"
@@ -147,7 +147,7 @@
 
         checkOutput("pkg1/C.html", false,
                 "A()",
-                "<h3>Property Summary</h3>\n"
+                "<h2>Property Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n"
                 + "<div role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
                 + " aria-selected=\"true\" aria-controls=\"memberSummary_tabpanel\" tabindex=\"0\""
@@ -190,13 +190,13 @@
                 "pkg2");
         checkExit(Exit.OK);
         checkOutput("pkg2/Test.html", true,
-                "<h3>Property Detail</h3>\n"
+                "<h2>Property Detail</h2>\n"
                 + "<a id=\"betaProperty\">\n"
                 + "<!--   -->\n"
                 + "</a>\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\">\n"
-                + "<h4>beta</h4>\n"
+                + "<h3>beta</h3>\n"
                 + "<pre>public&nbsp;java.lang.Object betaProperty</pre>\n"
                 + "</li>\n"
                 + "</ul>\n"
@@ -205,7 +205,7 @@
                 + "</a>\n"
                 + "<ul class=\"blockList\">\n"
                 + "<li class=\"blockList\">\n"
-                + "<h4>gamma</h4>\n"
+                + "<h3>gamma</h3>\n"
                 + "<pre>public final&nbsp;java.util.List&lt;java.lang.String&gt; gammaProperty</pre>\n"
                 + "</li>\n"
                 + "</ul>\n"
@@ -214,19 +214,19 @@
                 + "</a>\n"
                 + "<ul class=\"blockListLast\">\n"
                 + "<li class=\"blockList\">\n"
-                + "<h4>delta</h4>\n"
+                + "<h3>delta</h3>\n"
                 + "<pre>public final&nbsp;java.util.List&lt;"
                 + "java.util.Set&lt;? super java.lang.Object&gt;&gt; deltaProperty</pre>\n"
                 + "</li>\n"
                 + "</ul>\n"
                 + "</li>\n"
                 + "</ul>",
-                "<h3>Property Summary</h3>\n"
+                "<h2>Property Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n<table>\n"
                 + "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>");
 
         checkOutput("pkg2/Test.html", false,
-                "<h3>Property Summary</h3>\n"
+                "<h2>Property Summary</h2>\n"
                 + "<div class=\"memberSummary\">\n"
                 + "<div role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
                 + " aria-selected=\"true\" aria-controls=\"memberSummary_tabpanel\" tabindex=\"0\""
@@ -250,7 +250,7 @@
                 "-package",
                 "pkg2");
         checkExit(Exit.OK);
-        checkOutput("pkg2/Test.html", false, "<h3>Property Summary</h3>");
+        checkOutput("pkg2/Test.html", false, "<h2>Property Summary</h2>");
         checkOutput("pkg2/Test.html", true,
                 "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
                 + "<th class=\"colSecond\" scope=\"col\">Method</th>\n"
--- a/test/langtools/jdk/javadoc/doclet/testModules/TestModuleServices.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModuleServices.java	Thu Feb 21 14:03:57 2019 -0800
@@ -173,7 +173,7 @@
         checkExit(Exit.OK);
 
         checkOutput("m/module-summary.html", false,
-                "<h3>Services</h3>");
+                "<h2>Services</h2>");
     }
 
     @Test
@@ -194,7 +194,7 @@
         checkExit(Exit.OK);
 
         checkOutput("m/module-summary.html", true,
-                "<h3>Services</h3>");
+                "<h2>Services</h2>");
 
         checkOutput("m/module-summary.html", true,
                 "<div class=\"usesSummary\">\n<table>\n" +
@@ -235,7 +235,7 @@
         checkExit(Exit.OK);
 
         checkOutput("m/module-summary.html", true,
-                "<h3>Services</h3>");
+                "<h2>Services</h2>");
 
         checkOutput("m/module-summary.html", true,
                 "<div class=\"usesSummary\">\n<table>\n" +
@@ -276,7 +276,7 @@
         checkExit(Exit.OK);
 
         checkOutput("m/module-summary.html", false,
-                "<h3>Services</h3>");
+                "<h2>Services</h2>");
     }
 
     @Test
@@ -302,7 +302,7 @@
         checkExit(Exit.OK);
 
         checkOutput("m/module-summary.html", true,
-                "<h3>Services</h3>");
+                "<h2>Services</h2>");
 
         checkOutput("m/module-summary.html", true,
                 "<div class=\"providesSummary\">\n<table>\n" +
@@ -346,7 +346,7 @@
         checkExit(Exit.OK);
 
         checkOutput("m/module-summary.html", true,
-                "<h3>Services</h3>");
+                "<h2>Services</h2>");
 
         checkOutput("m/module-summary.html", true,
                 "<div class=\"providesSummary\">\n<table>\n" +
@@ -389,7 +389,7 @@
         checkExit(Exit.OK);
 
         checkOutput("m/module-summary.html", true,
-                "<h3>Services</h3>");
+                "<h2>Services</h2>");
 
         checkOutput("m/module-summary.html", true,
                 "<div class=\"providesSummary\">\n<table>\n" +
--- a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1261,7 +1261,7 @@
                 + "<div class=\"block\">This is a test description for the test.moduleFullName.</div>\n"
                 + "</dd>");
         checkOutput("module-overview-frame.html", found,
-                "<h2 title=\"Modules\">Modules</h2>\n"
+                "<h1 title=\"Modules\">Modules</h1>\n"
                 + "<ul title=\"Modules\">\n"
                 + "<li><a href=\"moduleB/module-frame.html\" target=\"packageListFrame\" onclick=\"updateModuleFrame('moduleB/module-type-frame.html','moduleB/module-summary.html');\">moduleB</a></li>\n"
                 + "<li><a href=\"test.moduleFullName/module-frame.html\" target=\"packageListFrame\" onclick=\"updateModuleFrame('test.moduleFullName/module-type-frame.html','test.moduleFullName/module-summary.html');\">test.moduleFullName</a></li>\n"
--- a/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java	Thu Feb 21 14:03:57 2019 -0800
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug      4789689 4905985 4927164 4827184 4993906 5004549 7025314 7010344 8025633 8026567 8162363
- *           8175200 8186332 8182765 8196202 8187288 8173730
+ *           8175200 8186332 8182765 8196202 8187288 8173730 8215307
  * @summary  Run Javadoc on a set of source files that demonstrate new
  *           language features.  Check the output to ensure that the new
  *           language features are properly documented.
@@ -66,7 +66,7 @@
     void checkEnums() {
        checkOutput("pkg/Coin.html", true,
                 // Make sure enum header is correct.
-                "Enum Coin</h2>",
+                "Enum Coin</h1>",
                 // Make sure enum signature is correct.
                 "<pre>public enum "
                 + "<span class=\"typeNameLabel\">Coin</span>\n"
@@ -110,7 +110,7 @@
     void checkTypeParameters() {
         checkOutput("pkg/TypeParameters.html", true,
                 // Make sure the header is correct.
-                "Class TypeParameters&lt;E&gt;</h2>",
+                "Class TypeParameters&lt;E&gt;</h1>",
                 // Check class type parameters section.
                 "<dt><span class=\"paramLabel\">Type Parameters:</span></dt>\n"
                 + "<dd><code>E</code> - "
--- a/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java	Thu Feb 21 14:03:57 2019 -0800
@@ -193,10 +193,10 @@
                 "<pre>@Documented\npublic @interface <a href="
                 + "\"../src-html/linksource/AnnotationTypeField.html#line.31\">"
                 + "AnnotationTypeField</a></pre>",
-                "<h4>DEFAULT_NAME</h4>\n<pre>static final&nbsp;java.lang.String&nbsp;"
+                "<h3>DEFAULT_NAME</h3>\n<pre>static final&nbsp;java.lang.String&nbsp;"
                 + "<a href=\"../src-html/linksource/AnnotationTypeField.html#line.32\">"
                 + "DEFAULT_NAME</a></pre>",
-                "<h4>name</h4>\n<pre>java.lang.String&nbsp;<a href="
+                "<h3>name</h3>\n<pre>java.lang.String&nbsp;<a href="
                 + "\"../src-html/linksource/AnnotationTypeField.html#line.34\">name</a></pre>");
 
         checkOutput("src-html/linksource/AnnotationTypeField.html", true,
--- a/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java	Thu Feb 21 14:03:57 2019 -0800
@@ -551,107 +551,107 @@
             checkExit(Exit.OK);
 
             checkOrder("pkg5/AnnoFieldTest.html",
-                    "<h3>Field Detail</h3>",
+                    "<h2>Field Detail</h2>",
                     "<pre>static final&nbsp;int&nbsp;one</pre>",
                     "<pre>static final&nbsp;int&nbsp;two</pre>",
                     "<pre>static final&nbsp;int&nbsp;three</pre>",
                     "<pre>static final&nbsp;int&nbsp;four</pre>");
 
             checkOrder("pkg5/AnnoOptionalTest.html",
-                    "<h3>Optional Element Summary</h3>",
+                    "<h2>Optional Element Summary</h2>",
                     "<a href=\"#four()\">four</a>",
                     "<a href=\"#one()\">one</a>",
                     "<a href=\"#three()\">three</a>",
                     "<a href=\"#two()\">two</a>",
-                    "<h3>Element Detail</h3>",
-                    "<h4>one</h4>",
-                    "<h4>two</h4>",
-                    "<h4>three</h4>",
-                    "<h4>four</h4>");
+                    "<h2>Element Detail</h2>",
+                    "<h3>one</h3>",
+                    "<h3>two</h3>",
+                    "<h3>three</h3>",
+                    "<h3>four</h3>");
 
             checkOrder("pkg5/AnnoRequiredTest.html",
-                    "<h3>Required Element Summary</h3>",
+                    "<h2>Required Element Summary</h2>",
                     "<a href=\"#four()\">four</a>",
                     "<a href=\"#one()\">one</a>",
                     "<a href=\"#three()\">three</a>",
                     "<a href=\"#two()\">two</a>",
-                    "<h3>Element Detail</h3>",
-                    "<h4>one</h4>",
-                    "<h4>two</h4>",
-                    "<h4>three</h4>",
-                    "<h4>four</h4>");
+                    "<h2>Element Detail</h2>",
+                    "<h3>one</h3>",
+                    "<h3>two</h3>",
+                    "<h3>three</h3>",
+                    "<h3>four</h3>");
 
             checkOrder("pkg5/CtorTest.html",
-                    "<h3>Constructor Summary</h3>",
+                    "<h2>Constructor Summary</h2>",
                     "<a href=\"#%3Cinit%3E(int)\"",
                     "<a href=\"#%3Cinit%3E(int,int)\"",
                     "<a href=\"#%3Cinit%3E(int,int,int)\"",
                     "<a href=\"#%3Cinit%3E(int,int,int,int)\"",
-                    "<h3>Constructor Detail</h3>",
+                    "<h2>Constructor Detail</h2>",
                     "<a id=\"&lt;init&gt;(int,int,int,int)\">",
                     "<a id=\"&lt;init&gt;(int,int,int)\">",
                     "<a id=\"&lt;init&gt;(int,int)\">",
                     "<a id=\"&lt;init&gt;(int)\">");
 
             checkOrder("pkg5/EnumTest.html",
-                    "<h3>Enum Constant Summary</h3>",
+                    "<h2>Enum Constant Summary</h2>",
                     "<a href=\"#FOUR\">FOUR</a>",
                     "<a href=\"#ONE\">ONE</a>",
                     "<a href=\"#THREE\">THREE</a>",
                     "<a href=\"#TWO\">TWO</a>",
-                    "<h3>Enum Constant Detail</h3>",
-                    "<h4>ONE</h4>",
-                    "<h4>TWO</h4>",
-                    "<h4>THREE</h4>",
-                    "<h4>FOUR</h4>");
+                    "<h2>Enum Constant Detail</h2>",
+                    "<h3>ONE</h3>",
+                    "<h3>TWO</h3>",
+                    "<h3>THREE</h3>",
+                    "<h3>FOUR</h3>");
 
             checkOrder("pkg5/FieldTest.html",
-                    "<h3>Field Summary</h3>",
+                    "<h2>Field Summary</h2>",
                     "<a href=\"#four\">four</a>",
                     "<a href=\"#one\">one</a>",
                     "<a href=\"#three\">three</a>",
                     "<a href=\"#two\">two</a>",
-                    "<h3>Field Detail</h3>",
-                    "<h4>one</h4>",
-                    "<h4>two</h4>",
-                    "<h4>three</h4>",
-                    "<h4>four</h4>");
+                    "<h2>Field Detail</h2>",
+                    "<h3>one</h3>",
+                    "<h3>two</h3>",
+                    "<h3>three</h3>",
+                    "<h3>four</h3>");
 
             checkOrder("pkg5/IntfTest.html",
-                    "<h3>Method Summary</h3>",
+                    "<h2>Method Summary</h2>",
                     "<a href=\"#four()\">four</a>",
                     "<a href=\"#one()\">one</a>",
                     "<a href=\"#three()\">three</a>",
                     "<a href=\"#two()\">two</a>",
-                    "<h3>Method Detail</h3>",
-                    "<h4>one</h4>",
-                    "<h4>two</h4>",
-                    "<h4>three</h4>",
-                    "<h4>four</h4>");
+                    "<h2>Method Detail</h2>",
+                    "<h3>one</h3>",
+                    "<h3>two</h3>",
+                    "<h3>three</h3>",
+                    "<h3>four</h3>");
 
             checkOrder("pkg5/MethodTest.html",
-                    "<h3>Method Summary</h3>",
+                    "<h2>Method Summary</h2>",
                     "<a href=\"#four()\">four</a>",
                     "<a href=\"#one()\">one</a>",
                     "<a href=\"#three()\">three</a>",
                     "<a href=\"#two()\">two</a>",
-                    "<h3>Method Detail</h3>",
-                    "<h4>one</h4>",
-                    "<h4>two</h4>",
-                    "<h4>three</h4>",
-                    "<h4>four</h4>");
+                    "<h2>Method Detail</h2>",
+                    "<h3>one</h3>",
+                    "<h3>two</h3>",
+                    "<h3>three</h3>",
+                    "<h3>four</h3>");
 
             checkOrder("pkg5/PropertyTest.html",
-                    "<h3>Property Summary</h3>",
+                    "<h2>Property Summary</h2>",
                     "<a href=\"#fourProperty\">four</a>",
                     "<a href=\"#oneProperty\">one</a>",
                     "<a href=\"#threeProperty\">three</a>",
                     "<a href=\"#twoProperty\">two</a>",
-                    "<h3>Property Detail</h3>",
-                    "<h4>oneProperty</h4>",
-                    "<h4>twoProperty</h4>",
-                    "<h4>threeProperty</h4>",
-                    "<h4>fourProperty</h4>");
+                    "<h2>Property Detail</h2>",
+                    "<h3>oneProperty</h3>",
+                    "<h3>twoProperty</h3>",
+                    "<h3>threeProperty</h3>",
+                    "<h3>fourProperty</h3>");
 
         }
     }
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestBadOverride.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestBadOverride.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, 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
@@ -53,7 +53,7 @@
 
         checkOutput("pkg4/Foo.html", true,
                 "<li class=\"blockList\">\n"
-                + "<h4>toString</h4>\n"
+                + "<h3>toString</h3>\n"
                 + "<pre class=\"methodSignature\">public&nbsp;void&nbsp;toString()</pre>\n"
                 + "<div class=\"block\">Why can't I do this ?</div>\n"
                 + "</li>");
--- a/test/langtools/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2019, 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 4341304 4485668 4966728 8032066 8071982 8192933
+ * @bug 4341304 4485668 4966728 8032066 8071982 8192933 8215307
  * @summary Test that methods readResolve and writeReplace show
  * up in serialized-form.html the same way that readObject and writeObject do.
  * If the doclet includes readResolve and writeReplace in the serialized-form
@@ -109,6 +109,8 @@
                 testSrc("SerializedForm.java"), testSrc("ExternalizedForm.java"), "pkg1");
         checkExit(Exit.OK);
 
+        showHeadings("serialized-form.html");
+
         checkOutput("serialized-form.html", true,
                 "<h3>Class <a href=\"pkg1/NestedInnerClass.InnerClass.ProNestedInnerClass.html\" "
                 + "title=\"class in pkg1\">pkg1.NestedInnerClass.InnerClass.ProNestedInnerClass</a> "
@@ -130,15 +132,15 @@
                 + "extends java.lang.Object implements Serializable</h3>");
 
         checkOutput("serialized-form.html", true,
-                "<h3>Serialized Fields</h3>\n" +
+                "<h4>Serialized Fields</h4>\n" +
                 "<ul class=\"blockList\">\n" +
                 "<li class=\"blockList\">\n" +
-                "<h4>longs</h4>\n" +
+                "<h5>longs</h5>\n" +
                 "<pre>Long[] longs</pre>\n" +
                 "<div class=\"block\">the longs</div>\n" +
                 "</li>\n" +
                 "<li class=\"blockListLast\">\n" +
-                "<h4>name</h4>\n" +
+                "<h5>name</h5>\n" +
                 "<pre>java.lang.String name</pre>\n" +
                 "<div class=\"block\">a test</div>");
     }
--- a/test/langtools/jdk/javadoc/doclet/testSummaryHeading/TestSummaryHeading.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testSummaryHeading/TestSummaryHeading.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, 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
@@ -51,6 +51,6 @@
         checkExit(Exit.OK);
 
         checkOutput("C.html", true,
-                "<h3>Method Summary</h3>");
+                "<h2>Method Summary</h2>");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java	Thu Feb 21 14:03:57 2019 -0800
@@ -86,7 +86,7 @@
         // make sure the second @summary's content is displayed correctly
         checkOutput("p1/A.html", true,
              "<li class=\"blockList\">\n"
-             + "<h4>m3</h4>\n"
+             + "<h3>m3</h3>\n"
              + "<pre class=\"methodSignature\">public&nbsp;void&nbsp;m3()</pre>\n"
              + "<div class=\"block\">First sentence  some text maybe second sentence.</div>\n"
              + "</li>\n"
--- a/test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/TestSystemPropertyTaglet.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/TestSystemPropertyTaglet.java	Thu Feb 21 14:03:57 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, 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
@@ -76,9 +76,9 @@
         checkExit(Exit.OK);
 
         checkOrder("pkg/A.html",
-                "<h2 title=\"Class A\" class=\"title\">Class A</h2>",
+                "<h1 title=\"Class A\" class=\"title\">Class A</h1>",
                 "test with <code><a id=\"user.name\" class=\"searchTagResult\">user.name</a></code>",
-                "<h3>Method Detail</h3>",
+                "<h2>Method Detail</h2>",
                 "test with <code><a id=\"java.version\" class=\"searchTagResult\">java.version</a></code>");
 
         checkOrder("index-all.html",
--- a/test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocTester.java	Thu Feb 21 10:29:16 2019 -0800
+++ b/test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocTester.java	Thu Feb 21 14:03:57 2019 -0800
@@ -232,7 +232,7 @@
 
     private DirectoryCheck outputDirectoryCheck = DirectoryCheck.EMPTY;
 
-    private boolean automaticCheckAccessibility = false;
+    private boolean automaticCheckAccessibility = true;
     private boolean automaticCheckLinks = true;
 
     /** The current subtest number. Incremented when checking(...) is called. */
@@ -261,7 +261,7 @@
     }
 
     /**
-     * Run all methods annotated with @Test, followed by printSummary.
+     * Runs all methods annotated with @Test, followed by printSummary.
      * Typically called on a tester object in main()
      * @param f a function which will be used to provide arguments to each
      *          invoked method
@@ -285,7 +285,7 @@
     }
 
     /**
-     * Run javadoc.
+     * Runs javadoc.
      * The output directory used by this call and the final exit code
      * will be saved for later use.
      * To aid the reader, it is recommended that calls to this method
@@ -391,7 +391,7 @@
     }
 
     /**
-     * Set the kind of check for the initial contents of the output directory
+     * Sets the kind of check for the initial contents of the output directory
      * before javadoc is run.
      * The filter should return true for files that should <b>not</b> appear.
      * @param c the kind of check to perform
@@ -401,7 +401,14 @@
     }
 
     /**
-     * Set whether or not to perform an automatic call of checkLinks.
+     * Sets whether or not to perform an automatic call of checkAccessibility.
+     */
+    public void setAutomaticCheckAccessibility(boolean b) {
+        automaticCheckAccessibility = b;
+    }
+
+    /**
+     * Sets whether or not to perform an automatic call of checkLinks.
      */
     public void setAutomaticCheckLinks(boolean b) {
         automaticCheckLinks = b;
@@ -431,7 +438,7 @@
     }
 
     /**
-     * Check the exit code of the most recent call of javadoc.
+     * Checks the exit code of the most recent call of javadoc.
      *
      * @param expected the exit code that is required for the test
      * to pass.
@@ -446,7 +453,7 @@
     }
 
     /**
-     * Check for content in (or not in) the generated output.
+     * Checks for content in (or not in) the generated output.
      * Within the search strings, the newline character \n
      * will be translated to the platform newline character sequence.
      * @param path a path within the most recent output directory
@@ -465,7 +472,7 @@
     }
 
     /**
-     * Check for content in (or not in) the generated output.
+     * Checks for content in (or not in) the generated output.
      * Within the search strings, the newline character \n
      * will be translated to the platform newline character sequence.
      * @param path a path within the most recent output directory, identifying
@@ -487,7 +494,7 @@
     }
 
     /**
-     * Check for content in (or not in) the one of the output streams written by
+     * Checks for content in (or not in) the one of the output streams written by
      * javadoc. Within the search strings, the newline character \n
      * will be translated to the platform newline character sequence.
      * @param output the output stream to check
@@ -519,6 +526,11 @@
         }
     }
 
+    /**
+     * Performs some structural accessibility checks on the files generated by the most
+     * recent run of javadoc.
+     * The checks can be run automatically by calling {@link #setAutomaticCheckAccessibility}.
+     */
     public void checkAccessibility() {
         checking("Check accessibility");
         A11yChecker c = new A11yChecker(out, this::readFile);
@@ -536,6 +548,11 @@
         }
     }
 
+    /**
+     * Checks all the links within the files generated by the most
+     * recent run of javadoc.
+     * The checks can be run automatically by calling {@link #setAutomaticCheckLinks}.
+     */
     public void checkLinks() {
         checking("Check links");
         LinkChecker c = new LinkChecker(out, this::readFile);
@@ -554,7 +571,27 @@
     }
 
     /**
-     * Get the content of the one of the output streams written by javadoc.
+     * Shows the heading structure for each of the specified files.
+     * The structure is is printed in plain text to the main output stream.
+     * No errors are reported (unless there is a problem reading a file)
+     * but missing headings are noted within the output.
+     * @params the files
+     */
+    public void showHeadings(String... paths) {
+        ShowHeadings s = new ShowHeadings(out, this::readFile);
+        for (String p : paths) {
+            try {
+                File f = new File(outputDir, p);
+                s.checkFiles(List.of(f.toPath()), false, Collections.emptySet());
+            } catch (IOException e) {
+                checking("Read file");
+                failed("Error reading file: " + e);
+            }
+        }
+    }
+
+    /**
+     * Gets the content of the one of the output streams written by javadoc.
      * @param output the name of the output stream
      * @return the content of the output stream
      */
@@ -563,7 +600,7 @@
     }
 
     /**
-     * Get the content of the one of the output streams written by javadoc.
+     * Gets the content of the one of the output streams written by javadoc.
      * @param output the name of the output stream
      * @return the content of the output stream, as a line of lines
      */
@@ -573,7 +610,7 @@
     }
 
     /**
-     * Check for files in (or not in) the generated output.
+     * Checks for files in (or not in) the generated output.
      * @param expectedFound true if all of the files are expected
      *  to be found, or false if all of the files are expected to be
      *  not found
@@ -584,7 +621,7 @@
     }
 
     /**
-     * Check for files in (or not in) the generated output.
+     * Checks for files in (or not in) the generated output.
      * @param expectedFound true if all of the files are expected
      *  to be found, or false if all of the files are expected to be
      *  not found
@@ -605,7 +642,7 @@
     }
 
     /**
-     * Check that a series of strings are found in order in a file in
+     * Checks that a series of strings are found in order in a file in
      * the generated output.
      * @param path the file to check
      * @param strings  the strings whose order to check
@@ -658,7 +695,7 @@
     }
 
     /**
-     * Compare a set of files in each of two directories.
+     * Compares a set of files in each of two directories.
      *
      * @param baseDir1 the directory containing the first set of files
      * @param baseDir2 the directory containing the second set of files
@@ -673,7 +710,7 @@
     }
 
     /**
-     * A utility to copy a directory from one place to another.
+     * Copies a directory from one place to another.
      *
      * @param targetDir the directory to copy.
      * @param destDir the destination to copy the directory to.
@@ -707,7 +744,7 @@
     }
 
     /**
-     * Copy source file to destination file.
+     * Copies a file.
      *
      * @param destfile the destination file
      * @param srcfile the source file
@@ -749,7 +786,7 @@
     }
 
     /**
-     * Read the file and return it as a string.
+     * Reads the file and return it as a string.
      *
      * @param baseDir   the directory in which to locate the file
      * @param fileName  the name of the file to read
@@ -825,7 +862,7 @@
     }
 
     /**
-     * Print a summary of the test results.
+     * Prints a summary of the test results.
      */
     protected void printSummary() {
         String javadocRuns = (javadocRunNum <= 1) ? ""
@@ -845,7 +882,7 @@
     }
 
     /**
-     * Search for the string in the given file and return true
+     * Searches for the string in the given file and return true
      * if the string was found.
      *
      * @param fileString    the contents of the file to search through
@@ -861,7 +898,7 @@
     }
 
     /**
-     * Compare the two given files.
+     * Compares the two given files.
      *
      * @param baseDir1 the directory in which to locate the first file
      * @param baseDir2 the directory in which to locate the second file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/lib/javadoc/tester/ShowHeadings.java	Thu Feb 21 14:03:57 2019 -0800
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2019, 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 javadoc.tester;
+
+import java.io.PrintStream;
+import java.nio.file.Path;
+import java.util.Map;
+import java.util.function.Function;
+
+public class ShowHeadings extends HtmlChecker {
+
+    private int currLevel;
+
+    private boolean copyContent;
+
+    ShowHeadings(PrintStream out, Function<Path,String> fileReader) {
+        super(out, fileReader);
+    }
+
+    @Override
+    public void report() {
+    }
+
+    @Override
+    public void startFile(Path path) {
+        out.println("Headings: " + path);
+        currLevel = 0;
+    }
+
+    @Override
+    public void endFile() {
+    }
+
+    @Override
+    public void docType(String doctype) {
+    }
+
+    @Override
+    public void startElement(String name, Map<String,String> attrs, boolean selfClosing) {
+        switch (name) {
+            case "h1": case "h2": case "h3": case "h4": case "h5": case "h6":
+                startHeading(name);
+                break;
+        }
+    }
+
+    @Override
+    public void endElement(String name) {
+        switch (name) {
+            case "h1": case "h2": case "h3": case "h4": case "h5": case "h6":
+                out.println();
+                copyContent = false;
+                break;
+        }
+
+    }
+
+    private void startHeading(String h) {
+        int level = Character.digit(h.charAt(1), 10);
+        while (level > currLevel + 1) {
+            currLevel++;
+            out.println("*  ".repeat(currLevel - 1) + "H" + currLevel + ": *** MISSING ***");
+        }
+        currLevel = level;
+        out.print("*  ".repeat(currLevel - 1) + "H" + currLevel + ": ");
+        copyContent = true;
+    }
+
+    @Override
+    public void content(String s) {
+        if (copyContent) {
+            out.print(s.replace("&nbsp;", " ")
+                .replace("&lt;", "<")
+                .replace("&gt;", ">")
+                .replace("&amp;", "&")
+                .replaceAll("\\s+", " ")
+                );
+        }
+    }
+}
+