mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Avoid Window::GetComputedStyle
when checking for display: none
This commit is contained in:
parent
1d8e78720b
commit
8d09398230
5 changed files with 10 additions and 19 deletions
|
@ -25,7 +25,6 @@ use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
|
|||
use devtools_traits::CSSError;
|
||||
use document_loader::DocumentLoader;
|
||||
use dom::bindings::cell::DomRefCell;
|
||||
use dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyleDeclarationMethods;
|
||||
use dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState};
|
||||
use dom::bindings::codegen::Bindings::EventBinding::EventInit;
|
||||
use dom::bindings::codegen::Bindings::TransitionEventBinding::TransitionEventInit;
|
||||
|
@ -1955,7 +1954,7 @@ impl ScriptThread {
|
|||
node.dirty(NodeDamage::NodeStyleDamaged);
|
||||
|
||||
if let Some(el) = node.downcast::<Element>() {
|
||||
if &*window.GetComputedStyle(el, None).Display() == "none" {
|
||||
if !el.has_css_layout_box() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue