Class StylesheetFactoryImpl

java.lang.Object
com.openhtmltopdf.context.StylesheetFactoryImpl
All Implemented Interfaces:
StylesheetFactory

public class StylesheetFactoryImpl extends Object implements StylesheetFactory
A Factory class for Cascading Style Sheets. Sheets are parsed using a single parser instance for all sheets. Sheets are cached by URI using a LRU test, but timestamp of file is not checked.
  • Field Details

    • _userAgentCallback

      private UserAgentCallback _userAgentCallback
      the UserAgentCallback to resolve uris
    • _seenStylesheetUris

      private final Map<String,Integer> _seenStylesheetUris
      This may avoid @import loops, ie. one.css includes two.css which then includes one.css.
    • MAX_STYLESHEET_INCLUDES

      private static final int MAX_STYLESHEET_INCLUDES
      The maximum number of times a stylesheet uri can be link or imported before we give up and conclude there is a loop.
      See Also:
    • _cssParser

      private final CSSParser _cssParser
  • Constructor Details

    • StylesheetFactoryImpl

      public StylesheetFactoryImpl(UserAgentCallback userAgentCallback)
  • Method Details