@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!(obj instanceof CSSImportRule)) { return false; } final CSSImportRule cir = (CSSImportRule) obj; return super.equals(obj) && LangUtils.equals(getHref(), cir.getHref()) && LangUtils.equals(getMedia(), cir.getMedia()); }
/** * Returns the URL of the imported style sheet. * @return the URL of the imported style sheet */ public String jsxGet_href() { return getImportRule().getHref(); }
/** * Returns the media types that the imported CSS style sheet applies to. * @return the media types that the imported CSS style sheet applies to */ public MediaList jsxGet_media() { if (media_ == null) { final Stylesheet parent = this.jsxGet_parentStyleSheet(); final org.w3c.dom.stylesheets.MediaList ml = getImportRule().getMedia(); media_ = new MediaList(parent, ml); } return media_; }
/** * Returns the style sheet referred to by this rule. * @return the style sheet referred to by this rule */ public Stylesheet jsxGet_styleSheet() { if (importedStylesheet_ == null) { final Stylesheet owningSheet = this.jsxGet_parentStyleSheet(); final HTMLElement ownerNode = owningSheet.jsxGet_ownerNode(); final CSSStyleSheet importedStylesheet = getImportRule().getStyleSheet(); importedStylesheet_ = new Stylesheet(ownerNode, importedStylesheet, owningSheet.getUri()); } return importedStylesheet_; }
/** * Returns the URL of the imported style sheet. * @return the URL of the imported style sheet */ public String jsxGet_href() { return getImportRule().getHref(); }
/** * Returns the media types that the imported CSS style sheet applies to. * @return the media types that the imported CSS style sheet applies to */ public MediaList jsxGet_media() { if (media_ == null) { final Stylesheet parent = this.jsxGet_parentStyleSheet(); final org.w3c.dom.stylesheets.MediaList ml = getImportRule().getMedia(); media_ = new MediaList(parent, ml); } return media_; }
/** * Returns the style sheet referred to by this rule. * @return the style sheet referred to by this rule */ public Stylesheet jsxGet_styleSheet() { if (importedStylesheet_ == null) { final Stylesheet owningSheet = this.jsxGet_parentStyleSheet(); final HTMLElement ownerNode = owningSheet.jsxGet_ownerNode(); final CSSStyleSheet importedStylesheet = getImportRule().getStyleSheet(); importedStylesheet_ = new Stylesheet(ownerNode, importedStylesheet, owningSheet.getUri()); } return importedStylesheet_; }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!(obj instanceof CSSImportRule)) { return false; } final CSSImportRule cir = (CSSImportRule) obj; return super.equals(obj) && LangUtils.equals(getHref(), cir.getHref()) && LangUtils.equals(getMedia(), cir.getMedia()); }
/** * Returns the URL of the imported style sheet. * @return the URL of the imported style sheet */ public String jsxGet_href() { return getImportRule().getHref(); }
/** * Returns the media types that the imported CSS style sheet applies to. * @return the media types that the imported CSS style sheet applies to */ public MediaList jsxGet_media() { if (media_ == null) { final Stylesheet parent = this.jsxGet_parentStyleSheet(); final org.w3c.dom.stylesheets.MediaList ml = getImportRule().getMedia(); media_ = new MediaList(parent, ml); } return media_; }
/** * Returns the style sheet referred to by this rule. * @return the style sheet referred to by this rule */ public Stylesheet jsxGet_styleSheet() { if (importedStylesheet_ == null) { final Stylesheet owningSheet = this.jsxGet_parentStyleSheet(); final HTMLElement ownerNode = owningSheet.jsxGet_ownerNode(); final CSSStyleSheet importedStylesheet = getImportRule().getStyleSheet(); importedStylesheet_ = new Stylesheet(ownerNode, importedStylesheet, owningSheet.getUri()); } return importedStylesheet_; }
final CSSImportRule cssImportRule = (CSSImportRule) cssRule; try { final URI importURI = new URI(getBaseUri()).resolve(cssImportRule.getHref()); final CSSStyleSheetImpl importedCSS = (CSSStyleSheetImpl) new CSSOMParser().parseStyleSheet(new InputSource( importedCSS.importImports(recursive); final MediaList mediaList = cssImportRule.getMedia(); if (mediaList.getLength() == 0) { mediaList.appendMedium("all");
/** * Returns the URL of the imported style sheet. * @return the URL of the imported style sheet */ @JsxGetter public String getHref() { return getImportRule().getHref(); }
/** * Returns the media types that the imported CSS style sheet applies to. * @return the media types that the imported CSS style sheet applies to */ @JsxGetter public MediaList getMedia() { if (media_ == null) { final CSSStyleSheet parent = getParentStyleSheet(); final org.w3c.dom.stylesheets.MediaList ml = getImportRule().getMedia(); media_ = new MediaList(parent, ml); } return media_; }
/** * Returns the style sheet referred to by this rule. * @return the style sheet referred to by this rule */ @JsxGetter public CSSStyleSheet getStyleSheet() { if (importedStylesheet_ == null) { final CSSStyleSheet owningSheet = getParentStyleSheet(); final HTMLElement ownerNode = owningSheet.getOwnerNode(); final org.w3c.dom.css.CSSStyleSheet importedStylesheet = getImportRule().getStyleSheet(); importedStylesheet_ = new CSSStyleSheet(ownerNode, importedStylesheet, owningSheet.getUri()); } return importedStylesheet_; }
@Override public void visitImportRule(CSSImportRule rule) { String resourceName = rule.getHref(); String libraryName = null; if (ELUtils.isValueReference(resourceName)) {
IPath trim = p.removeLastSegments(1); URL url = FileLocator.resolve(new URL(trim.addTrailingSeparator().toString() + ((CSSImportRule) rule).getHref())); File testFile = new File(url.getFile()); if (!testFile.exists()) { String path = getResourcesLocatorManager().resolve(((CSSImportRule) rule).getHref()); testFile = new File(new URL(path).getFile()); if (testFile.exists()) {