changeset 2848:ea4930998b3a

8074521: Generate iframe instead of frame and frameset for index.html page Reviewed-by: jjg, ksrini
author bpatel
date Wed, 11 Mar 2015 23:53:38 -0700
parents 55ce0df1fb75
children f5a1cb1309ae
files src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/DocType.java src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTag.java src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css test/com/sun/javadoc/ValidHtml/ValidHtml.java test/com/sun/javadoc/testIndex/TestIndex.java test/com/sun/javadoc/testJavascript/TestJavascript.java test/com/sun/javadoc/testNonFrameWarning/TestNonFrameWarning.java test/com/sun/javadoc/testNonFrameWarning/pkg/C.java test/com/sun/javadoc/testProfiles/TestProfiles.java test/com/sun/javadoc/testStylesheet/TestStylesheet.java
diffstat 16 files changed, 178 insertions(+), 224 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java	Wed Mar 11 21:57:59 2015 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java	Wed Mar 11 23:53:38 2015 -0700
@@ -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 @@
      */
     int noOfPackages;
 
-    private final String SCROLL_YES = "yes";
-
     /**
      * Constructor to construct FrameOutputWriter object.
      *
@@ -96,90 +94,73 @@
      * 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);
     }
 }
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/DocType.java	Wed Mar 11 21:57:59 2015 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/DocType.java	Wed Mar 11 23:53:38 2015 -0700
@@ -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 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.
      *
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Wed Mar 11 21:57:59 2015 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Wed Mar 11 23:53:38 2015 -0700
@@ -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.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 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 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 @@
     }
 
     /**
-     * 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) {
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java	Wed Mar 11 21:57:59 2015 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java	Wed Mar 11 23:53:38 2015 -0700
@@ -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 @@
     indexHeader,
     inheritance,
     interfaceName,
+    leftContainer,
+    leftTop,
+    leftBottom,
     legalCopy,
+    mainContainer,
     memberNameLabel,
     memberNameLink,
     memberSummary,
@@ -79,6 +83,8 @@
     packageHierarchyLabel,
     paramLabel,
     returnLabel,
+    rightContainer,
+    rightIframe,
     rowColor,
     seeLabel,
     serializedFormContainer,
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTag.java	Wed Mar 11 21:57:59 2015 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTag.java	Wed Mar 11 23:53:38 2015 -0700
@@ -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 @@
     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 @@
     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,
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Wed Mar 11 21:57:59 2015 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Wed Mar 11 23:53:38 2015 -0700
@@ -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 @@
     }
 
     /**
-     * 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 @@
                 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());
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Wed Mar 11 21:57:59 2015 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Wed Mar 11 23:53:38 2015 -0700
@@ -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 @@
      *
      * @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 @@
                 "            }" + 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);
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties	Wed Mar 11 21:57:59 2015 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties	Wed Mar 11 23:53:38 2015 -0700
@@ -104,10 +104,7 @@
 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.
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css	Wed Mar 11 21:57:59 2015 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css	Wed Mar 11 23:53:38 2015 -0700
@@ -11,6 +11,17 @@
     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 @@
     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;
+}
--- a/test/com/sun/javadoc/ValidHtml/ValidHtml.java	Wed Mar 11 21:57:59 2015 -0700
+++ b/test/com/sun/javadoc/ValidHtml/ValidHtml.java	Wed Mar 11 23:53:38 2015 -0700
@@ -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 @@
         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 @@
         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 @@
                 + "</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\">";
 }
--- a/test/com/sun/javadoc/testIndex/TestIndex.java	Wed Mar 11 21:57:59 2015 -0700
+++ b/test/com/sun/javadoc/testIndex/TestIndex.java	Wed Mar 11 23:53:38 2015 -0700
@@ -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 @@
                 "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,
--- a/test/com/sun/javadoc/testJavascript/TestJavascript.java	Wed Mar 11 21:57:59 2015 -0700
+++ b/test/com/sun/javadoc/testJavascript/TestJavascript.java	Wed Mar 11 23:53:38 2015 -0700
@@ -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 @@
                 + "        }\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
--- a/test/com/sun/javadoc/testNonFrameWarning/TestNonFrameWarning.java	Wed Mar 11 21:57:59 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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>");
-    }
-}
--- a/test/com/sun/javadoc/testNonFrameWarning/pkg/C.java	Wed Mar 11 21:57:59 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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 {
-}
--- a/test/com/sun/javadoc/testProfiles/TestProfiles.java	Wed Mar 11 21:57:59 2015 -0700
+++ b/test/com/sun/javadoc/testProfiles/TestProfiles.java	Wed Mar 11 23:53:38 2015 -0700
@@ -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 @@
                 "<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.
--- a/test/com/sun/javadoc/testStylesheet/TestStylesheet.java	Wed Mar 11 21:57:59 2015 -0700
+++ b/test/com/sun/javadoc/testStylesheet/TestStylesheet.java	Wed Mar 11 23:53:38 2015 -0700
@@ -64,6 +64,17 @@
                 + "    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 @@
                 "<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"