diff --git a/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java b/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java index 2884d3b45bbb7816a9226f0ffb2c65f559b524a8..d5e0bf0c71f0a951e4055c4e9f0389f4ad661fe0 100644 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java @@ -316,7 +316,7 @@ public class HelpWriter extends HtmlDocletWriter { liConst.addContent(constPara); ul.addContent(liConst); Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul); - Content line30 = HtmlTree.EM(getResource("doclet.Help_line_30")); + Content line30 = HtmlTree.SPAN(HtmlStyle.italic, getResource("doclet.Help_line_30")); divContent.addContent(line30); contentTree.addContent(divContent); } diff --git a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java index bfd7955ebbb39f18c1b7530586fe8ad3f9915f22..63aa42be9b12ec62ad15ce90a483fc4db788934a 100644 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java @@ -467,8 +467,7 @@ public class HtmlDocletWriter extends HtmlDocWriter { } } Content rawContent = new RawHtml(content); - Content em = HtmlTree.EM(rawContent); - return em; + return rawContent; } /** diff --git a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java index ab4fdd8e474ab964dbefa31e8ab1eec1e59044b5..e0343f21d94d97e6f1966a3eabaa95d3506dece4 100644 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java @@ -281,17 +281,6 @@ public class HtmlTree extends Content { return htmltree; } - /** - * Generates a EM tag with some content. - * - * @param body content to be added to the tag - * @return an HtmlTree object for the EM tag - */ - public static HtmlTree EM(Content body) { - HtmlTree htmltree = new HtmlTree(HtmlTag.EM, nullCheck(body)); - return htmltree; - } - /** * Generates a FRAME tag. * diff --git a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css index 18e062a8b272137bde86d2676eb26c29fe42289b..b2adb742b81b406fb791daac2a7d37c2c59606c1 100644 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css @@ -77,6 +77,7 @@ Document title and Copyright styles float:right; padding:0px 21px; font-size:.8em; + font-style:italic; z-index:200; margin-top:-7px; } diff --git a/test/com/sun/javadoc/testOptions/TestOptions.java b/test/com/sun/javadoc/testOptions/TestOptions.java new file mode 100644 index 0000000000000000000000000000000000000000..1327ff4773771e4ad68accd00cabd5d54b2c0fb4 --- /dev/null +++ b/test/com/sun/javadoc/testOptions/TestOptions.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2013, 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. + */ + +/* + * @test + * @bug 4749567 + * @summary Test the output for -header and -footer options. + * @author Bhavesh Patel + * @library ../lib/ + * @build JavadocTester TestOptions + * @run main TestOptions + */ + +public class TestOptions extends JavadocTester { + + //Test information. + private static final String BUG_ID = "4749567"; + + //Javadoc arguments. + private static final String[] ARGS = new String[] { + "-d", BUG_ID, "-header", "Test header", "-footer", "Test footer", + "-sourcepath", SRC_DIR, "pkg" + }; + + private static final String[][] TEST = { + {BUG_ID + FS + "pkg" + FS + "package-summary.html", + "
Test header
"}, + {BUG_ID + FS + "pkg" + FS + "package-summary.html", + "
Test footer
"} + }; + + private static final String[][] NEGATED_TEST = NO_TEST; + + /** + * The entry point of the test. + * @param args the array of command line arguments. + */ + public static void main(String[] args) { + TestOptions tester = new TestOptions(); + run(tester, ARGS, TEST, NEGATED_TEST); + tester.printSummary(); + } + + /** + * {@inheritDoc} + */ + public String getBugId() { + return BUG_ID; + } + + /** + * {@inheritDoc} + */ + public String getBugName() { + return getClass().getName(); + } +} + diff --git a/test/com/sun/javadoc/testOptions/pkg/Foo.java b/test/com/sun/javadoc/testOptions/pkg/Foo.java new file mode 100644 index 0000000000000000000000000000000000000000..b2a32176bd15708e9017fb4b000cb6570d5ef9b7 --- /dev/null +++ b/test/com/sun/javadoc/testOptions/pkg/Foo.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013, 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 pkg; + +public class Foo {} +