style.applyStyleFromSelector(dec, selector);
}
}
}
else if (rule.getType() == CSSRule.IMPORT_RULE) {
final CSSImportRuleImpl importRule = (CSSImportRuleImpl) rule;
Stylesheet sheet = imports_.get(importRule);
if (sheet == null) {
// TODO: surely wrong: in which case is it null and why?
final String uri = (uri_ != null) ? uri_
: e.getPage().getWebResponse().getRequestSettings().getUrl().toExternalForm();
final String href = importRule.getHref();
final String url = UrlUtils.resolveUrl(uri, href);
sheet = loadStylesheet(getWindow(), ownerNode_, null, url);
imports_.put(importRule, sheet);
}
sheet.modifyIfNecessary(style, element);