# HG changeset patch
# User bpatel
# Date 1478884441 0
# Node ID e886d9050af5668f50f5ac59947515fa4a632dac
# Parent a2df39e0fc28dfcbfb280ae8dbef698f336c2885
8151921: Improved page resolution
Summary: Include indenting changes to HtmlWriter.java from 8011650
Reviewed-by: jjg, ksrini
diff -r a2df39e0fc28 -r e886d9050af5 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 Wed Nov 09 16:11:46 2016 +0000
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Fri Nov 11 17:14:01 2016 +0000
@@ -354,14 +354,16 @@
*
* @return a content for the SCRIPT tag
*/
- protected Content getFramesetJavaScript(){
+ protected Content getFramesetJavaScript() {
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 +
+ String scriptCode = 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 +
" var pos = url.indexOf(\".html\");" + DocletConstants.NL +
" if (pos == -1 || pos != url.length - 5)" + DocletConstants.NL +
diff -r a2df39e0fc28 -r e886d9050af5 test/com/sun/javadoc/testJavascript/TestJavascript.java
--- a/test/com/sun/javadoc/testJavascript/TestJavascript.java Wed Nov 09 16:11:46 2016 +0000
+++ b/test/com/sun/javadoc/testJavascript/TestJavascript.java Fri Nov 11 17:14:01 2016 +0000
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4665566 4855876 8012375 8015998 8024756
+ * @bug 4665566 4855876 8012375 8015998 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",
"