Class SourceSet.Parser

  • Enclosing class:
    SourceSet

    private static final class SourceSet.Parser
    extends java.lang.Object
    The `srcser` parser implementation. Folows the logic of the "parsing a srcset attribute" algorithm, see https://html.spec.whatwg.org/#parsing-a-srcset-attribute
    • Field Detail

      • POSITIVE_FLOAT

        private static java.util.regex.Pattern POSITIVE_FLOAT
    • Method Detail

      • parse

        public SourceSet parse​(java.lang.CharSequence srcset)
      • removeTrailingCommas

        private static int removeTrailingCommas​(java.lang.StringBuilder sb)
        Remove trailing commas and return the count of commas removed
      • finalizeSource

        private SourceSet.ImageSource finalizeSource​(java.lang.StringBuilder url,
                                                     java.util.List<java.lang.String> descriptors)