use of com.gargoylesoftware.css.parser.selector.SelectorSpecificity in project htmlunit by HtmlUnit.
the class ComputedCSSStyleDeclaration method applyStyleFromSelector.
/**
* Makes a local, "computed", modification to this CSS style.
*
* @param declaration the style declaration
* @param selector the selector determining that the style applies to this element
*/
public void applyStyleFromSelector(final CSSStyleDeclarationImpl declaration, final Selector selector) {
final SelectorSpecificity specificity = selector.getSelectorSpecificity();
for (final Property prop : declaration.getProperties()) {
final String name = prop.getName();
final String value = declaration.getPropertyValue(name);
final String priority = declaration.getPropertyPriority(name);
applyLocalStyleAttribute(name, value, priority, specificity);
}
}
Aggregations