Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8239817

Eliminate use of contentContainer and friends

    Details

      Description

      The doclet currently generates a <div> for each page with a class whose name ends in "Container".

      $ grep Container open/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlStyle.java
          allClassesContainer,
          allPackagesContainer,
          classUseContainer,
          constantValuesContainer,
          contentContainer,
          serializedFormContainer,
          serializedPackageContainer,
          sourceContainer,
          systemPropertiesContainer,

      The <div> nodes are used in the CSS to set margins and padding,
      but that functionality can easily be moved to the enclosing <main> node. There's no need for page-specific containers because the <body> already has a page-specific class that can be used if it is necessary to differentiate the styles for different pages.

      The container nodes are also used in CSS rules to provide context to other rules, but that is better handled by providing better CSS class names on more specific nodes. For example, see JDK-8239804.

      The "need" for these (undocumented) container nodes has leaked into API doc files. By moving the CSS functionality into the <main> node, we will be able to (separately) remove these regrettable uses of the container nodes. In the short term, they will simply become no-op nodes.

      open/src/java.desktop/share/classes/java/awt/doc-files/FocusSpec.html: <div class="contentContainer">
      open/src/java.desktop/share/classes/java/awt/doc-files/Modality.html:<div class="contentContainer">
      open/src/java.desktop/share/classes/java/awt/doc-files/DesktopProperties.html:<div class="contentContainer">
      open/src/java.desktop/share/classes/java/awt/doc-files/AWTThreadIssues.html:<div class="contentContainer">
      open/src/java.desktop/share/classes/javax/swing/plaf/nimbus/doc-files/properties.html:<div class="contentContainer">
      open/src/java.desktop/share/classes/javax/swing/plaf/multi/doc-files/multi_tsc.html:<div class="contentContainer">
      open/src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/componentProperties.html:<div class="contentContainer">
      open/src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html: <div class="contentContainer">
      open/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/gif_metadata.html:<div class="contentContainer">
      open/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/standard_metadata.html:<div class="contentContainer">
      open/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/bmp_metadata.html:<div class="contentContainer">
      open/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/tiff_metadata.html:<div class="contentContainer">
      open/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/jpeg_metadata.html:<div class="contentContainer">
      open/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/wbmp_metadata.html:<div class="contentContainer">
      open/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/png_metadata.html:<div class="contentContainer">

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jjg Jonathan Gibbons
                Reporter:
                jjg Jonathan Gibbons
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: