Class CSSGroupingRule

java.lang.Object
org.htmlunit.corejs.javascript.ScriptableObject
All Implemented Interfaces:
Serializable, Cloneable, org.htmlunit.corejs.javascript.ConstProperties, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable
Direct Known Subclasses:
CSSConditionRule

public class CSSGroupingRule extends CSSRule
A JavaScript object for CSSGroupingRule.
See Also:
  • Field Details

    • cssRules_

      private CSSRuleList cssRules_
      The collection of rules defined in this rule.
    • cssRulesIndexFix_

      private List<Integer> cssRulesIndexFix_
  • Constructor Details

    • CSSGroupingRule

      public CSSGroupingRule()
      Creates a new instance.
    • CSSGroupingRule

      protected CSSGroupingRule(CSSStyleSheet stylesheet, org.htmlunit.cssparser.dom.CSSMediaRuleImpl rule)
      Creates a new instance.
      Parameters:
      stylesheet - the Stylesheet of this rule.
      rule - the wrapped rule
  • Method Details

    • jsConstructor

      public void jsConstructor()
      Creates an instance.
      Overrides:
      jsConstructor in class CSSRule
    • getCssRules

      public CSSRuleList getCssRules()
      Returns the collection of rules defined in this rule.
      Returns:
      the collection of rules defined in this rule
    • insertRule

      public int insertRule(String rule, Object position)
      Inserts a new rule.
      Parameters:
      rule - the CSS rule
      position - the position at which to insert the rule
      Returns:
      the position of the inserted rule
    • deleteRule

      public void deleteRule(int position)
      Deletes an existing rule.
      Parameters:
      position - the position of the rule to be deleted
    • initCssRules

      private void initCssRules()
    • fixIndex

      private int fixIndex(int index)
    • refreshCssRules

      private void refreshCssRules()
    • getGroupingRule

      private org.htmlunit.cssparser.dom.CSSMediaRuleImpl getGroupingRule()
      Returns the wrapped rule, as a media rule.
      Returns:
      the wrapped rule, as a media rule