code: protected ElementBox createAnonymousBox(ElementBox parent, Box child, boolean block)
      {
          ElementBox anbox;
          if (block)
          {
              Element anelem = createAnonymousElement(child.getNode().getOwnerDocument(), "Xdiv", "block");
              anbox = new BlockBox(anelem, (Graphics2D) child.getGraphics().create(), child.getVisualContext().create());
              anbox.setViewport(viewport);
              anbox.setStyle(createAnonymousStyle("block"));
              ((BlockBox) anbox).contblock = false;
              anbox.isblock = true;
          }
          else
          {
              Element anelem = createAnonymousElement(child.getNode().getOwnerDocument(), "Xspan", "inline");
              anbox = new InlineBox(anelem, (Graphics2D) child.getGraphics().create(), child.getVisualContext().create());
              anbox.setViewport(viewport);
              anbox.setStyle(createAnonymousStyle("inline"));
              anbox.isblock = false;
          }
          if (parent != null)
          {
              computeInheritedStyle(anbox, parent);
              anbox.setParent(parent);
          }
          anbox.setOrder(next_order++);
          anbox.isempty = true;
          anbox.setBase(child.getBase());
          anbox.setContainingBlockBox(child.getContainingBlockBox());
          anbox.setClipBlock(child.getClipBlock());
          return anbox;
      }
docs: Creates an empty anonymous block or inline box that can be placed between an optional parent and its child.
  The corresponding properties of the box are taken from the child. The child is inserted NOT as the child box of the new box.
  The new box is NOT inserted as a subbox of the parent.
  @param parent an optional parent node. When used, the parent of the new box is set to this node and the style is inherited from the parent.
  @param child the child node
  @param block when set to <code>true</code>, a {@link BlockBox} is created. Otherwise, a {@link InlineBox} is created.
  @return the new created block box