Class HtmlElementTables


  • public final class HtmlElementTables
    extends Object
    Metadata about HTML elements.
    • Field Detail

      • TEXT_NODE

        public static final int TEXT_NODE
        Pseudo element index for text nodes.
        See Also:
        Constant Field Values
    • Method Detail

      • canContain

        public boolean canContain​(int parent,
                                  int child)
        True if parent can directly contain child.
      • indexForName

        public int indexForName​(String canonName)
        The element index for the element with the given name.
      • canonNameForIndex

        public String canonNameForIndex​(int index)
        The element index for the element with the given name.
      • resumable

        public boolean resumable​(int index)
        The elements that can be resumed after misnested inline tags.
      • canContainText

        public boolean canContainText​(int index)
        Whether parsing can produce an element with the given index that contains a text node.
      • canContainPlainText

        public boolean canContainPlainText​(int index)
        Whether parsing can produce an element with the given index that contains a text node that has human readable text instead of script or style source code.
      • nElementTypes

        public int nElementTypes()
        The number of element types which is also the exclusive upper bound on element indices.
      • unpack

        public static boolean[] unpack​(int[] packed,
                                       int length)
        Unpacks a boolean[] from an array of ints. This allows us to store largish boolean[]s in relatively small numbers of bytecode instructions.