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

convert builders to high-level Content blocks



      Currently, we have various builders to generate blocks of HTML. However one drawback is that these builders are not subtypes of Content and cannot be passed around as Content.

      It would be good to move towards a paradigm of more high-level subtypes of Content, that can be passed around as Content, and potentially downcast to the subtype, to regain access to subtype-specific API.

      One step in that direction is to convert our existing Content builders into subtypes of Content, such that they can be directly added to enclosing content objects without having to call .toContent.

      This also has the advantage of not creating the HtmlTree earlier than it needs to be: in other words, we may be able to defer creating the HtmlTree for the block until it needs to be written out.

      Somewhat related, the Navigation class is currently in the formats.html.markup package, but does not really belong there, as it is too high-level a construct to be part of the markup level. It should be moved to the formats.html package, and at the same time, can be cleaned up a bit.




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


              • Created: