CascadedStyle
, setting the display property to
- * to the value of the display
parameter.
+ * Constructs a new CascadedStyle, given an {@link java.util.Iterator} of
+ * {@link com.openhtmltopdf.css.sheet.PropertyDeclaration}s already sorted
+ * by specificity of the CSS selector they came from. The Iterator can have
+ * multiple PropertyDeclarations with the same name; the property cascade
+ * will be resolved during instantiation, resulting in a set of
+ * PropertyDeclarations. Once instantiated, properties may be retrieved
+ * using the normal API for the class.
+ *
+ * @param iter An Iterator containing PropertyDeclarations in order of
+ * specificity.
*/
- public static CascadedStyle createAnonymousStyle(IdentValue display) {
- CSSPrimitiveValue val = new PropertyValue(display);
-
- List props = Collections.singletonList(
- new PropertyDeclaration(CSSName.DISPLAY, val, true, StylesheetInfo.USER));
-
- return new CascadedStyle(props.iterator());
+ CascadedStyle(java.util.IteratorCascadedStyle
, setting the display property to
+ * to the value of the display
parameter.
+ */
+ public static CascadedStyle createAnonymousStyle(IdentValue display) {
+ CSSPrimitiveValue val = new PropertyValue(display);
- addProperties(iter);
+ List