mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
servo: Merge #18053 - Overhaul dirty descendants propagation in preparation for restyle roots (from bholley:descendants_bit_refactor); r=emilio
https://bugzilla.mozilla.org/show_bug.cgi?id=1389385 Source-Repo: https://github.com/servo/servo Source-Revision: faad7ffb457100d35164b132c012e221cbc62bf5 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 5608f5fa6e06515e49e67ad766b52224e356dca0
This commit is contained in:
parent
2860540d5f
commit
6be4999824
@ -63,14 +63,13 @@ use std::hash::{Hash, Hasher};
|
||||
use std::marker::PhantomData;
|
||||
use std::mem::transmute;
|
||||
use std::sync::atomic::Ordering;
|
||||
use style;
|
||||
use style::CaseSensitivityExt;
|
||||
use style::applicable_declarations::ApplicableDeclarationBlock;
|
||||
use style::attr::AttrValue;
|
||||
use style::computed_values::display;
|
||||
use style::context::{QuirksMode, SharedStyleContext};
|
||||
use style::data::ElementData;
|
||||
use style::dom::{DescendantsBit, DirtyDescendants, LayoutIterator, NodeInfo, OpaqueNode};
|
||||
use style::dom::{LayoutIterator, NodeInfo, OpaqueNode};
|
||||
use style::dom::{PresentationalHintsSynthesizer, TElement, TNode, UnsafeNode};
|
||||
use style::element_state::*;
|
||||
use style::font_metrics::ServoMetricsProvider;
|
||||
@ -469,11 +468,6 @@ impl<'le> TElement for ServoLayoutElement<'le> {
|
||||
self.as_node().node.set_flag(HANDLED_SNAPSHOT, true);
|
||||
}
|
||||
|
||||
unsafe fn note_descendants<B: DescendantsBit<Self>>(&self) {
|
||||
debug_assert!(self.get_data().is_some());
|
||||
style::dom::raw_note_descendants::<Self, B>(*self);
|
||||
}
|
||||
|
||||
unsafe fn set_dirty_descendants(&self) {
|
||||
debug_assert!(self.as_node().node.get_flag(IS_IN_DOC));
|
||||
self.as_node().node.set_flag(HAS_DIRTY_DESCENDANTS, true)
|
||||
@ -625,12 +619,6 @@ impl<'le> ServoLayoutElement<'le> {
|
||||
self.as_node().node.set_flag(HAS_SNAPSHOT, true);
|
||||
}
|
||||
|
||||
// FIXME(bholley): This should be merged with TElement::note_descendants,
|
||||
// but that requires re-testing and possibly fixing the broken callers given
|
||||
// the FIXME below, which I don't have time to do right now.
|
||||
//
|
||||
// FIXME(emilio): We'd also need to relax the invariant in note_descendants
|
||||
// re. the data already available I think.
|
||||
pub unsafe fn note_dirty_descendant(&self) {
|
||||
use ::selectors::Element;
|
||||
|
||||
@ -644,8 +632,6 @@ impl<'le> ServoLayoutElement<'le> {
|
||||
el.set_dirty_descendants();
|
||||
current = el.parent_element();
|
||||
}
|
||||
|
||||
debug_assert!(self.descendants_bit_is_propagated::<DirtyDescendants>());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,6 @@ use std::fmt::Debug;
|
||||
use std::hash::Hash;
|
||||
use std::ops::Deref;
|
||||
use stylist::Stylist;
|
||||
use thread_state;
|
||||
use traversal_flags::{TraversalFlags, self};
|
||||
|
||||
pub use style_traits::UnsafeNode;
|
||||
@ -240,44 +239,6 @@ fn fmt_subtree<F, N: TNode>(f: &mut fmt::Formatter, stringify: &F, n: N, indent:
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Flag that this element has a descendant for style processing, propagating
|
||||
/// the bit up to the root as needed.
|
||||
///
|
||||
/// This is _not_ safe to call during the parallel traversal.
|
||||
///
|
||||
/// This is intended as a helper so Servo and Gecko can override it with custom
|
||||
/// stuff if needed.
|
||||
///
|
||||
/// Returns whether no parent had already noted it, that is, whether we reached
|
||||
/// the root during the walk up.
|
||||
pub unsafe fn raw_note_descendants<E, B>(element: E) -> bool
|
||||
where E: TElement,
|
||||
B: DescendantsBit<E>,
|
||||
{
|
||||
debug_assert!(!thread_state::get().is_worker());
|
||||
// TODO(emilio, bholley): Documenting the flags setup a bit better wouldn't
|
||||
// really hurt I guess.
|
||||
debug_assert!(element.get_data().is_some(),
|
||||
"You should ensure you only flag styled elements");
|
||||
|
||||
let mut curr = Some(element);
|
||||
while let Some(el) = curr {
|
||||
if B::has(el) {
|
||||
break;
|
||||
}
|
||||
B::set(el);
|
||||
curr = el.traversal_parent();
|
||||
}
|
||||
|
||||
// Note: We disable this assertion on servo because of bugs. See the
|
||||
// comment around note_dirty_descendant in layout/wrapper.rs.
|
||||
if cfg!(feature = "gecko") {
|
||||
debug_assert!(element.descendants_bit_is_propagated::<B>());
|
||||
}
|
||||
|
||||
curr.is_none()
|
||||
}
|
||||
|
||||
/// A trait used to synthesize presentational hints for HTML element attributes.
|
||||
pub trait PresentationalHintsSynthesizer {
|
||||
/// Generate the proper applicable declarations due to presentational hints,
|
||||
@ -501,30 +462,11 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
|
||||
data.has_styles() && !data.restyle.hint.has_non_animation_invalidations()
|
||||
}
|
||||
|
||||
/// Flags an element and its ancestors with a given `DescendantsBit`.
|
||||
///
|
||||
/// TODO(emilio): We call this conservatively from restyle_element_internal
|
||||
/// because we never flag unstyled stuff. A different setup for this may be
|
||||
/// a bit cleaner, but it's probably not worth to invest on it right now
|
||||
/// unless necessary.
|
||||
unsafe fn note_descendants<B: DescendantsBit<Self>>(&self);
|
||||
|
||||
/// Flag that this element has a descendant for style processing.
|
||||
///
|
||||
/// Only safe to call with exclusive access to the element.
|
||||
unsafe fn set_dirty_descendants(&self);
|
||||
|
||||
/// Debug helper to be sure the bit is propagated.
|
||||
fn descendants_bit_is_propagated<B: DescendantsBit<Self>>(&self) -> bool {
|
||||
let mut current = Some(*self);
|
||||
while let Some(el) = current {
|
||||
if !B::has(el) { return false; }
|
||||
current = el.traversal_parent();
|
||||
}
|
||||
|
||||
true
|
||||
}
|
||||
|
||||
/// Flag that this element has no descendant for style processing.
|
||||
///
|
||||
/// Only safe to call with exclusive access to the element.
|
||||
|
@ -1082,8 +1082,11 @@ extern "C" {
|
||||
pub fn Gecko_UnsetNodeFlags(node: RawGeckoNodeBorrowed, flags: u32);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_SetOwnerDocumentNeedsStyleFlush(element:
|
||||
RawGeckoElementBorrowed);
|
||||
pub fn Gecko_NoteDirtyElement(element: RawGeckoElementBorrowed);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_NoteAnimationOnlyDirtyElement(element:
|
||||
RawGeckoElementBorrowed);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Gecko_GetStyleContext(element: RawGeckoElementBorrowed,
|
||||
|
@ -33560,7 +33560,7 @@ pub mod root {
|
||||
root::nsTArray<root::mozilla::gfx::FontVariation> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_200535_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_200547_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsCSSSelector>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -33916,7 +33916,7 @@ pub mod root {
|
||||
root::mozilla::binding_danger::TErrorResult ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_202352_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_202364_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -34077,7 +34077,7 @@ pub mod root {
|
||||
root::JS::DeletePolicy ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_207967__bindgen_ty_id_207974_close0_instantiation() {
|
||||
fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_207983__bindgen_ty_id_207990_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::std::iterator>() , 1usize ,
|
||||
concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -34303,7 +34303,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::StyleSheet> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210452_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210468_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -34371,7 +34371,7 @@ pub mod root {
|
||||
root::nsCOMPtr<root::nsIObserver> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210754_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210770_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -34483,7 +34483,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::URLExtraData> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_211296_close0_instantiation() {
|
||||
fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_211312_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::mozilla::NotNull<*const root::mozilla::Encoding>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -34865,7 +34865,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::StyleSheet> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_211711_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_211727_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -34955,7 +34955,7 @@ pub mod root {
|
||||
) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_212110_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_212126_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35056,7 +35056,7 @@ pub mod root {
|
||||
root::nsTArray<::nsstring::nsStringRepr> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213079_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213091_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35145,7 +35145,7 @@ pub mod root {
|
||||
root::RefPtr<root::nsCSSFontFaceRule> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213384_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213396_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35156,7 +35156,7 @@ pub mod root {
|
||||
root::nsTArray<*mut root::nsIContent> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213389_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213401_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35213,7 +35213,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::CSSStyleSheet> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213880_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213892_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35861,7 +35861,7 @@ pub mod root {
|
||||
root::nsCOMPtr<root::nsIWeakReference> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_216741_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_216753_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut ::std::os::raw::c_void>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35940,7 +35940,7 @@ pub mod root {
|
||||
root::mozilla::DefaultDelete ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223003_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223015_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::AudioContext>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35973,7 +35973,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::dom::CallbackObject> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_224164_close0_instantiation() {
|
||||
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_224176_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35984,7 +35984,7 @@ pub mod root {
|
||||
root::JS::Heap<*mut root::JSObject> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_224168_close0_instantiation() {
|
||||
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_224180_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -36006,7 +36006,7 @@ pub mod root {
|
||||
root::nsCOMPtr<root::nsIGlobalObject> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_224175_close0_instantiation() {
|
||||
fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_224187_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::JS::TenuredHeap>() , 8usize ,
|
||||
concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -36085,7 +36085,7 @@ pub mod root {
|
||||
) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_225348_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_225360_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -36280,7 +36280,7 @@ pub mod root {
|
||||
root::nsTArray<f64> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226796_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226808_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -36385,7 +36385,7 @@ pub mod root {
|
||||
root::nsRefPtrHashKey<root::nsIAtom> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229219_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229231_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::CounterStyle>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37086,7 +37086,7 @@ pub mod root {
|
||||
root::RefPtr<root::nsStyleImageRequest> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_231772_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_231784_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37323,7 +37323,7 @@ pub mod root {
|
||||
root::nsCOMPtr<root::nsIURI> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239580_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239592_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37334,7 +37334,7 @@ pub mod root {
|
||||
root::nsTArray<*mut root::nsIContent> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239585_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239597_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37422,7 +37422,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::dom::ShadowRoot> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239698_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239710_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37709,7 +37709,7 @@ pub mod root {
|
||||
) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241284_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241296_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37731,7 +37731,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::dom::Element> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241446_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241458_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37742,7 +37742,7 @@ pub mod root {
|
||||
root::nsTArray<*mut root::nsIContent> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241451_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_241463_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37874,7 +37874,7 @@ pub mod root {
|
||||
root::nsTArray<root::mozilla::gfx::FontVariation> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_243535_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_243547_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37885,7 +37885,7 @@ pub mod root {
|
||||
root::nsTArray<*mut root::mozilla::css::DocumentRule> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_243543_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_243555_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
|
@ -33068,7 +33068,7 @@ pub mod root {
|
||||
root::nsTArray<root::mozilla::gfx::FontVariation> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_198168_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_198186_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsCSSSelector>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -33424,7 +33424,7 @@ pub mod root {
|
||||
root::mozilla::binding_danger::TErrorResult ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_199951_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_199969_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -33585,7 +33585,7 @@ pub mod root {
|
||||
root::JS::DeletePolicy ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_205538__bindgen_ty_id_205545_close0_instantiation() {
|
||||
fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_205560__bindgen_ty_id_205567_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::std::iterator>() , 1usize ,
|
||||
concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -33811,7 +33811,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::StyleSheet> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_208021_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_208043_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -33879,7 +33879,7 @@ pub mod root {
|
||||
root::nsCOMPtr ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_208323_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_208345_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -33991,7 +33991,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::URLExtraData> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_208865_close0_instantiation() {
|
||||
fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_208887_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::mozilla::NotNull<*const root::mozilla::Encoding>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -34371,7 +34371,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::StyleSheet> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_209278_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_209300_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -34461,7 +34461,7 @@ pub mod root {
|
||||
) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_209675_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_209697_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -34562,7 +34562,7 @@ pub mod root {
|
||||
root::nsTArray<::nsstring::nsStringRepr> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210634_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210652_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -34651,7 +34651,7 @@ pub mod root {
|
||||
root::RefPtr<root::nsCSSFontFaceRule> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210937_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210955_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -34662,7 +34662,7 @@ pub mod root {
|
||||
root::nsTArray<*mut root::nsIContent> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210942_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210960_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -34719,7 +34719,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::CSSStyleSheet> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_211417_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_211435_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::StyleSheet>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35354,7 +35354,7 @@ pub mod root {
|
||||
root::nsCOMPtr ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_214248_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_214266_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut ::std::os::raw::c_void>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35433,7 +35433,7 @@ pub mod root {
|
||||
root::mozilla::DefaultDelete ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_220493_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_220511_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::AudioContext>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35466,7 +35466,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::dom::CallbackObject> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_221654_close0_instantiation() {
|
||||
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_221672_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35477,7 +35477,7 @@ pub mod root {
|
||||
root::JS::Heap<*mut root::JSObject> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_221658_close0_instantiation() {
|
||||
fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_221676_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35499,7 +35499,7 @@ pub mod root {
|
||||
root::nsCOMPtr ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_221665_close0_instantiation() {
|
||||
fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_221683_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::JS::TenuredHeap>() , 8usize ,
|
||||
concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35578,7 +35578,7 @@ pub mod root {
|
||||
) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_222838_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_222856_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35773,7 +35773,7 @@ pub mod root {
|
||||
root::nsTArray<f64> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_224286_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_224304_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::dom::Element>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -35878,7 +35878,7 @@ pub mod root {
|
||||
root::nsRefPtrHashKey<root::nsIAtom> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226674_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226692_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::CounterStyle>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -36579,7 +36579,7 @@ pub mod root {
|
||||
root::RefPtr<root::nsStyleImageRequest> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229151_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229169_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsISupports>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -36816,7 +36816,7 @@ pub mod root {
|
||||
root::nsCOMPtr ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236959_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236977_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -36827,7 +36827,7 @@ pub mod root {
|
||||
root::nsTArray<*mut root::nsIContent> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236964_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236982_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -36915,7 +36915,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::dom::ShadowRoot> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_237077_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_237095_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37202,7 +37202,7 @@ pub mod root {
|
||||
) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_238657_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_238675_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37224,7 +37224,7 @@ pub mod root {
|
||||
root::RefPtr<root::mozilla::dom::Element> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_238815_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_238833_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37235,7 +37235,7 @@ pub mod root {
|
||||
root::nsTArray<*mut root::nsIContent> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_238820_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_238838_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37367,7 +37367,7 @@ pub mod root {
|
||||
root::nsTArray<root::mozilla::gfx::FontVariation> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240894_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240912_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
@ -37378,7 +37378,7 @@ pub mod root {
|
||||
root::nsTArray<*mut root::mozilla::css::DocumentRule> ) ));
|
||||
}
|
||||
#[test]
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240900_close0_instantiation() {
|
||||
fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240918_close0_instantiation() {
|
||||
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
|
||||
, 8usize , concat ! (
|
||||
"Size of template specialization: " , stringify ! (
|
||||
|
@ -20,7 +20,7 @@ use applicable_declarations::ApplicableDeclarationBlock;
|
||||
use atomic_refcell::{AtomicRefCell, AtomicRefMut};
|
||||
use context::{QuirksMode, SharedStyleContext, PostAnimationTasks, UpdateAnimationsTasks};
|
||||
use data::{ElementData, RestyleData};
|
||||
use dom::{self, DescendantsBit, LayoutIterator, NodeInfo, TElement, TNode, UnsafeNode};
|
||||
use dom::{LayoutIterator, NodeInfo, TElement, TNode, UnsafeNode};
|
||||
use dom::{OpaqueNode, PresentationalHintsSynthesizer};
|
||||
use element_state::{ElementState, DocumentState, NS_DOCUMENT_STATE_WINDOW_INACTIVE};
|
||||
use error_reporting::ParseErrorReporter;
|
||||
@ -685,23 +685,17 @@ impl<'le> GeckoElement<'le> {
|
||||
unsafe fn maybe_restyle<'a>(&self,
|
||||
data: &'a mut ElementData,
|
||||
animation_only: bool) -> Option<&'a mut RestyleData> {
|
||||
use dom::{AnimationOnlyDirtyDescendants, DirtyDescendants};
|
||||
|
||||
// Don't generate a useless RestyleData if the element hasn't been styled.
|
||||
if !data.has_styles() {
|
||||
return None;
|
||||
}
|
||||
|
||||
// Propagate the bit up the chain.
|
||||
if let Some(p) = self.traversal_parent() {
|
||||
if animation_only {
|
||||
p.note_descendants::<AnimationOnlyDirtyDescendants>();
|
||||
} else {
|
||||
p.note_descendants::<DirtyDescendants>();
|
||||
}
|
||||
};
|
||||
|
||||
bindings::Gecko_SetOwnerDocumentNeedsStyleFlush(self.0);
|
||||
if animation_only {
|
||||
bindings::Gecko_NoteAnimationOnlyDirtyElement(self.0);
|
||||
} else {
|
||||
bindings::Gecko_NoteDirtyElement(self.0);
|
||||
}
|
||||
|
||||
// Ensure and return the RestyleData.
|
||||
Some(&mut data.restyle)
|
||||
@ -1042,23 +1036,6 @@ impl<'le> TElement for GeckoElement<'le> {
|
||||
self.set_flags(ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32)
|
||||
}
|
||||
|
||||
unsafe fn note_descendants<B: DescendantsBit<Self>>(&self) {
|
||||
// FIXME(emilio): We seem to reach this in Gecko's
|
||||
// layout/style/test/test_pseudoelement_state.html, while changing the
|
||||
// state of an anonymous content element which is styled, but whose
|
||||
// parent isn't, presumably because we've cleared the data and haven't
|
||||
// reached it yet.
|
||||
//
|
||||
// Otherwise we should be able to assert this.
|
||||
if self.get_data().is_none() {
|
||||
return;
|
||||
}
|
||||
|
||||
if dom::raw_note_descendants::<Self, B>(*self) {
|
||||
bindings::Gecko_SetOwnerDocumentNeedsStyleFlush(self.0);
|
||||
}
|
||||
}
|
||||
|
||||
unsafe fn unset_dirty_descendants(&self) {
|
||||
self.unset_flags(ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user