/hg/release/icedtea7-forest-2.1/langtools: 2 new changesets
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Tue Jun 18 14:10:04 PDT 2013
changeset c8c0f2fc2038 in /hg/release/icedtea7-forest-2.1/langtools
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/langtools?cmd=changeset;node=c8c0f2fc2038
author: andrew
date: Wed Jun 12 12:23:44 2013 +0100
8012375: Improve Javadoc framing
Reviewed-by: mduigou, jlaskey
changeset 26a29796b374 in /hg/release/icedtea7-forest-2.1/langtools
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/langtools?cmd=changeset;node=26a29796b374
author: bpatel
date: Wed Jun 05 14:31:54 2013 -0700
8015997: Additional improvement in Javadoc framing
Reviewed-by: jjg
diffstat:
src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java | 38 +++++++++-
1 files changed, 36 insertions(+), 2 deletions(-)
diffs (54 lines):
diff -r 9a3628594576 -r 26a29796b374 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 May 22 18:20:23 2013 +0100
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Wed Jun 05 14:31:54 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -309,8 +309,42 @@
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)" + DocletConstants.NL +
+ " if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + DocletConstants.NL +
" targetPage = \"undefined\";" + DocletConstants.NL +
+ " function validURL(url) {" + DocletConstants.NL +
+ " var pos = url.indexOf(\".html\");" + DocletConstants.NL +
+ " if (pos == -1 || pos != url.length - 5)" + DocletConstants.NL +
+ " return false;" + DocletConstants.NL +
+ " var allowNumber = false;" + DocletConstants.NL +
+ " var allowSep = false;" + DocletConstants.NL +
+ " var seenDot = false;" + DocletConstants.NL +
+ " for (var i = 0; i < url.length - 5; i++) {" + DocletConstants.NL +
+ " var ch = url.charAt(i);" + DocletConstants.NL +
+ " if ('a' <= ch && ch <= 'z' ||" + DocletConstants.NL +
+ " 'A' <= ch && ch <= 'Z' ||" + DocletConstants.NL +
+ " ch == '$' ||" + DocletConstants.NL +
+ " ch == '_') {" + DocletConstants.NL +
+ " allowNumber = true;" + DocletConstants.NL +
+ " allowSep = true;" + DocletConstants.NL +
+ " } else if ('0' <= ch && ch <= '9'" + DocletConstants.NL +
+ " || ch == '-') {" + DocletConstants.NL +
+ " if (!allowNumber)" + DocletConstants.NL +
+ " return false;" + DocletConstants.NL +
+ " } else if (ch == '/' || ch == '.') {" + DocletConstants.NL +
+ " if (!allowSep)" + DocletConstants.NL +
+ " return false;" + DocletConstants.NL +
+ " allowNumber = false;" + DocletConstants.NL +
+ " allowSep = false;" + DocletConstants.NL +
+ " if (ch == '.')" + DocletConstants.NL +
+ " seenDot = true;" + DocletConstants.NL +
+ " if (ch == '/' && seenDot)" + DocletConstants.NL +
+ " return false;" + DocletConstants.NL +
+ " } else {" + DocletConstants.NL +
+ " return false;"+ DocletConstants.NL +
+ " }" + DocletConstants.NL +
+ " }" + DocletConstants.NL +
+ " return true;" + DocletConstants.NL +
+ " }" + DocletConstants.NL +
" function loadFrames() {" + DocletConstants.NL +
" if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL +
" top.classFrame.location = top.targetPage;" + DocletConstants.NL +
More information about the distro-pkg-dev
mailing list