mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Bug 1294572 - Avoid traversing children of XBL-bound elements during initial styling. r=heycam
MozReview-Commit-ID: JHABvLnMYco
This commit is contained in:
parent
7c7dd0f965
commit
652e891d0d
6 changed files with 73 additions and 14 deletions
|
@ -244,16 +244,6 @@ pub trait TElement : PartialEq + Debug + Sized + Copy + Clone + ElementExt + Pre
|
|||
/// traversal. Returns the number of children left to process.
|
||||
fn did_process_child(&self) -> isize;
|
||||
|
||||
/// Returns true if this element's style is display:none. Panics if
|
||||
/// the element has no style.
|
||||
fn is_display_none(&self) -> bool {
|
||||
let data = self.borrow_data().unwrap();
|
||||
// See the comment on `cascade_node` about getting the up-to-date parent
|
||||
// style for why we allow this on Gecko.
|
||||
debug_assert!(cfg!(feature = "gecko") || data.has_current_styles());
|
||||
data.styles().is_display_none()
|
||||
}
|
||||
|
||||
/// Gets a reference to the ElementData container.
|
||||
fn get_data(&self) -> Option<&AtomicRefCell<ElementData>>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue