# HG changeset patch # User bpatel # Date 1467860829 25200 # Node ID fd9b6417c521c5ec26224129d90b38d40c04c54d # Parent f74918365a7220262c06cb2df651f40e91d3a672 8151921: Improved page resolution Reviewed-by: jjg, ksrini diff -r f74918365a72 -r fd9b6417c521 src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Tue Jul 05 15:03:58 2016 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Wed Jul 06 20:07:09 2016 -0700 @@ -380,11 +380,12 @@ HtmlTree script = new HtmlTree(HtmlTag.SCRIPT); script.addAttr(HtmlAttr.TYPE, "text/javascript"); String scriptCode = DocletConstants.NL + - " targetPage = \"\" + window.location.search;" + DocletConstants.NL + - " if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL + - " targetPage = targetPage.substring(1);" + DocletConstants.NL + - " if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + DocletConstants.NL + - " targetPage = \"undefined\";" + DocletConstants.NL + + " tmpTargetPage = \"\" + window.location.search;" + DocletConstants.NL + + " if (tmpTargetPage != \"\" && tmpTargetPage != \"undefined\")" + DocletConstants.NL + + " tmpTargetPage = tmpTargetPage.substring(1);" + DocletConstants.NL + + " if (tmpTargetPage.indexOf(\":\") != -1 || (tmpTargetPage != \"\" && !validURL(tmpTargetPage)))" + DocletConstants.NL + + " tmpTargetPage = \"undefined\";" + DocletConstants.NL + + " targetPage = tmpTargetPage;" + DocletConstants.NL + " function validURL(url) {" + DocletConstants.NL + " try {" + DocletConstants.NL + " url = decodeURIComponent(url);" + DocletConstants.NL + diff -r f74918365a72 -r fd9b6417c521 test/com/sun/javadoc/testJavascript/TestJavascript.java --- a/test/com/sun/javadoc/testJavascript/TestJavascript.java Tue Jul 05 15:03:58 2016 -0700 +++ b/test/com/sun/javadoc/testJavascript/TestJavascript.java Wed Jul 06 20:07:09 2016 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 4665566 4855876 7025314 8012375 8015997 8016328 8024756 + * @bug 4665566 4855876 7025314 8012375 8015997 8016328 8024756 8151921 * @summary Verify that the output has the right javascript. * @author jamieh * @library ../lib/ @@ -50,11 +50,12 @@ "Frames"}, {BUG_ID + FS + "index.html", "