src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java Tue Jan 29 15:19:43 2019 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java Wed Jan 30 16:39:26 2019 +0530
@@ -196,7 +196,7 @@
this.contents = configuration.contents;
this.messages = configuration.messages;
this.resources = configuration.resources;
- this.links = new Links(path, configuration.htmlVersion);
+ this.links = new Links(path);
this.utils = configuration.utils;
this.path = path;
this.pathToRoot = path.parent().invert();
@@ -445,9 +445,8 @@
*/
public void printHtmlDocument(List<String> metakeywords, boolean includeScript, Content extraContent,
Content body) throws DocFileIOException {
- DocType htmlDocType = DocType.forVersion(configuration.htmlVersion);
Content htmlComment = contents.newPage;
- Head head = new Head(path, configuration.htmlVersion, configuration.docletVersion)
+ Head head = new Head(path, configuration.docletVersion)
.setTimestamp(!configuration.notimestamp)
.setTitle(winTitle)
.setCharset(configuration.charset)
@@ -458,7 +457,7 @@
.addContent(extraContent);
Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(), head.toContent(), body);
- HtmlDocument htmlDocument = new HtmlDocument(htmlDocType, htmlComment, htmlTree);
+ HtmlDocument htmlDocument = new HtmlDocument(htmlComment, htmlTree);
htmlDocument.write(DocFile.createFileForOutput(configuration, path));
}
@@ -1004,8 +1003,7 @@
}
public String anchorName(Element member) {
- if (member.getKind() == ElementKind.CONSTRUCTOR
- && configuration.isOutputHtml5()) {
+ if (member.getKind() == ElementKind.CONSTRUCTOR) {
return "<init>";
} else {
return utils.getSimpleName(member);
@@ -2160,20 +2158,4 @@
Script getMainBodyScript() {
return mainBodyScript;
}
-
- /**
- * Creates the HTML tag if the tag is supported by this specific HTML version
- * otherwise return the Content instance provided by Supplier ifNotSupported.
- * @param tag the HTML tag
- * @param ifSupported create this instance if HTML tag is supported
- * @param ifNotSupported create this instance if HTML tag is not supported
- * @return
- */
- protected Content createTagIfAllowed(HtmlTag tag, Supplier<Content> ifSupported, Supplier<Content> ifNotSupported) {
- if (configuration.allowTag(tag)) {
- return ifSupported.get();
- } else {
- return ifNotSupported.get();
- }
- }
}