8074521: Generate iframe instead of frame and frameset for index.html page
Reviewed-by: jjg, ksrini
This commit is contained in:
parent
7b6148280a
commit
6b21a5a5ff
langtools
src/jdk.javadoc/share/classes/com/sun/tools/doclets
test/com/sun/javadoc
ValidHtml
testIndex
testJavascript
testNonFrameWarning
testProfiles
testStylesheet
81
langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java
81
langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, 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
|
||||
@ -55,8 +55,6 @@ public class FrameOutputWriter extends HtmlDocletWriter {
|
||||
*/
|
||||
int noOfPackages;
|
||||
|
||||
private final String SCROLL_YES = "yes";
|
||||
|
||||
/**
|
||||
* Constructor to construct FrameOutputWriter object.
|
||||
*
|
||||
@ -96,90 +94,73 @@ public class FrameOutputWriter extends HtmlDocletWriter {
|
||||
* as well as warning if browser is not supporting the Html frames.
|
||||
*/
|
||||
protected void generateFrameFile() throws IOException {
|
||||
Content frameset = getFrameDetails();
|
||||
Content frame = getFrameDetails();
|
||||
HtmlTree body = new HtmlTree(HtmlTag.BODY);
|
||||
body.addContent(frame);
|
||||
if (configuration.windowtitle.length() > 0) {
|
||||
printFramesetDocument(configuration.windowtitle, configuration.notimestamp,
|
||||
frameset);
|
||||
printFramesDocument(configuration.windowtitle, configuration,
|
||||
body);
|
||||
} else {
|
||||
printFramesetDocument(configuration.getText("doclet.Generated_Docs_Untitled"),
|
||||
configuration.notimestamp, frameset);
|
||||
printFramesDocument(configuration.getText("doclet.Generated_Docs_Untitled"),
|
||||
configuration, body);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the code for issueing the warning for a non-frame capable web
|
||||
* client. Also provide links to the non-frame version documentation.
|
||||
*
|
||||
* @param contentTree the content tree to which the non-frames information will be added
|
||||
*/
|
||||
protected void addFrameWarning(Content contentTree) {
|
||||
Content noframes = new HtmlTree(HtmlTag.NOFRAMES);
|
||||
Content noScript = HtmlTree.NOSCRIPT(
|
||||
HtmlTree.DIV(getResource("doclet.No_Script_Message")));
|
||||
noframes.addContent(noScript);
|
||||
Content noframesHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
|
||||
getResource("doclet.Frame_Alert"));
|
||||
noframes.addContent(noframesHead);
|
||||
Content p = HtmlTree.P(getResource("doclet.Frame_Warning_Message",
|
||||
getHyperLink(configuration.topFile,
|
||||
configuration.getText("doclet.Non_Frame_Version"))));
|
||||
noframes.addContent(p);
|
||||
contentTree.addContent(noframes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the frame sizes and their contents.
|
||||
*
|
||||
* @return a content tree for the frame details
|
||||
*/
|
||||
protected Content getFrameDetails() {
|
||||
HtmlTree frameset = HtmlTree.FRAMESET("20%,80%", null, "Documentation frame",
|
||||
"top.loadFrames()");
|
||||
HtmlTree leftContainerDiv = new HtmlTree(HtmlTag.DIV);
|
||||
HtmlTree rightContainerDiv = new HtmlTree(HtmlTag.DIV);
|
||||
leftContainerDiv.addStyle(HtmlStyle.leftContainer);
|
||||
rightContainerDiv.addStyle(HtmlStyle.rightContainer);
|
||||
if (noOfPackages <= 1) {
|
||||
addAllClassesFrameTag(frameset);
|
||||
addAllClassesFrameTag(leftContainerDiv);
|
||||
} else if (noOfPackages > 1) {
|
||||
HtmlTree leftFrameset = HtmlTree.FRAMESET(null, "30%,70%", "Left frames",
|
||||
"top.loadFrames()");
|
||||
addAllPackagesFrameTag(leftFrameset);
|
||||
addAllClassesFrameTag(leftFrameset);
|
||||
frameset.addContent(leftFrameset);
|
||||
addAllPackagesFrameTag(leftContainerDiv);
|
||||
addAllClassesFrameTag(leftContainerDiv);
|
||||
}
|
||||
addClassFrameTag(frameset);
|
||||
addFrameWarning(frameset);
|
||||
return frameset;
|
||||
addClassFrameTag(rightContainerDiv);
|
||||
HtmlTree mainContainer = HtmlTree.DIV(HtmlStyle.mainContainer, leftContainerDiv);
|
||||
mainContainer.addContent(rightContainerDiv);
|
||||
return mainContainer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the FRAME tag for the frame that lists all packages.
|
||||
* Add the IFRAME tag for the frame that lists all packages.
|
||||
*
|
||||
* @param contentTree the content tree to which the information will be added
|
||||
*/
|
||||
private void addAllPackagesFrameTag(Content contentTree) {
|
||||
HtmlTree frame = HtmlTree.FRAME(DocPaths.OVERVIEW_FRAME.getPath(),
|
||||
HtmlTree frame = HtmlTree.IFRAME(DocPaths.OVERVIEW_FRAME.getPath(),
|
||||
"packageListFrame", configuration.getText("doclet.All_Packages"));
|
||||
contentTree.addContent(frame);
|
||||
HtmlTree leftTop = HtmlTree.DIV(HtmlStyle.leftTop, frame);
|
||||
contentTree.addContent(leftTop);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the FRAME tag for the frame that lists all classes.
|
||||
* Add the IFRAME tag for the frame that lists all classes.
|
||||
*
|
||||
* @param contentTree the content tree to which the information will be added
|
||||
*/
|
||||
private void addAllClassesFrameTag(Content contentTree) {
|
||||
HtmlTree frame = HtmlTree.FRAME(DocPaths.ALLCLASSES_FRAME.getPath(),
|
||||
HtmlTree frame = HtmlTree.IFRAME(DocPaths.ALLCLASSES_FRAME.getPath(),
|
||||
"packageFrame", configuration.getText("doclet.All_classes_and_interfaces"));
|
||||
contentTree.addContent(frame);
|
||||
HtmlTree leftBottom = HtmlTree.DIV(HtmlStyle.leftBottom, frame);
|
||||
contentTree.addContent(leftBottom);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the FRAME tag for the frame that describes the class in detail.
|
||||
* Add the IFRAME tag for the frame that describes the class in detail.
|
||||
*
|
||||
* @param contentTree the content tree to which the information will be added
|
||||
*/
|
||||
private void addClassFrameTag(Content contentTree) {
|
||||
HtmlTree frame = HtmlTree.FRAME(configuration.topFile.getPath(), "classFrame",
|
||||
configuration.getText("doclet.Package_class_and_interface_descriptions"),
|
||||
SCROLL_YES);
|
||||
HtmlTree frame = HtmlTree.IFRAME(configuration.topFile.getPath(), "classFrame",
|
||||
configuration.getText("doclet.Package_class_and_interface_descriptions"));
|
||||
frame.addStyle(HtmlStyle.rightIframe);
|
||||
contentTree.addContent(frame);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2015, 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
|
||||
@ -48,9 +48,6 @@ public class DocType extends Content {
|
||||
public static final DocType TRANSITIONAL =
|
||||
new DocType("Transitional", "http://www.w3.org/TR/html4/loose.dtd");
|
||||
|
||||
public static final DocType FRAMESET =
|
||||
new DocType("Frameset", "http://www.w3.org/TR/html4/frameset.dtd");
|
||||
|
||||
/**
|
||||
* Constructor to construct a DocType object.
|
||||
*
|
||||
|
47
langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java
47
langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, 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
|
||||
@ -35,6 +35,7 @@ import com.sun.tools.doclets.internal.toolkit.*;
|
||||
import com.sun.tools.doclets.internal.toolkit.util.DocFile;
|
||||
import com.sun.tools.doclets.internal.toolkit.util.DocLink;
|
||||
import com.sun.tools.doclets.internal.toolkit.util.DocPath;
|
||||
import com.sun.tools.doclets.internal.toolkit.util.DocPaths;
|
||||
|
||||
|
||||
/**
|
||||
@ -56,6 +57,8 @@ public abstract class HtmlDocWriter extends HtmlWriter {
|
||||
|
||||
public static final String CONTENT_TYPE = "text/html";
|
||||
|
||||
DocPath pathToRoot;
|
||||
|
||||
/**
|
||||
* Constructor. Initializes the destination file name through the super
|
||||
* class HtmlWriter.
|
||||
@ -65,6 +68,7 @@ public abstract class HtmlDocWriter extends HtmlWriter {
|
||||
public HtmlDocWriter(Configuration configuration, DocPath filename)
|
||||
throws IOException {
|
||||
super(configuration, filename);
|
||||
this.pathToRoot = filename.parent().invert();
|
||||
configuration.message.notice("doclet.Generating_0",
|
||||
DocFile.createFileForOutput(configuration, filename).getPath());
|
||||
}
|
||||
@ -298,33 +302,54 @@ public abstract class HtmlDocWriter extends HtmlWriter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the frameset version of the Html file header.
|
||||
* Called only when generating an HTML frameset file.
|
||||
* Print the frames version of the Html file header.
|
||||
* Called only when generating an HTML frames file.
|
||||
*
|
||||
* @param title Title of this HTML document
|
||||
* @param noTimeStamp If true, don't print time stamp in header
|
||||
* @param frameset the frameset to be added to the HTML document
|
||||
* @param configuration the configuration object
|
||||
* @param frame the frame content tree to be added to the HTML document
|
||||
*/
|
||||
public void printFramesetDocument(String title, boolean noTimeStamp,
|
||||
Content frameset) throws IOException {
|
||||
Content htmlDocType = DocType.FRAMESET;
|
||||
public void printFramesDocument(String title, ConfigurationImpl configuration,
|
||||
HtmlTree body) throws IOException {
|
||||
Content htmlDocType = DocType.TRANSITIONAL;
|
||||
Content htmlComment = new Comment(configuration.getText("doclet.New_Page"));
|
||||
Content head = new HtmlTree(HtmlTag.HEAD);
|
||||
head.addContent(getGeneratedBy(!noTimeStamp));
|
||||
head.addContent(getGeneratedBy(!configuration.notimestamp));
|
||||
Content windowTitle = HtmlTree.TITLE(new StringContent(title));
|
||||
head.addContent(windowTitle);
|
||||
Content meta = HtmlTree.META("Content-Type", CONTENT_TYPE,
|
||||
(configuration.charset.length() > 0) ?
|
||||
configuration.charset : HtmlConstants.HTML_DEFAULT_CHARSET);
|
||||
head.addContent(meta);
|
||||
head.addContent(getFramesetJavaScript());
|
||||
head.addContent(getStyleSheetProperties(configuration));
|
||||
head.addContent(getFramesJavaScript());
|
||||
Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(),
|
||||
head, frameset);
|
||||
head, body);
|
||||
Content htmlDocument = new HtmlDocument(htmlDocType,
|
||||
htmlComment, htmlTree);
|
||||
write(htmlDocument);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a link to the stylesheet file.
|
||||
*
|
||||
* @return an HtmlTree for the lINK tag which provides the stylesheet location
|
||||
*/
|
||||
public HtmlTree getStyleSheetProperties(ConfigurationImpl configuration) {
|
||||
String stylesheetfile = configuration.stylesheetfile;
|
||||
DocPath stylesheet;
|
||||
if (stylesheetfile.isEmpty()) {
|
||||
stylesheet = DocPaths.STYLESHEET;
|
||||
} else {
|
||||
DocFile file = DocFile.createFileForInput(configuration, stylesheetfile);
|
||||
stylesheet = DocPath.create(file.getName());
|
||||
}
|
||||
HtmlTree link = HtmlTree.LINK("stylesheet", "text/css",
|
||||
pathToRoot.resolve(stylesheet).getPath(),
|
||||
"Style");
|
||||
return link;
|
||||
}
|
||||
|
||||
protected Comment getGeneratedBy(boolean timestamp) {
|
||||
String text = "Generated by javadoc"; // marker string, deliberately not localized
|
||||
if (timestamp) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2015, 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
|
||||
@ -67,7 +67,11 @@ public enum HtmlStyle {
|
||||
indexHeader,
|
||||
inheritance,
|
||||
interfaceName,
|
||||
leftContainer,
|
||||
leftTop,
|
||||
leftBottom,
|
||||
legalCopy,
|
||||
mainContainer,
|
||||
memberNameLabel,
|
||||
memberNameLink,
|
||||
memberSummary,
|
||||
@ -79,6 +83,8 @@ public enum HtmlStyle {
|
||||
packageHierarchyLabel,
|
||||
paramLabel,
|
||||
returnLabel,
|
||||
rightContainer,
|
||||
rightIframe,
|
||||
rowColor,
|
||||
seeLabel,
|
||||
serializedFormContainer,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2015, 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
|
||||
@ -52,8 +52,6 @@ public enum HtmlTag {
|
||||
DT,
|
||||
EM(BlockType.INLINE, EndTag.END),
|
||||
FONT(BlockType.INLINE, EndTag.END),
|
||||
FRAME(BlockType.OTHER, EndTag.NOEND),
|
||||
FRAMESET(BlockType.OTHER, EndTag.END),
|
||||
H1,
|
||||
H2,
|
||||
H3,
|
||||
@ -64,6 +62,7 @@ public enum HtmlTag {
|
||||
HR(BlockType.BLOCK, EndTag.NOEND),
|
||||
HTML(BlockType.OTHER, EndTag.END),
|
||||
I(BlockType.INLINE, EndTag.END),
|
||||
IFRAME(BlockType.OTHER, EndTag.END),
|
||||
IMG(BlockType.INLINE, EndTag.NOEND),
|
||||
LI,
|
||||
LISTING,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2015, 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
|
||||
@ -326,53 +326,18 @@ public class HtmlTree extends Content {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a FRAME tag.
|
||||
* Generates a IFRAME tag.
|
||||
*
|
||||
* @param src the url of the document to be shown in the frame
|
||||
* @param name specifies the name of the frame
|
||||
* @param title the title for the frame
|
||||
* @param scrolling specifies whether to display scrollbars in the frame
|
||||
* @return an HtmlTree object for the FRAME tag
|
||||
* @return an HtmlTree object for the IFRAME tag
|
||||
*/
|
||||
public static HtmlTree FRAME(String src, String name, String title, String scrolling) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.FRAME);
|
||||
public static HtmlTree IFRAME(String src, String name, String title) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.IFRAME);
|
||||
htmltree.addAttr(HtmlAttr.SRC, nullCheck(src));
|
||||
htmltree.addAttr(HtmlAttr.NAME, nullCheck(name));
|
||||
htmltree.addAttr(HtmlAttr.TITLE, nullCheck(title));
|
||||
if (scrolling != null)
|
||||
htmltree.addAttr(HtmlAttr.SCROLLING, scrolling);
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a Frame tag.
|
||||
*
|
||||
* @param src the url of the document to be shown in the frame
|
||||
* @param name specifies the name of the frame
|
||||
* @param title the title for the frame
|
||||
* @return an HtmlTree object for the SPAN tag
|
||||
*/
|
||||
public static HtmlTree FRAME(String src, String name, String title) {
|
||||
return FRAME(src, name, title, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a FRAMESET tag.
|
||||
*
|
||||
* @param cols the size of columns in the frameset
|
||||
* @param rows the size of rows in the frameset
|
||||
* @param title the title for the frameset
|
||||
* @param onload the script to run when the document loads
|
||||
* @return an HtmlTree object for the FRAMESET tag
|
||||
*/
|
||||
public static HtmlTree FRAMESET(String cols, String rows, String title, String onload) {
|
||||
HtmlTree htmltree = new HtmlTree(HtmlTag.FRAMESET);
|
||||
if (cols != null)
|
||||
htmltree.addAttr(HtmlAttr.COLS, cols);
|
||||
if (rows != null)
|
||||
htmltree.addAttr(HtmlAttr.ROWS, rows);
|
||||
htmltree.addAttr(HtmlAttr.TITLE, nullCheck(title));
|
||||
htmltree.addAttr(HtmlAttr.ONLOAD, nullCheck(onload));
|
||||
return htmltree;
|
||||
}
|
||||
|
||||
@ -779,7 +744,7 @@ public class HtmlTree extends Content {
|
||||
return (hasAttr(HtmlAttr.NAME) || (hasAttr(HtmlAttr.HREF) && hasContent()));
|
||||
case BR :
|
||||
return (!hasContent() && (!hasAttrs() || hasAttr(HtmlAttr.CLEAR)));
|
||||
case FRAME :
|
||||
case IFRAME :
|
||||
return (hasAttr(HtmlAttr.SRC) && !hasContent());
|
||||
case HR :
|
||||
return (!hasContent());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, 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
|
||||
@ -376,7 +376,7 @@ public class HtmlWriter {
|
||||
*
|
||||
* @return a content for the SCRIPT tag
|
||||
*/
|
||||
protected Content getFramesetJavaScript() {
|
||||
protected Content getFramesJavaScript() {
|
||||
HtmlTree script = new HtmlTree(HtmlTag.SCRIPT);
|
||||
script.addAttr(HtmlAttr.TYPE, "text/javascript");
|
||||
String scriptCode = DocletConstants.NL +
|
||||
@ -425,10 +425,6 @@ public class HtmlWriter {
|
||||
" }" + 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 +
|
||||
" }" + DocletConstants.NL;
|
||||
RawHtml scriptContent = new RawHtml(scriptCode);
|
||||
script.addContent(scriptContent);
|
||||
|
@ -104,10 +104,7 @@ doclet.No_Frames=No Frames
|
||||
doclet.Package_Hierarchies=Package Hierarchies:
|
||||
doclet.Hierarchy_For_Package=Hierarchy For Package {0}
|
||||
doclet.Hierarchy_For_All_Packages=Hierarchy For All Packages
|
||||
doclet.Frame_Alert=Frame Alert
|
||||
doclet.Frame_Warning_Message=This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to {0}.
|
||||
doclet.No_Script_Message=JavaScript is disabled on your browser.
|
||||
doclet.Non_Frame_Version=Non-frame version
|
||||
doclet.Description_From_Interface=Description copied from interface:
|
||||
doclet.Description_From_Class=Description copied from class:
|
||||
doclet.No_Non_Deprecated_Classes_To_Document=No non-deprecated classes found to document.
|
||||
|
@ -11,6 +11,17 @@ body {
|
||||
font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size:14px;
|
||||
margin:0;
|
||||
padding:0;
|
||||
height:100%;
|
||||
width:100%;
|
||||
}
|
||||
iframe {
|
||||
margin:0;
|
||||
padding:0;
|
||||
height:100%;
|
||||
width:100%;
|
||||
overflow-y:scroll;
|
||||
border:none;
|
||||
}
|
||||
a:link, a:visited {
|
||||
text-decoration:none;
|
||||
@ -569,6 +580,61 @@ div.block div.block span.interfaceName {
|
||||
font-style:normal;
|
||||
}
|
||||
|
||||
div.contentContainer ul.blockList li.blockList h2{
|
||||
div.contentContainer ul.blockList li.blockList h2 {
|
||||
padding-bottom:0px;
|
||||
}
|
||||
/*
|
||||
IFRAME specific styles
|
||||
*/
|
||||
.mainContainer {
|
||||
margin:0 auto;
|
||||
padding:0;
|
||||
height:100%;
|
||||
width:100%;
|
||||
position:fixed;
|
||||
top:0;
|
||||
left:0;
|
||||
}
|
||||
.leftContainer {
|
||||
height:100%;
|
||||
position:fixed;
|
||||
width:320px;
|
||||
}
|
||||
.leftTop {
|
||||
position:relative;
|
||||
float:left;
|
||||
width:315px;
|
||||
top:0;
|
||||
left:0;
|
||||
height:30%;
|
||||
border-right:6px solid #ccc;
|
||||
border-bottom:6px solid #ccc;
|
||||
}
|
||||
.leftBottom {
|
||||
position:relative;
|
||||
float:left;
|
||||
width:315px;
|
||||
bottom:0;
|
||||
left:0;
|
||||
height:70%;
|
||||
border-right:6px solid #ccc;
|
||||
border-top:1px solid #000;
|
||||
}
|
||||
.rightContainer {
|
||||
position:absolute;
|
||||
left:320px;
|
||||
top:0;
|
||||
bottom:0;
|
||||
height:100%;
|
||||
right:0;
|
||||
border-left:1px solid #000;
|
||||
}
|
||||
.rightIframe {
|
||||
margin:0;
|
||||
padding:0;
|
||||
height:100%;
|
||||
right:30px;
|
||||
width:100%;
|
||||
overflow:visible;
|
||||
margin-bottom:30px;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2015, 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
|
||||
@ -23,11 +23,10 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 4275630 4749453 4625400 4753048 4415270
|
||||
* @summary Generated HTML is invalid with frameset DTD.
|
||||
* @bug 4275630 4749453 4625400 4753048 4415270 8074521
|
||||
* @summary Generated HTML is invalid with frames.
|
||||
* Displays unnecessary horizontal scroll bars.
|
||||
* Missing whitespace in DOCTYPE declaration
|
||||
* <NOFRAMES> not allowed outside <FRAMESET> element
|
||||
* HTML table tags inserted in wrong place in pakcage use page
|
||||
* @author dkramer
|
||||
* @library ../lib
|
||||
@ -55,7 +54,7 @@ public class ValidHtml extends JavadocTester {
|
||||
checkExit(Exit.OK);
|
||||
|
||||
// Test the proper DOCTYPE element are present:
|
||||
checkOutput("index.html", true, FRAMESET);
|
||||
checkOutput("index.html", true, LOOSE);
|
||||
checkOutput("overview-summary.html", true, LOOSE);
|
||||
checkOutput("p1/package-summary.html", true, LOOSE);
|
||||
checkOutput("p1/C.html", true, LOOSE);
|
||||
@ -63,10 +62,9 @@ public class ValidHtml extends JavadocTester {
|
||||
checkOutput("allclasses-frame.html", true, LOOSE);
|
||||
checkOutput("p1/package-frame.html", true, LOOSE);
|
||||
|
||||
// Test that <NOFRAMES> is inside <FRAMESET> element:
|
||||
// Test for IFRAME element:
|
||||
checkOutput("index.html", true,
|
||||
"</noframes>\n"
|
||||
+ "</frameset>");
|
||||
"<iframe");
|
||||
|
||||
// Test the table elements are in the correct order:
|
||||
checkOutput("p1/package-use.html", true,
|
||||
@ -74,8 +72,6 @@ public class ValidHtml extends JavadocTester {
|
||||
+ "</tr>");
|
||||
}
|
||||
|
||||
private static final String FRAMESET =
|
||||
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\" \"http://www.w3.org/TR/html4/frameset.dtd\">";
|
||||
private static final String LOOSE =
|
||||
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, 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
|
||||
@ -47,10 +47,9 @@ public class TestIndex extends JavadocTester {
|
||||
"pkg", testSrc("NoPackage.java"));
|
||||
checkExit(Exit.OK);
|
||||
|
||||
//Make sure the horizontal scroll bar does not appear in class frame.
|
||||
checkOutput("index.html", true,
|
||||
"<frame src=\"overview-summary.html\" name=\"classFrame\" title=\""
|
||||
+ "Package, class and interface descriptions\" scrolling=\"yes\">");
|
||||
"<iframe src=\"overview-summary.html\" name=\"classFrame\" title=\""
|
||||
+ "Package, class and interface descriptions\" class=\"rightIframe\">");
|
||||
|
||||
//Test index-all.html
|
||||
checkOutput("index-all.html", true,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2004, 2015, 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
|
||||
@ -99,10 +99,6 @@ public class TestJavascript extends JavadocTester {
|
||||
+ " }\n"
|
||||
+ " return true;\n"
|
||||
+ " }\n"
|
||||
+ " function loadFrames() {\n"
|
||||
+ " if (targetPage != \"\" && targetPage != \"undefined\")\n"
|
||||
+ " top.classFrame.location = top.targetPage;\n"
|
||||
+ " }\n"
|
||||
+ "</script>");
|
||||
|
||||
//Make sure title javascript only runs if is-external is not true
|
||||
|
@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, 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 7001086
|
||||
* @summary Test Non-frame warning.
|
||||
* @author Bhavesh Patel
|
||||
* @library ../lib
|
||||
* @build JavadocTester
|
||||
* @run main TestNonFrameWarning
|
||||
*/
|
||||
|
||||
public class TestNonFrameWarning extends JavadocTester {
|
||||
|
||||
public static void main(String... args) throws Exception {
|
||||
TestNonFrameWarning tester = new TestNonFrameWarning();
|
||||
tester.runTests();
|
||||
}
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
javadoc("-d", "out",
|
||||
"-sourcepath", testSrc,
|
||||
"pkg");
|
||||
checkExit(Exit.OK);
|
||||
|
||||
checkOutput("index.html", true,
|
||||
"<p>This document is designed to be viewed using the frames feature. "
|
||||
+ "If you see this message, you are using a non-frame-capable web client. "
|
||||
+ "Link to <a href=\"pkg/package-summary.html\">Non-frame version</a>.</p>");
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 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;
|
||||
|
||||
/**
|
||||
* Source file for C
|
||||
*/
|
||||
public class C {
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2015, 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
|
||||
@ -112,7 +112,7 @@ public class TestProfiles extends JavadocTester {
|
||||
"<div class=\"subTitle\">compact1, compact2, compact3</div>");
|
||||
|
||||
checkOutput("index.html", true,
|
||||
"<frame src=\"overview-frame.html\" name=\"packageListFrame\" "
|
||||
"<iframe src=\"overview-frame.html\" name=\"packageListFrame\" "
|
||||
+ "title=\"All Packages\">");
|
||||
|
||||
// Test for "overview-summary.html" showing the profile list.
|
||||
|
@ -64,6 +64,17 @@ public class TestStylesheet extends JavadocTester {
|
||||
+ " font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;\n"
|
||||
+ " font-size:14px;\n"
|
||||
+ " margin:0;\n"
|
||||
+ " padding:0;\n"
|
||||
+ " height:100%;\n"
|
||||
+ " width:100%;\n"
|
||||
+ "}",
|
||||
"iframe {\n"
|
||||
+ " margin:0;\n"
|
||||
+ " padding:0;\n"
|
||||
+ " height:100%;\n"
|
||||
+ " width:100%;\n"
|
||||
+ " overflow-y:scroll;\n"
|
||||
+ " border:none;\n"
|
||||
+ "}",
|
||||
"ul {\n"
|
||||
+ " list-style-type:disc;\n"
|
||||
@ -149,6 +160,9 @@ public class TestStylesheet extends JavadocTester {
|
||||
"<link rel=\"stylesheet\" type=\"text/css\" "
|
||||
+ "href=\"../stylesheet.css\" title=\"Style\">");
|
||||
|
||||
checkOutput("index.html", true,
|
||||
"<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheet.css\" title=\"Style\">");
|
||||
|
||||
checkOutput("stylesheet.css", false,
|
||||
"* {\n"
|
||||
+ " margin:0;\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user