mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Avoid loading stylesheets in inactive documents.
This commit is contained in:
parent
736feec0ad
commit
29d3cbf34a
1 changed files with 4 additions and 0 deletions
|
@ -194,6 +194,10 @@ impl VirtualMethods for HTMLLinkElement {
|
|||
impl HTMLLinkElement {
|
||||
fn handle_stylesheet_url(&self, href: &str) {
|
||||
let document = document_from_node(self);
|
||||
if document.browsing_context().is_none() {
|
||||
return;
|
||||
}
|
||||
|
||||
match document.base_url().join(href) {
|
||||
Ok(url) => {
|
||||
let element = self.upcast::<Element>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue