From 7d45aad9b45d4a054a7f2526e7521db57b8a470d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 16 Apr 2017 08:16:24 +0200 Subject: [PATCH 1/4] Bug 1355343: Move node restyle bits to Element, and add bits for snapshot handling. r=bholley MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MozReview-Commit-ID: 6OrUKX5RcBq Signed-off-by: Emilio Cobos Álvarez --- components/style/build_gecko.rs | 1 + components/style/gecko/wrapper.rs | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs index 2db39701c5e..9b5b1273327 100644 --- a/components/style/build_gecko.rs +++ b/components/style/build_gecko.rs @@ -329,6 +329,7 @@ mod bindings { "NS_AUTHOR_SPECIFIED_.*", "NS_THEME_.*", "NODE_.*", + "ELEMENT_.*", "NS_FONT_.*", "NS_STYLE_.*", "NS_MATHML_.*", diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 66ac6797b97..17ee344bbbe 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -47,9 +47,11 @@ use gecko_bindings::bindings::Gecko_UpdateAnimations; use gecko_bindings::structs; use gecko_bindings::structs::{RawGeckoElement, RawGeckoNode}; use gecko_bindings::structs::{nsIAtom, nsIContent, nsStyleContext}; +use gecko_bindings::structs::ELEMENT_HANDLED_SNAPSHOT; +use gecko_bindings::structs::ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO; +use gecko_bindings::structs::ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO; +use gecko_bindings::structs::ELEMENT_HAS_SNAPSHOT; use gecko_bindings::structs::EffectCompositor_CascadeLevel as CascadeLevel; -use gecko_bindings::structs::NODE_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO; -use gecko_bindings::structs::NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO; use gecko_bindings::structs::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; use gecko_bindings::structs::NODE_IS_NATIVE_ANONYMOUS; use gecko_bindings::sugar::ownership::HasArcFFI; @@ -590,13 +592,13 @@ impl<'le> TElement for GeckoElement<'le> { } fn has_dirty_descendants(&self) -> bool { - self.flags() & (NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32) != 0 + self.flags() & (ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32) != 0 } unsafe fn set_dirty_descendants(&self) { debug_assert!(self.get_data().is_some()); debug!("Setting dirty descendants: {:?}", self); - self.set_flags(NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32) + self.set_flags(ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32) } unsafe fn note_descendants>(&self) { @@ -617,19 +619,19 @@ impl<'le> TElement for GeckoElement<'le> { } unsafe fn unset_dirty_descendants(&self) { - self.unset_flags(NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32) + self.unset_flags(ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32) } fn has_animation_only_dirty_descendants(&self) -> bool { - self.flags() & (NODE_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO as u32) != 0 + self.flags() & (ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO as u32) != 0 } unsafe fn set_animation_only_dirty_descendants(&self) { - self.set_flags(NODE_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO as u32) + self.set_flags(ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO as u32) } unsafe fn unset_animation_only_dirty_descendants(&self) { - self.unset_flags(NODE_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO as u32) + self.unset_flags(ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO as u32) } fn is_native_anonymous(&self) -> bool { From 46bf5d61f0e72dd56de1c696efeab64fef424dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 7 May 2017 16:36:47 +0200 Subject: [PATCH 2/4] Bug 1355343: Take all the snapshots into account. r=bholley MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I've chosen this approach mainly because there's no other good way to guarantee the model is correct than holding the snapshots alive until a style refresh. What I tried before this (storing them in a sort of "immutable element data") is a pain, since we call into style from the frame constructor and other content notifications, which makes keeping track of which snapshots should be cleared an which shouldn't an insane task. Ideally we'd have a single entry-point for style, but that's not the case right now, and changing that requires pretty non-trivial changes to the frame constructor. MozReview-Commit-ID: FF1KWZv2iBM Signed-off-by: Emilio Cobos Álvarez --- components/layout_thread/lib.rs | 89 +++++++----- components/script/dom/node.rs | 31 +++-- components/script/layout_wrapper.rs | 21 +++ components/style/build_gecko.rs | 2 + components/style/context.rs | 5 +- components/style/data.rs | 160 ++++++++-------------- components/style/dom.rs | 20 +++ components/style/gecko/selector_parser.rs | 2 + components/style/gecko/snapshot.rs | 81 ++++++----- components/style/gecko/wrapper.rs | 24 +++- components/style/matching.rs | 5 +- components/style/restyle_hints.rs | 92 ++++++++----- components/style/servo/selector_parser.rs | 33 +++++ components/style/stylist.rs | 10 +- components/style/traversal.rs | 66 +++++---- ports/geckolib/glue.rs | 106 +++++++------- 16 files changed, 439 insertions(+), 308 deletions(-) diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index c6ba5b6d4e6..cf9be917837 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -113,6 +113,7 @@ use style::dom::{ShowSubtree, ShowSubtreeDataAndPrimaryValues, TElement, TNode}; use style::error_reporting::{NullReporter, RustLogReporter}; use style::logical_geometry::LogicalPoint; use style::media_queries::{Device, MediaList, MediaType}; +use style::selector_parser::SnapshotMap; use style::servo::restyle_damage::{REFLOW, REFLOW_OUT_OF_FLOW, REPAINT, REPOSITION, STORE_OVERFLOW}; use style::shared_lock::{SharedRwLock, SharedRwLockReadGuard, StylesheetGuards}; use style::stylearc::Arc as StyleArc; @@ -509,7 +510,8 @@ impl LayoutThread { fn build_layout_context<'a>(&self, guards: StylesheetGuards<'a>, rw_data: &LayoutThreadData, - request_images: bool) + request_images: bool, + snapshot_map: &'a SnapshotMap) -> LayoutContext<'a> { let thread_local_style_context_creation_data = ThreadLocalStyleContextCreationInfo::new(self.new_animations_sender.clone()); @@ -527,6 +529,7 @@ impl LayoutThread { timer: self.timer.clone(), quirks_mode: self.quirks_mode.unwrap(), traversal_flags: TraversalFlags::empty(), + snapshot_map: snapshot_map, }, image_cache: self.image_cache.clone(), font_cache_thread: Mutex::new(self.font_cache_thread.clone()), @@ -1111,37 +1114,51 @@ impl LayoutThread { } let restyles = document.drain_pending_restyles(); - debug!("Draining restyles: {} (needs dirtying? {:?})", restyles.len(), needs_dirtying); - if !needs_dirtying { - for (el, restyle) in restyles { - // Propagate the descendant bit up the ancestors. Do this before - // the restyle calculation so that we can also do it for new - // unstyled nodes, which the descendants bit helps us find. - if let Some(parent) = el.parent_element() { - unsafe { parent.note_dirty_descendant() }; - } + debug!("Draining restyles: {} (needs dirtying? {:?})", + restyles.len(), needs_dirtying); + let mut map = SnapshotMap::new(); + let elements_with_snapshot: Vec<_> = + restyles + .iter() + .filter(|r| r.1.snapshot.is_some()) + .map(|r| r.0) + .collect(); - // If we haven't styled this node yet, we don't need to track a restyle. - let mut data = match el.mutate_layout_data() { - Some(d) => d, - None => continue, - }; - let mut style_data = &mut data.base.style_data; - debug_assert!(style_data.has_current_styles()); - let mut restyle_data = style_data.ensure_restyle(); - - // Stash the data on the element for processing by the style system. - restyle_data.hint = restyle.hint.into(); - restyle_data.damage = restyle.damage; - if let Some(s) = restyle.snapshot { - restyle_data.snapshot.ensure(move || s); - } - debug!("Noting restyle for {:?}: {:?}", el, restyle_data); + for (el, restyle) in restyles { + // Propagate the descendant bit up the ancestors. Do this before + // the restyle calculation so that we can also do it for new + // unstyled nodes, which the descendants bit helps us find. + if let Some(parent) = el.parent_element() { + unsafe { parent.note_dirty_descendant() }; } + + // If we haven't styled this node yet, we don't need to track a + // restyle. + let mut data = match el.mutate_layout_data() { + Some(d) => d, + None => { + unsafe { el.unset_snapshot_flags() }; + continue; + } + }; + + if let Some(s) = restyle.snapshot { + unsafe { el.set_has_snapshot() }; + map.insert(el.as_node().opaque(), s); + } + + let mut style_data = &mut data.base.style_data; + let mut restyle_data = style_data.ensure_restyle(); + + // Stash the data on the element for processing by the style system. + restyle_data.hint.insert(&restyle.hint.into()); + restyle_data.damage = restyle.damage; + debug!("Noting restyle for {:?}: {:?}", el, restyle_data); } // Create a layout context for use throughout the following passes. - let mut layout_context = self.build_layout_context(guards.clone(), &*rw_data, true); + let mut layout_context = + self.build_layout_context(guards.clone(), &*rw_data, true, &map); // NB: Type inference falls apart here for some reason, so we need to be very verbose. :-( let traversal_driver = if self.parallel_flag && self.parallel_traversal.is_some() { @@ -1152,10 +1169,12 @@ impl LayoutThread { let traversal = RecalcStyleAndConstructFlows::new(layout_context, traversal_driver); let token = { - let stylist = &>::shared_context(&traversal).stylist; + let context = >::shared_context(&traversal); >::pre_traverse(element, stylist, TraversalFlags::empty()) + DomTraversal>::pre_traverse(element, + context, + TraversalFlags::empty()) }; if token.should_traverse() { @@ -1192,6 +1211,10 @@ impl LayoutThread { self.root_flow = self.try_get_layout_root(element.as_node()); } + for element in elements_with_snapshot { + unsafe { element.unset_snapshot_flags() } + } + layout_context = traversal.destroy(); if opts::get().dump_style_tree { @@ -1382,7 +1405,11 @@ impl LayoutThread { author: &author_guard, ua_or_user: &ua_or_user_guard, }; - let mut layout_context = self.build_layout_context(guards, &*rw_data, false); + let snapshots = SnapshotMap::new(); + let mut layout_context = self.build_layout_context(guards, + &*rw_data, + false, + &snapshots); { // Perform an abbreviated style recalc that operates without access to the DOM. diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 6f65faaed07..31e48b5b695 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -144,29 +144,40 @@ pub struct Node { bitflags! { #[doc = "Flags for node items."] #[derive(JSTraceable, HeapSizeOf)] - pub flags NodeFlags: u8 { + pub flags NodeFlags: u16 { #[doc = "Specifies whether this node is in a document."] - const IS_IN_DOC = 0x01, + const IS_IN_DOC = 1 << 0, + #[doc = "Specifies whether this node needs style recalc on next reflow."] - const HAS_DIRTY_DESCENDANTS = 0x08, + const HAS_DIRTY_DESCENDANTS = 1 << 1, // TODO: find a better place to keep this (#4105) // https://critic.hoppipolla.co.uk/showcomment?chain=8873 // Perhaps using a Set in Document? #[doc = "Specifies whether or not there is an authentic click in progress on \ this element."] - const CLICK_IN_PROGRESS = 0x10, + const CLICK_IN_PROGRESS = 1 << 2, #[doc = "Specifies whether this node is focusable and whether it is supposed \ to be reachable with using sequential focus navigation."] - const SEQUENTIALLY_FOCUSABLE = 0x20, + const SEQUENTIALLY_FOCUSABLE = 1 << 3, /// Whether any ancestor is a fragmentation container - const CAN_BE_FRAGMENTED = 0x40, + const CAN_BE_FRAGMENTED = 1 << 4, + #[doc = "Specifies whether this node needs to be dirted when viewport size changed."] - const DIRTY_ON_VIEWPORT_SIZE_CHANGE = 0x80, + const DIRTY_ON_VIEWPORT_SIZE_CHANGE = 1 << 5, #[doc = "Specifies whether the parser has set an associated form owner for \ this element. Only applicable for form-associatable elements."] - const PARSER_ASSOCIATED_FORM_OWNER = 0x90, + const PARSER_ASSOCIATED_FORM_OWNER = 1 << 6, + + /// Whether this element has a snapshot stored due to a style or + /// attribute change. + /// + /// See the `style::restyle_hints` module. + const HAS_SNAPSHOT = 1 << 7, + + /// Whether this element has already handled the stored snapshot. + const HANDLED_SNAPSHOT = 1 << 8, } } @@ -289,7 +300,9 @@ impl Node { for node in child.traverse_preorder() { // Out-of-document elements never have the descendants flag set. - node.set_flag(IS_IN_DOC | HAS_DIRTY_DESCENDANTS, false); + node.set_flag(IS_IN_DOC | HAS_DIRTY_DESCENDANTS | + HAS_SNAPSHOT | HANDLED_SNAPSHOT, + false); } for node in child.traverse_preorder() { // This needs to be in its own loop, because unbind_from_tree may diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs index 46e5921e3ac..7ae6a7e621e 100644 --- a/components/script/layout_wrapper.rs +++ b/components/script/layout_wrapper.rs @@ -39,6 +39,7 @@ use dom::characterdata::LayoutCharacterDataHelpers; use dom::document::{Document, LayoutDocumentHelpers, PendingRestyle}; use dom::element::{Element, LayoutElementHelpers, RawLayoutElementHelpers}; use dom::node::{CAN_BE_FRAGMENTED, DIRTY_ON_VIEWPORT_SIZE_CHANGE, HAS_DIRTY_DESCENDANTS, IS_IN_DOC}; +use dom::node::{HANDLED_SNAPSHOT, HAS_SNAPSHOT}; use dom::node::{LayoutNodeHelpers, Node}; use dom::text::Text; use gfx_traits::ByteIndex; @@ -413,6 +414,18 @@ impl<'le> TElement for ServoLayoutElement<'le> { unsafe { self.as_node().node.get_flag(HAS_DIRTY_DESCENDANTS) } } + fn has_snapshot(&self) -> bool { + unsafe { self.as_node().node.get_flag(HAS_SNAPSHOT) } + } + + fn handled_snapshot(&self) -> bool { + unsafe { self.as_node().node.get_flag(HANDLED_SNAPSHOT) } + } + + unsafe fn set_handled_snapshot(&self) { + self.as_node().node.set_flag(HANDLED_SNAPSHOT, true); + } + unsafe fn note_descendants>(&self) { debug_assert!(self.get_data().is_some()); style::dom::raw_note_descendants::(*self); @@ -509,6 +522,14 @@ impl<'le> ServoLayoutElement<'le> { } } + pub unsafe fn unset_snapshot_flags(&self) { + self.as_node().node.set_flag(HAS_SNAPSHOT | HANDLED_SNAPSHOT, false); + } + + pub unsafe fn set_has_snapshot(&self) { + 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. diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs index 9b5b1273327..8376587d5ac 100644 --- a/components/style/build_gecko.rs +++ b/components/style/build_gecko.rs @@ -305,6 +305,7 @@ mod bindings { .include(add_include("mozilla/ComputedTimingFunction.h")) .include(add_include("mozilla/Keyframe.h")) .include(add_include("mozilla/ServoElementSnapshot.h")) + .include(add_include("mozilla/ServoElementSnapshotTable.h")) .include(add_include("mozilla/dom/Element.h")) .include(add_include("mozilla/dom/NameSpaceConstants.h")) .include(add_include("mozilla/LookAndFeel.h")) @@ -671,6 +672,7 @@ mod bindings { "Keyframe", "ServoBundledURI", "ServoElementSnapshot", + "ServoElementSnapshotTable", "SheetParsingMode", "StyleBasicShape", "StyleBasicShapeType", diff --git a/components/style/context.rs b/components/style/context.rs index 029f8901aa9..f319c76ba34 100644 --- a/components/style/context.rs +++ b/components/style/context.rs @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //! The context within which style is calculated. -#![deny(missing_docs)] use animation::{Animation, PropertyAnimation}; use app_units::Au; @@ -20,6 +19,7 @@ use font_metrics::FontMetricsProvider; use matching::StyleSharingCandidateCache; use parking_lot::RwLock; #[cfg(feature = "gecko")] use properties::ComputedValues; +use selector_parser::SnapshotMap; use selectors::matching::ElementSelectorFlags; #[cfg(feature = "servo")] use servo_config::opts; use shared_lock::StylesheetGuards; @@ -135,6 +135,9 @@ pub struct SharedStyleContext<'a> { /// Flags controlling how we traverse the tree. pub traversal_flags: TraversalFlags, + + /// A map with our snapshots in order to handle restyle hints. + pub snapshot_map: &'a SnapshotMap, } impl<'a> SharedStyleContext<'a> { diff --git a/components/style/data.rs b/components/style/data.rs index 651f003e4e9..0a1e42d6dd7 100644 --- a/components/style/data.rs +++ b/components/style/data.rs @@ -6,19 +6,17 @@ #![deny(missing_docs)] +use context::SharedStyleContext; use dom::TElement; use properties::ComputedValues; use properties::longhands::display::computed_value as display; use restyle_hints::{RESTYLE_DESCENDANTS, RESTYLE_LATER_SIBLINGS, RESTYLE_SELF, RestyleHint}; use rule_tree::StrongRuleNode; -use selector_parser::{EAGER_PSEUDO_COUNT, PseudoElement, RestyleDamage, Snapshot}; +use selector_parser::{EAGER_PSEUDO_COUNT, PseudoElement, RestyleDamage}; #[cfg(feature = "servo")] use std::collections::HashMap; use std::fmt; #[cfg(feature = "servo")] use std::hash::BuildHasherDefault; -use std::ops::Deref; use stylearc::Arc; -use stylist::Stylist; -use thread_state; use traversal::TraversalFlags; /// The structure that represents the result of style computation. This is @@ -199,9 +197,7 @@ impl StoredRestyleHint { // In the middle of an animation only restyle, we don't need to // propagate any restyle hints, and we need to remove ourselves. if traversal_flags.for_animation_only() { - if self.0.intersects(RestyleHint::for_animations()) { - self.0.remove(RestyleHint::for_animations()); - } + self.0.remove(RestyleHint::for_animations()); return Self::empty(); } @@ -275,55 +271,6 @@ impl From for StoredRestyleHint { } } -static NO_SNAPSHOT: Option = None; - -/// We really want to store an Option here, but we can't drop Gecko -/// Snapshots off-main-thread. So we make a convenient little wrapper to provide -/// the semantics of Option, while deferring the actual drop. -#[derive(Debug, Default)] -pub struct SnapshotOption { - snapshot: Option, - destroyed: bool, -} - -impl SnapshotOption { - /// An empty snapshot. - pub fn empty() -> Self { - SnapshotOption { - snapshot: None, - destroyed: false, - } - } - - /// Destroy this snapshot. - pub fn destroy(&mut self) { - self.destroyed = true; - debug_assert!(self.is_none()); - } - - /// Ensure a snapshot is available and return a mutable reference to it. - pub fn ensure Snapshot>(&mut self, create: F) -> &mut Snapshot { - debug_assert!(thread_state::get().is_layout()); - if self.is_none() { - self.snapshot = Some(create()); - self.destroyed = false; - } - - self.snapshot.as_mut().unwrap() - } -} - -impl Deref for SnapshotOption { - type Target = Option; - fn deref(&self) -> &Option { - if self.destroyed { - &NO_SNAPSHOT - } else { - &self.snapshot - } - } -} - /// Transient data used by the restyle algorithm. This structure is instantiated /// either before or during restyle traversal, and is cleared at the end of node /// processing. @@ -350,54 +297,17 @@ pub struct RestyleData { /// for Servo for now. #[cfg(feature = "gecko")] pub damage_handled: RestyleDamage, - - /// An optional snapshot of the original state and attributes of the element, - /// from which we may compute additional restyle hints at traversal time. - pub snapshot: SnapshotOption, } impl RestyleData { - /// Computes the final restyle hint for this element. - /// - /// This expands the snapshot (if any) into a restyle hint, and handles - /// explicit sibling restyle hints from the stored restyle hint. - /// - /// Returns true if later siblings must be restyled. - pub fn compute_final_hint(&mut self, - element: E, - stylist: &Stylist) - -> bool { - let mut hint = self.hint.0; - - if let Some(snapshot) = self.snapshot.as_ref() { - hint |= stylist.compute_restyle_hint(&element, snapshot); - } - - // If the hint includes a directive for later siblings, strip it out and - // notify the caller to modify the base hint for future siblings. - let later_siblings = hint.contains(RESTYLE_LATER_SIBLINGS); - hint.remove(RESTYLE_LATER_SIBLINGS); - - // Insert the hint, overriding the previous hint. This effectively takes - // care of removing the later siblings restyle hint. - self.hint = hint.into(); - - // Destroy the snapshot. - self.snapshot.destroy(); - - later_siblings - } - /// Returns true if this RestyleData might invalidate the current style. pub fn has_invalidations(&self) -> bool { - self.hint.has_self_invalidations() || - self.recascade || - self.snapshot.is_some() + self.hint.has_self_invalidations() || self.recascade } /// Returns true if this RestyleData might invalidate sibling styles. pub fn has_sibling_invalidations(&self) -> bool { - self.hint.has_sibling_invalidations() || self.snapshot.is_some() + self.hint.has_sibling_invalidations() } /// Returns damage handled. @@ -452,6 +362,51 @@ pub enum RestyleKind { } impl ElementData { + /// Computes the final restyle hint for this element, potentially allocating + /// a `RestyleData` if we need to. + /// + /// This expands the snapshot (if any) into a restyle hint, and handles + /// explicit sibling restyle hints from the stored restyle hint. + /// + /// Returns true if later siblings must be restyled. + pub fn compute_final_hint( + &mut self, + element: E, + context: &SharedStyleContext) + -> bool + { + debug!("compute_final_hint: {:?}, {:?}", + element, + context.traversal_flags); + + let mut hint = match self.get_restyle() { + Some(r) => r.hint.0, + None => RestyleHint::empty(), + }; + + if element.has_snapshot() && !element.handled_snapshot() { + hint |= context.stylist.compute_restyle_hint(&element, context.snapshot_map); + unsafe { element.set_handled_snapshot() } + debug_assert!(element.handled_snapshot()); + } + + let empty_hint = hint.is_empty(); + + // If the hint includes a directive for later siblings, strip it out and + // notify the caller to modify the base hint for future siblings. + let later_siblings = hint.contains(RESTYLE_LATER_SIBLINGS); + hint.remove(RESTYLE_LATER_SIBLINGS); + + // Insert the hint, overriding the previous hint. This effectively takes + // care of removing the later siblings restyle hint. + if !empty_hint { + self.ensure_restyle().hint = hint.into(); + } + + later_siblings + } + + /// Trivially construct an ElementData. pub fn new(existing: Option) -> Self { ElementData { @@ -460,22 +415,21 @@ impl ElementData { } } - /// Returns true if this element has a computed styled. + /// Returns true if this element has a computed style. pub fn has_styles(&self) -> bool { self.styles.is_some() } - /// Returns true if this element's style is up-to-date and has no potential - /// invalidation. - pub fn has_current_styles(&self) -> bool { - self.has_styles() && - self.restyle.as_ref().map_or(true, |r| !r.has_invalidations()) + /// Returns whether we have any outstanding style invalidation. + pub fn has_invalidations(&self) -> bool { + self.restyle.as_ref().map_or(false, |r| r.has_invalidations()) } /// Returns the kind of restyling that we're going to need to do on this /// element, based of the stored restyle hint. pub fn restyle_kind(&self) -> RestyleKind { - debug_assert!(!self.has_current_styles(), "Should've stopped earlier"); + debug_assert!(!self.has_styles() || self.has_invalidations(), + "Should've stopped earlier"); if !self.has_styles() { return RestyleKind::MatchAndCascade; } @@ -527,8 +481,6 @@ impl ElementData { /// Sets the computed element styles. pub fn set_styles(&mut self, styles: ElementStyles) { - debug_assert!(self.get_restyle().map_or(true, |r| r.snapshot.is_none()), - "Traversal should have expanded snapshots"); self.styles = Some(styles); } diff --git a/components/style/dom.rs b/components/style/dom.rs index 7a4fe5d1003..a8c2928b531 100644 --- a/components/style/dom.rs +++ b/components/style/dom.rs @@ -385,6 +385,26 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone + /// the actual restyle traversal. fn has_dirty_descendants(&self) -> bool; + /// Returns whether state or attributes that may change style have changed + /// on the element, and thus whether the element has been snapshotted to do + /// restyle hint computation. + fn has_snapshot(&self) -> bool; + + /// Returns whether the current snapshot if present has been handled. + fn handled_snapshot(&self) -> bool; + + /// Flags this element as having handled already its snapshot. + unsafe fn set_handled_snapshot(&self); + + /// Returns whether the element's styles are up-to-date. + fn has_current_styles(&self, data: &ElementData) -> bool { + if self.has_snapshot() && !self.handled_snapshot() { + return false; + } + + data.has_styles() && !data.has_invalidations() + } + /// Flags an element and its ancestors with a given `DescendantsBit`. /// /// TODO(emilio): We call this conservatively from restyle_element_internal diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs index af7dd323faf..6badfd145b6 100644 --- a/components/style/gecko/selector_parser.rs +++ b/components/style/gecko/selector_parser.rs @@ -16,6 +16,8 @@ use std::fmt; use std::ptr; use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace}; +pub use gecko::snapshot::SnapshotMap; + /// A representation of a CSS pseudo-element. /// /// In Gecko, we represent pseudo-elements as plain `Atom`s. diff --git a/components/style/gecko/snapshot.rs b/components/style/gecko/snapshot.rs index c3ce3a5a345..ea4871bc2a7 100644 --- a/components/style/gecko/snapshot.rs +++ b/components/style/gecko/snapshot.rs @@ -5,61 +5,60 @@ //! A gecko snapshot, that stores the element attributes and state before they //! change in order to properly calculate restyle hints. +use dom::TElement; use element_state::ElementState; use gecko::snapshot_helpers; use gecko::wrapper::{AttrSelectorHelpers, GeckoElement}; use gecko_bindings::bindings; use gecko_bindings::structs::ServoElementSnapshot; use gecko_bindings::structs::ServoElementSnapshotFlags as Flags; +use gecko_bindings::structs::ServoElementSnapshotTable; use restyle_hints::ElementSnapshot; use selector_parser::SelectorImpl; use selectors::parser::AttrSelector; -use std::ptr; use string_cache::Atom; /// A snapshot of a Gecko element. -/// -/// This is really a Gecko type (see `ServoElementSnapshot.h` in Gecko) we wrap -/// here. -#[derive(Debug)] -pub struct GeckoElementSnapshot(bindings::ServoElementSnapshotOwned); +pub type GeckoElementSnapshot = ServoElementSnapshot; -// FIXME(bholley): Add support for *OwnedConst type, and then we get Sync -// automatically. -unsafe impl Sync for GeckoElementSnapshot {} +/// A map from elements to snapshots for Gecko's style back-end. +pub type SnapshotMap = ServoElementSnapshotTable; + +impl SnapshotMap { + /// Gets the snapshot for this element, if any. + /// + /// FIXME(emilio): The transmute() business we do here is kind of nasty, but + /// it's a consequence of the map being a OpaqueNode -> Snapshot table in + /// Servo and an Element -> Snapshot table in Gecko. + /// + /// We should be able to make this a more type-safe with type annotations by + /// making SnapshotMap a trait and moving the implementations outside, but + /// that's a pain because it implies parameterizing SharedStyleContext. + pub fn get(&self, element: &E) -> Option<&GeckoElementSnapshot> { + debug_assert!(element.has_snapshot()); -impl Drop for GeckoElementSnapshot { - fn drop(&mut self) { unsafe { - bindings::Gecko_DropElementSnapshot(ptr::read(&self.0 as *const _)); + let element = + unsafe { ::std::mem::transmute::<&E, &GeckoElement>(element) }; + + bindings::Gecko_GetElementSnapshot(self, element.0).as_ref() } } } impl GeckoElementSnapshot { - /// Create a new snapshot of the given element. - pub fn new<'le>(el: GeckoElement<'le>) -> Self { - unsafe { GeckoElementSnapshot(bindings::Gecko_CreateElementSnapshot(el.0)) } - } - - /// Get a mutable reference to the snapshot. - pub fn borrow_mut_raw(&mut self) -> bindings::ServoElementSnapshotBorrowedMut { - &mut *self.0 - } - - /// Get the pointer to the actual snapshot. - pub fn ptr(&self) -> *const ServoElementSnapshot { - &*self.0 - } - #[inline] fn is_html_element_in_html_document(&self) -> bool { - unsafe { (*self.0).mIsHTMLElementInHTMLDocument } + self.mIsHTMLElementInHTMLDocument } #[inline] fn has_any(&self, flags: Flags) -> bool { - unsafe { ((*self.0).mContains as u8 & flags as u8) != 0 } + (self.mContains as u8 & flags as u8) != 0 + } + + fn as_ptr(&self) -> *const Self { + self } } @@ -68,7 +67,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot { fn match_attr_has(&self, attr: &AttrSelector) -> bool { unsafe { - bindings::Gecko_SnapshotHasAttr(self.ptr(), + bindings::Gecko_SnapshotHasAttr(self, attr.ns_or_null(), attr.select_name(self.is_html_element_in_html_document())) } @@ -76,7 +75,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot { fn match_attr_equals(&self, attr: &AttrSelector, value: &Atom) -> bool { unsafe { - bindings::Gecko_SnapshotAttrEquals(self.ptr(), + bindings::Gecko_SnapshotAttrEquals(self, attr.ns_or_null(), attr.select_name(self.is_html_element_in_html_document()), value.as_ptr(), @@ -86,7 +85,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot { fn match_attr_equals_ignore_ascii_case(&self, attr: &AttrSelector, value: &Atom) -> bool { unsafe { - bindings::Gecko_SnapshotAttrEquals(self.ptr(), + bindings::Gecko_SnapshotAttrEquals(self, attr.ns_or_null(), attr.select_name(self.is_html_element_in_html_document()), value.as_ptr(), @@ -95,7 +94,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot { } fn match_attr_includes(&self, attr: &AttrSelector, value: &Atom) -> bool { unsafe { - bindings::Gecko_SnapshotAttrIncludes(self.ptr(), + bindings::Gecko_SnapshotAttrIncludes(self, attr.ns_or_null(), attr.select_name(self.is_html_element_in_html_document()), value.as_ptr()) @@ -103,7 +102,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot { } fn match_attr_dash(&self, attr: &AttrSelector, value: &Atom) -> bool { unsafe { - bindings::Gecko_SnapshotAttrDashEquals(self.ptr(), + bindings::Gecko_SnapshotAttrDashEquals(self, attr.ns_or_null(), attr.select_name(self.is_html_element_in_html_document()), value.as_ptr()) @@ -111,7 +110,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot { } fn match_attr_prefix(&self, attr: &AttrSelector, value: &Atom) -> bool { unsafe { - bindings::Gecko_SnapshotAttrHasPrefix(self.ptr(), + bindings::Gecko_SnapshotAttrHasPrefix(self, attr.ns_or_null(), attr.select_name(self.is_html_element_in_html_document()), value.as_ptr()) @@ -119,7 +118,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot { } fn match_attr_substring(&self, attr: &AttrSelector, value: &Atom) -> bool { unsafe { - bindings::Gecko_SnapshotAttrHasSubstring(self.ptr(), + bindings::Gecko_SnapshotAttrHasSubstring(self, attr.ns_or_null(), attr.select_name(self.is_html_element_in_html_document()), value.as_ptr()) @@ -127,7 +126,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot { } fn match_attr_suffix(&self, attr: &AttrSelector, value: &Atom) -> bool { unsafe { - bindings::Gecko_SnapshotAttrHasSuffix(self.ptr(), + bindings::Gecko_SnapshotAttrHasSuffix(self, attr.ns_or_null(), attr.select_name(self.is_html_element_in_html_document()), value.as_ptr()) @@ -138,7 +137,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot { impl ElementSnapshot for GeckoElementSnapshot { fn state(&self) -> Option { if self.has_any(Flags::State) { - Some(ElementState::from_bits_truncate(unsafe { (*self.0).mState })) + Some(ElementState::from_bits_truncate(self.mState)) } else { None } @@ -151,7 +150,7 @@ impl ElementSnapshot for GeckoElementSnapshot { fn id_attr(&self) -> Option { let ptr = unsafe { - bindings::Gecko_SnapshotAtomAttrValue(self.ptr(), + bindings::Gecko_SnapshotAtomAttrValue(self, atom!("id").as_ptr()) }; @@ -163,7 +162,7 @@ impl ElementSnapshot for GeckoElementSnapshot { } fn has_class(&self, name: &Atom) -> bool { - snapshot_helpers::has_class(self.ptr(), + snapshot_helpers::has_class(self.as_ptr(), name, bindings::Gecko_SnapshotClassOrClassList) } @@ -171,7 +170,7 @@ impl ElementSnapshot for GeckoElementSnapshot { fn each_class(&self, callback: F) where F: FnMut(&Atom) { - snapshot_helpers::each_class(self.ptr(), + snapshot_helpers::each_class(self.as_ptr(), callback, bindings::Gecko_SnapshotClassOrClassList) } diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 17ee344bbbe..41a83526fd6 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -62,7 +62,7 @@ use properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock}; use properties::animated_properties::{AnimationValue, AnimationValueMap, TransitionProperty}; use properties::style_structs::Font; use rule_tree::CascadeLevel as ServoCascadeLevel; -use selector_parser::{ElementExt, Snapshot}; +use selector_parser::ElementExt; use selectors::Element; use selectors::matching::{ElementSelectorFlags, StyleRelations}; use selectors::parser::{AttrSelector, NamespaceConstraint}; @@ -363,6 +363,10 @@ impl<'le> GeckoElement<'le> { /// Clear the element data for a given element. pub fn clear_data(&self) { let ptr = self.0.mServoData.get(); + unsafe { + self.unset_flags(ELEMENT_HAS_SNAPSHOT as u32 | + ELEMENT_HANDLED_SNAPSHOT as u32); + } if !ptr.is_null() { debug!("Dropping ElementData for {:?}", self); let data = unsafe { Box::from_raw(self.0.mServoData.get()) }; @@ -391,11 +395,6 @@ impl<'le> GeckoElement<'le> { }, } } - - /// Creates a blank snapshot for this element. - pub fn create_snapshot(&self) -> Snapshot { - Snapshot::new(*self) - } } /// Converts flags from the layout used by rust-selectors to the layout used @@ -591,6 +590,19 @@ impl<'le> TElement for GeckoElement<'le> { } } + fn has_snapshot(&self) -> bool { + self.flags() & (ELEMENT_HAS_SNAPSHOT as u32) != 0 + } + + fn handled_snapshot(&self) -> bool { + self.flags() & (ELEMENT_HANDLED_SNAPSHOT as u32) != 0 + } + + unsafe fn set_handled_snapshot(&self) { + debug_assert!(self.get_data().is_some()); + self.set_flags(ELEMENT_HANDLED_SNAPSHOT as u32) + } + fn has_dirty_descendants(&self) -> bool { self.flags() & (ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32) != 0 } diff --git a/components/style/matching.rs b/components/style/matching.rs index 8da1192d4d3..0e1f94c9327 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -196,7 +196,7 @@ fn element_matches_candidate(element: &E, } let data = candidate_element.borrow_data().unwrap(); - debug_assert!(data.has_current_styles()); + debug_assert!(element.has_current_styles(&data)); let current_styles = data.styles(); debug!("Sharing style between {:?} and {:?}", element, candidate_element); @@ -432,7 +432,8 @@ trait PrivateMatchMethods: TElement { // construct a frame for some small piece of newly-added // content in order to do something specific with that frame, // but not wanting to flush all of layout). - debug_assert!(cfg!(feature = "gecko") || d.has_current_styles()); + debug_assert!(cfg!(feature = "gecko") || + parent_el.unwrap().has_current_styles(d)); d.styles().primary.values() }); diff --git a/components/style/restyle_hints.rs b/components/style/restyle_hints.rs index 1ac3774a66f..343c601c26f 100644 --- a/components/style/restyle_hints.rs +++ b/components/style/restyle_hints.rs @@ -13,7 +13,7 @@ use element_state::*; use gecko_bindings::structs::nsRestyleHint; #[cfg(feature = "servo")] use heapsize::HeapSizeOf; -use selector_parser::{AttrValue, NonTSPseudoClass, Snapshot, SelectorImpl}; +use selector_parser::{AttrValue, NonTSPseudoClass, SelectorImpl, Snapshot, SnapshotMap}; use selectors::{Element, MatchAttr}; use selectors::matching::{ElementSelectorFlags, StyleRelations}; use selectors::matching::matches_selector; @@ -126,6 +126,7 @@ impl RestyleHint { impl From for RestyleHint { fn from(raw: nsRestyleHint) -> Self { let raw_bits: u32 = raw.0; + // FIXME(bholley): Finish aligning the binary representations here and // then .expect() the result of the checked version. if Self::from_bits(raw_bits).is_none() { @@ -193,20 +194,29 @@ struct ElementWrapper<'a, E> where E: TElement, { element: E, - snapshot: Option<&'a Snapshot>, + snapshot_map: &'a SnapshotMap, } impl<'a, E> ElementWrapper<'a, E> where E: TElement, { - /// Trivially constructs an `ElementWrapper` without a snapshot. - pub fn new(el: E) -> ElementWrapper<'a, E> { - ElementWrapper { element: el, snapshot: None } + /// Trivially constructs an `ElementWrapper`. + fn new(el: E, snapshot_map: &'a SnapshotMap) -> Self { + ElementWrapper { element: el, snapshot_map: snapshot_map } } - /// Trivially constructs an `ElementWrapper` with a snapshot. - pub fn new_with_snapshot(el: E, snapshot: &'a Snapshot) -> ElementWrapper<'a, E> { - ElementWrapper { element: el, snapshot: Some(snapshot) } + /// Gets the snapshot associated with this element, if any. + /// + /// TODO(emilio): If the hash table lookup happens to appear in profiles, we + /// can cache the snapshot in a RefCell<&'a Snapshot>. + fn snapshot(&self) -> Option<&'a Snapshot> { + if !self.element.has_snapshot() { + return None + } + + let snapshot = self.snapshot_map.get(&self.element); + debug_assert!(snapshot.is_some(), "has_snapshot lied!"); + snapshot } } @@ -216,7 +226,7 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E> type Impl = SelectorImpl; fn match_attr_has(&self, attr: &AttrSelector) -> bool { - match self.snapshot { + match self.snapshot() { Some(snapshot) if snapshot.has_attrs() => snapshot.match_attr_has(attr), _ => self.element.match_attr_has(attr) @@ -226,7 +236,7 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E> fn match_attr_equals(&self, attr: &AttrSelector, value: &AttrValue) -> bool { - match self.snapshot { + match self.snapshot() { Some(snapshot) if snapshot.has_attrs() => snapshot.match_attr_equals(attr, value), _ => self.element.match_attr_equals(attr, value) @@ -236,7 +246,7 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E> fn match_attr_equals_ignore_ascii_case(&self, attr: &AttrSelector, value: &AttrValue) -> bool { - match self.snapshot { + match self.snapshot() { Some(snapshot) if snapshot.has_attrs() => snapshot.match_attr_equals_ignore_ascii_case(attr, value), _ => self.element.match_attr_equals_ignore_ascii_case(attr, value) @@ -246,7 +256,7 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E> fn match_attr_includes(&self, attr: &AttrSelector, value: &AttrValue) -> bool { - match self.snapshot { + match self.snapshot() { Some(snapshot) if snapshot.has_attrs() => snapshot.match_attr_includes(attr, value), _ => self.element.match_attr_includes(attr, value) @@ -256,7 +266,7 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E> fn match_attr_dash(&self, attr: &AttrSelector, value: &AttrValue) -> bool { - match self.snapshot { + match self.snapshot() { Some(snapshot) if snapshot.has_attrs() => snapshot.match_attr_dash(attr, value), _ => self.element.match_attr_dash(attr, value) @@ -266,7 +276,7 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E> fn match_attr_prefix(&self, attr: &AttrSelector, value: &AttrValue) -> bool { - match self.snapshot { + match self.snapshot() { Some(snapshot) if snapshot.has_attrs() => snapshot.match_attr_prefix(attr, value), _ => self.element.match_attr_prefix(attr, value) @@ -276,7 +286,7 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E> fn match_attr_substring(&self, attr: &AttrSelector, value: &AttrValue) -> bool { - match self.snapshot { + match self.snapshot() { Some(snapshot) if snapshot.has_attrs() => snapshot.match_attr_substring(attr, value), _ => self.element.match_attr_substring(attr, value) @@ -286,7 +296,7 @@ impl<'a, E> MatchAttr for ElementWrapper<'a, E> fn match_attr_suffix(&self, attr: &AttrSelector, value: &AttrValue) -> bool { - match self.snapshot { + match self.snapshot() { Some(snapshot) if snapshot.has_attrs() => snapshot.match_attr_suffix(attr, value), _ => self.element.match_attr_suffix(attr, value) @@ -322,7 +332,7 @@ impl<'a, E> Element for ElementWrapper<'a, E> relations, &mut |_, _| {}) } - match self.snapshot.and_then(|s| s.state()) { + match self.snapshot().and_then(|s| s.state()) { Some(snapshot_state) => snapshot_state.contains(flag), None => { self.element.match_non_ts_pseudo_class(pseudo_class, @@ -333,23 +343,28 @@ impl<'a, E> Element for ElementWrapper<'a, E> } fn parent_element(&self) -> Option { - self.element.parent_element().map(ElementWrapper::new) + self.element.parent_element() + .map(|e| ElementWrapper::new(e, self.snapshot_map)) } fn first_child_element(&self) -> Option { - self.element.first_child_element().map(ElementWrapper::new) + self.element.first_child_element() + .map(|e| ElementWrapper::new(e, self.snapshot_map)) } fn last_child_element(&self) -> Option { - self.element.last_child_element().map(ElementWrapper::new) + self.element.last_child_element() + .map(|e| ElementWrapper::new(e, self.snapshot_map)) } fn prev_sibling_element(&self) -> Option { - self.element.prev_sibling_element().map(ElementWrapper::new) + self.element.prev_sibling_element() + .map(|e| ElementWrapper::new(e, self.snapshot_map)) } fn next_sibling_element(&self) -> Option { - self.element.next_sibling_element().map(ElementWrapper::new) + self.element.next_sibling_element() + .map(|e| ElementWrapper::new(e, self.snapshot_map)) } fn is_html_element_in_html_document(&self) -> bool { @@ -365,7 +380,7 @@ impl<'a, E> Element for ElementWrapper<'a, E> } fn get_id(&self) -> Option { - match self.snapshot { + match self.snapshot() { Some(snapshot) if snapshot.has_attrs() => snapshot.id_attr(), _ => self.element.get_id() @@ -373,7 +388,7 @@ impl<'a, E> Element for ElementWrapper<'a, E> } fn has_class(&self, name: &Atom) -> bool { - match self.snapshot { + match self.snapshot() { Some(snapshot) if snapshot.has_attrs() => snapshot.has_class(name), _ => self.element.has_class(name) @@ -390,7 +405,7 @@ impl<'a, E> Element for ElementWrapper<'a, E> fn each_class(&self, callback: F) where F: FnMut(&Atom) { - match self.snapshot { + match self.snapshot() { Some(snapshot) if snapshot.has_attrs() => snapshot.each_class(callback), _ => self.element.each_class(callback) @@ -606,13 +621,21 @@ impl DependencySet { /// explained in the rest of the documentation. pub fn compute_hint(&self, el: &E, - snapshot: &Snapshot) + snapshots: &SnapshotMap) -> RestyleHint where E: TElement + Clone, { + debug_assert!(el.has_snapshot(), "Shouldn't be here!"); + let snapshot_el = ElementWrapper::new(el.clone(), snapshots); + + let snapshot = + snapshot_el.snapshot().expect("has_snapshot lied so badly"); + let current_state = el.get_state(); - let state_changes = snapshot.state() - .map_or_else(ElementState::empty, |old_state| current_state ^ old_state); + let state_changes = + snapshot.state() + .map_or_else(ElementState::empty, + |old_state| current_state ^ old_state); let attrs_changed = snapshot.has_attrs(); if state_changes.is_empty() && !attrs_changed { @@ -620,7 +643,6 @@ impl DependencySet { } let mut hint = RestyleHint::empty(); - let snapshot_el = ElementWrapper::new_with_snapshot(el.clone(), snapshot); // Compute whether the snapshot has any different id or class attributes // from the element. If it does, we need to pass those to the lookup, so @@ -637,12 +659,14 @@ impl DependencySet { } self.0.lookup_with_additional(*el, additional_id, &additional_classes, &mut |dep| { - if !dep.sensitivities.sensitive_to(attrs_changed, state_changes) || hint.contains(dep.hint) { + if !dep.sensitivities.sensitive_to(attrs_changed, state_changes) || + hint.contains(dep.hint) { return true; } - // We can ignore the selector flags, since they would have already been set during - // original matching for any element that might change its matching behavior here. + // We can ignore the selector flags, since they would have already + // been set during original matching for any element that might + // change its matching behavior here. let matched_then = matches_selector(&dep.selector, &snapshot_el, None, &mut StyleRelations::empty(), @@ -658,8 +682,8 @@ impl DependencySet { !hint.is_all() }); - debug!("Calculated restyle hint: {:?}. (Element={:?}, State={:?}, Snapshot={:?}, {} Deps)", - hint, el, current_state, snapshot, self.len()); + debug!("Calculated restyle hint: {:?} for {:?}. (State={:?}, {} Deps)", + hint, el, current_state, self.len()); trace!("Deps: {:?}", self); hint diff --git a/components/style/servo/selector_parser.rs b/components/style/servo/selector_parser.rs index 0335b249cb1..d81e14235a2 100644 --- a/components/style/servo/selector_parser.rs +++ b/components/style/servo/selector_parser.rs @@ -9,7 +9,9 @@ use {Atom, Prefix, Namespace, LocalName}; use attr::{AttrIdentifier, AttrValue}; use cssparser::{Parser as CssParser, ToCss, serialize_identifier}; +use dom::{OpaqueNode, TElement, TNode}; use element_state::ElementState; +use fnv::FnvHashMap; use restyle_hints::ElementSnapshot; use selector_parser::{ElementExt, PseudoElementCascadeType, SelectorParser}; use selectors::{Element, MatchAttrGeneric}; @@ -20,6 +22,7 @@ use std::borrow::Cow; use std::fmt; use std::fmt::Debug; use std::mem; +use std::ops::{Deref, DerefMut}; /// A pseudo-element, both public and private. /// @@ -448,6 +451,36 @@ impl SelectorImpl { } } +/// A map from elements to snapshots for the Servo style back-end. +#[derive(Debug)] +pub struct SnapshotMap(FnvHashMap); + +impl SnapshotMap { + /// Create a new empty `SnapshotMap`. + pub fn new() -> Self { + SnapshotMap(FnvHashMap::default()) + } + + /// Get a snapshot given an element. + pub fn get(&self, el: &T) -> Option<&ServoElementSnapshot> { + self.0.get(&el.as_node().opaque()) + } +} + +impl Deref for SnapshotMap { + type Target = FnvHashMap; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl DerefMut for SnapshotMap { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} + /// Servo's version of an element snapshot. #[derive(Debug)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] diff --git a/components/style/stylist.rs b/components/style/stylist.rs index 28d05589bbf..1f2dee79ae3 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -22,7 +22,7 @@ use properties::INHERIT_ALL; use properties::PropertyDeclarationBlock; use restyle_hints::{RestyleHint, DependencySet}; use rule_tree::{CascadeLevel, RuleTree, StrongRuleNode, StyleSource}; -use selector_parser::{SelectorImpl, PseudoElement, Snapshot}; +use selector_parser::{SelectorImpl, PseudoElement, SnapshotMap}; use selectors::Element; use selectors::bloom::BloomFilter; use selectors::matching::{AFFECTED_BY_STYLE_ATTRIBUTE, AFFECTED_BY_PRESENTATIONAL_HINTS}; @@ -894,16 +894,16 @@ impl Stylist { results } - /// Given an element, and a snapshot that represents a previous state of the - /// element, compute the appropriate restyle hint, that is, the kind of + /// Given an element, and a snapshot table that represents a previous state + /// of the tree, compute the appropriate restyle hint, that is, the kind of /// restyle we need to do. pub fn compute_restyle_hint(&self, element: &E, - snapshot: &Snapshot) + snapshots: &SnapshotMap) -> RestyleHint where E: TElement, { - self.dependencies.compute_hint(element, snapshot) + self.dependencies.compute_hint(element, snapshots) } /// Computes styles for a given declaration with parent_style. diff --git a/components/style/traversal.rs b/components/style/traversal.rs index 831a9454a62..44816c7a985 100644 --- a/components/style/traversal.rs +++ b/components/style/traversal.rs @@ -13,7 +13,6 @@ use restyle_hints::{RESTYLE_DESCENDANTS, RESTYLE_SELF}; use selector_parser::RestyleDamage; #[cfg(feature = "servo")] use servo_config::opts; use std::borrow::BorrowMut; -use stylist::Stylist; /// A per-traversal-level chunk of data. This is sent down by the traversal, and /// currently only holds the dom depth for the bloom filter. @@ -200,7 +199,9 @@ pub trait DomTraversal : Sync { /// appended children without restyling the parent. /// If traversal_flag::ANIMATION_ONLY is specified, style only elements for /// animations. - fn pre_traverse(root: E, stylist: &Stylist, traversal_flags: TraversalFlags) + fn pre_traverse(root: E, + shared_context: &SharedStyleContext, + traversal_flags: TraversalFlags) -> PreTraverseToken { debug_assert!(!(traversal_flags.for_reconstruct() && @@ -226,14 +227,12 @@ pub trait DomTraversal : Sync { // Expanding snapshots here may create a LATER_SIBLINGS restyle hint, which // we propagate to the next sibling element. if let Some(mut data) = root.mutate_data() { - if let Some(r) = data.get_restyle_mut() { - let later_siblings = r.compute_final_hint(root, stylist); - if later_siblings { - if let Some(next) = root.next_sibling_element() { - if let Some(mut next_data) = next.mutate_data() { - let hint = StoredRestyleHint::subtree_and_later_siblings(); - next_data.ensure_restyle().hint.insert(&hint); - } + let later_siblings = data.compute_final_hint(root, shared_context); + if later_siblings { + if let Some(next) = root.next_sibling_element() { + if let Some(mut next_data) = next.mutate_data() { + let hint = StoredRestyleHint::subtree_and_later_siblings(); + next_data.ensure_restyle().hint.insert(&hint); } } } @@ -375,6 +374,7 @@ pub trait DomTraversal : Sync { return true; } + trace!("{:?} doesn't need traversal", el); false } @@ -390,7 +390,7 @@ pub trait DomTraversal : Sync { log: LogBehavior) -> bool { // See the comment on `cascade_node` for why we allow this on Gecko. - debug_assert!(cfg!(feature = "gecko") || parent_data.has_current_styles()); + debug_assert!(cfg!(feature = "gecko") || parent.has_current_styles(parent_data)); // If the parent computed display:none, we don't style the subtree. if parent_data.styles().is_display_none() { @@ -597,11 +597,13 @@ pub fn recalc_style_at(traversal: &D, { context.thread_local.begin_element(element, &data); context.thread_local.statistics.elements_traversed += 1; + debug_assert!(!element.has_snapshot() || element.handled_snapshot(), + "Should've handled snapshots here already"); debug_assert!(data.get_restyle().map_or(true, |r| { - r.snapshot.is_none() && !r.has_sibling_invalidations() + !r.has_sibling_invalidations() }), "Should've computed the final hint and handled later_siblings already"); - let compute_self = !data.has_current_styles(); + let compute_self = !element.has_current_styles(data); let mut inherited_style_changed = false; debug!("recalc_style_at: {:?} (compute_self={:?}, dirty_descendants={:?}, data={:?})", @@ -613,9 +615,9 @@ pub fn recalc_style_at(traversal: &D, // If we're restyling this element to display:none, throw away all style // data in the subtree, notify the caller to early-return. - let display_none = data.styles().is_display_none(); - if display_none { - debug!("New element style is display:none - clearing data from descendants."); + if data.styles().is_display_none() { + debug!("{:?} style is display:none - clearing data from descendants.", + element); clear_descendant_data(element, &|e| unsafe { D::clear_element_data(&e) }); } @@ -636,15 +638,15 @@ pub fn recalc_style_at(traversal: &D, r.hint.propagate(&context.shared.traversal_flags) }, }; - debug_assert!(data.has_current_styles() || - context.shared.traversal_flags.for_animation_only(), - "Should have computed style or haven't yet valid computed \ - style in case of animation-only restyle"); trace!("propagated_hint={:?}, inherited_style_changed={:?}, \ is_display_none={:?}, implementing_pseudo={:?}", propagated_hint, inherited_style_changed, data.styles().is_display_none(), element.implemented_pseudo_element()); + debug_assert!(element.has_current_styles(data) || + context.shared.traversal_flags.for_animation_only(), + "Should have computed style or haven't yet valid computed \ + style in case of animation-only restyle"); let has_dirty_descendants_for_this_restyle = if context.shared.traversal_flags.for_animation_only() { @@ -779,6 +781,18 @@ fn preprocess_children(traversal: &D, continue; } + // Handle element snapshots and sibling restyle hints. + // + // NB: This will be a no-op if there's no restyle data and no snapshot. + let later_siblings = + child_data.compute_final_hint(child, traversal.shared_context()); + + trace!(" > {:?} -> {:?} + {:?}, later_siblings: {:?}", + child, + child_data.get_restyle().map(|r| &r.hint), + propagated_hint, + later_siblings); + // If the child doesn't have pre-existing RestyleData and we don't have // any reason to create one, avoid the useless allocation and move on to // the next child. @@ -786,6 +800,7 @@ fn preprocess_children(traversal: &D, damage_handled.is_empty() && !child_data.has_restyle() { continue; } + let mut restyle_data = child_data.ensure_restyle(); // Propagate the parent and sibling restyle hint. @@ -793,11 +808,6 @@ fn preprocess_children(traversal: &D, restyle_data.hint.insert(&propagated_hint); } - // Handle element snapshots and sibling restyle hints. - let stylist = &traversal.shared_context().stylist; - let later_siblings = restyle_data.compute_final_hint(child, stylist); - trace!(" > {:?} -> {:?}, later_siblings: {:?}", - child, restyle_data.hint, later_siblings); if later_siblings { propagated_hint.insert(&(RESTYLE_SELF | RESTYLE_DESCENDANTS).into()); } @@ -805,9 +815,11 @@ fn preprocess_children(traversal: &D, // Store the damage already handled by ancestors. restyle_data.set_damage_handled(damage_handled); - // If properties that we inherited from the parent changed, we need to recascade. + // If properties that we inherited from the parent changed, we need to + // recascade. // - // FIXME(bholley): Need to handle explicitly-inherited reset properties somewhere. + // FIXME(bholley): Need to handle explicitly-inherited reset properties + // somewhere. if parent_inherited_style_changed { restyle_data.recascade = true; } diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 3de322d9d98..1201b5acecb 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -61,6 +61,7 @@ use style::gecko_bindings::structs::{SheetParsingMode, nsIAtom, nsCSSPropertyID} use style::gecko_bindings::structs::{nsRestyleHint, nsChangeHint, nsCSSFontFaceRule}; use style::gecko_bindings::structs::Loader; use style::gecko_bindings::structs::RawGeckoPresContextOwned; +use style::gecko_bindings::structs::ServoElementSnapshotTable; use style::gecko_bindings::structs::URLExtraData; use style::gecko_bindings::structs::nsCSSValueSharedList; use style::gecko_bindings::structs::nsresult; @@ -149,7 +150,9 @@ unsafe fn dummy_url_data() -> &'static RefPtr { fn create_shared_context<'a>(global_style_data: &GlobalStyleData, guard: &'a SharedRwLockReadGuard, per_doc_data: &PerDocumentStyleDataImpl, - traversal_flags: TraversalFlags) -> SharedStyleContext<'a> { + traversal_flags: TraversalFlags, + snapshot_map: &'a ServoElementSnapshotTable) + -> SharedStyleContext<'a> { let local_context_data = ThreadLocalStyleContextCreationInfo::new(per_doc_data.new_animations_sender.clone()); @@ -166,12 +169,14 @@ fn create_shared_context<'a>(global_style_data: &GlobalStyleData, // FIXME Find the real QuirksMode information for this document quirks_mode: QuirksMode::NoQuirks, traversal_flags: traversal_flags, + snapshot_map: snapshot_map, } } fn traverse_subtree(element: GeckoElement, raw_data: RawServoStyleSetBorrowed, - traversal_flags: TraversalFlags) { + traversal_flags: TraversalFlags, + snapshots: &ServoElementSnapshotTable) { // When new content is inserted in a display:none subtree, we will call into // servo to try to style it. Detect that here and bail out. if let Some(parent) = element.parent_element() { @@ -184,7 +189,18 @@ fn traverse_subtree(element: GeckoElement, let per_doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow(); debug_assert!(!per_doc_data.stylesheets.has_changed()); - let token = RecalcStyleOnly::pre_traverse(element, &per_doc_data.stylist, traversal_flags); + let global_style_data = &*GLOBAL_STYLE_DATA; + let guard = global_style_data.shared_lock.read(); + let shared_style_context = create_shared_context(&global_style_data, + &guard, + &per_doc_data, + traversal_flags, + snapshots); + + + let token = RecalcStyleOnly::pre_traverse(element, + &shared_style_context, + traversal_flags); if !token.should_traverse() { return; } @@ -192,13 +208,6 @@ fn traverse_subtree(element: GeckoElement, debug!("Traversing subtree:"); debug!("{:?}", ShowSubtreeData(element.as_node())); - let global_style_data = &*GLOBAL_STYLE_DATA; - let guard = global_style_data.shared_lock.read(); - let shared_style_context = create_shared_context(&global_style_data, - &guard, - &per_doc_data, - traversal_flags); - let traversal_driver = if global_style_data.style_thread_pool.is_none() { TraversalDriver::Sequential } else { @@ -214,17 +223,20 @@ fn traverse_subtree(element: GeckoElement, } } -/// Traverses the subtree rooted at `root` for restyling. Returns whether a -/// Gecko post-traversal (to perform lazy frame construction, or consume any -/// RestyleData, or drop any ElementData) is required. +/// Traverses the subtree rooted at `root` for restyling. +/// +/// Returns whether a Gecko post-traversal (to perform lazy frame construction, +/// or consume any RestyleData, or drop any ElementData) is required. #[no_mangle] pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed, raw_data: RawServoStyleSetBorrowed, + snapshots: *const ServoElementSnapshotTable, root_behavior: structs::TraversalRootBehavior, restyle_behavior: structs::TraversalRestyleBehavior) -> bool { use self::structs::TraversalRestyleBehavior as Restyle; use self::structs::TraversalRootBehavior as Root; + debug_assert!(!snapshots.is_null()); let element = GeckoElement(root); debug!("Servo_TraverseSubtree: {:?}", element); @@ -238,12 +250,18 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed, if element.has_animation_only_dirty_descendants() || element.has_animation_restyle_hints() { - traverse_subtree(element, raw_data, traversal_flags | ANIMATION_ONLY); + traverse_subtree(element, + raw_data, + traversal_flags | ANIMATION_ONLY, + unsafe { &*snapshots }); } - traverse_subtree(element, raw_data, traversal_flags); + traverse_subtree(element, + raw_data, + traversal_flags, + unsafe { &*snapshots }); - element.has_dirty_descendants() || element.mutate_data().unwrap().has_restyle() + element.has_dirty_descendants() || element.borrow_data().unwrap().has_restyle() } #[no_mangle] @@ -436,18 +454,21 @@ pub extern "C" fn Servo_AnimationValue_Uncompute(value: RawServoAnimationValueBo #[no_mangle] pub extern "C" fn Servo_StyleSet_GetBaseComputedValuesForElement(raw_data: RawServoStyleSetBorrowed, element: RawGeckoElementBorrowed, + snapshots: *const ServoElementSnapshotTable, pseudo_tag: *mut nsIAtom) -> ServoComputedValuesStrong { use style::matching::MatchMethods; + debug_assert!(!snapshots.is_null()); let doc_data = PerDocumentStyleData::from_ffi(raw_data).borrow(); let global_style_data = &*GLOBAL_STYLE_DATA; let guard = global_style_data.shared_lock.read(); - let shared_context = &create_shared_context(&global_style_data, - &guard, - &doc_data, - TraversalFlags::empty()); + let shared_context = create_shared_context(&global_style_data, + &guard, + &doc_data, + TraversalFlags::empty(), + unsafe { &*snapshots }); let element = GeckoElement(element); let element_data = element.borrow_data().unwrap(); let styles = element_data.styles(); @@ -469,7 +490,10 @@ pub extern "C" fn Servo_StyleSet_GetBaseComputedValuesForElement(raw_data: RawSe }; let provider = get_metrics_provider_for_product(); - element.get_base_style(shared_context, &provider, &styles.primary, pseudo_style) + element.get_base_style(&shared_context, + &provider, + &styles.primary, + pseudo_style) .into_strong() } @@ -1867,10 +1891,12 @@ unsafe fn maybe_restyle<'a>(data: &'a mut AtomicRefMut, } // Propagate the bit up the chain. - if animation_only { - element.parent_element().map(|p| p.note_descendants::()); - } else { - element.parent_element().map(|p| p.note_descendants::()); + if let Some(p) = element.parent_element() { + if animation_only { + p.note_descendants::(); + } else { + p.note_descendants::(); + } }; bindings::Gecko_SetOwnerDocumentNeedsStyleFlush(element.0); @@ -1879,25 +1905,6 @@ unsafe fn maybe_restyle<'a>(data: &'a mut AtomicRefMut, Some(data.ensure_restyle()) } -#[no_mangle] -pub extern "C" fn Servo_Element_GetSnapshot(element: RawGeckoElementBorrowed) -> *mut structs::ServoElementSnapshot -{ - let element = GeckoElement(element); - let snapshot = match element.mutate_data() { - None => ptr::null_mut(), - Some(mut data) => { - if let Some(restyle_data) = unsafe { maybe_restyle(&mut data, element, false) } { - restyle_data.snapshot.ensure(|| element.create_snapshot()).borrow_mut_raw() - } else { - ptr::null_mut() - } - }, - }; - - debug!("Servo_Element_GetSnapshot: {:?}: {:?}", element, snapshot); - snapshot -} - #[no_mangle] pub extern "C" fn Servo_Element_GetStyleRuleList(element: RawGeckoElementBorrowed, rules: RawGeckoServoStyleRuleListBorrowedMut) { @@ -1982,12 +1989,12 @@ pub extern "C" fn Servo_ResolveStyle(element: RawGeckoElementBorrowed, { let element = GeckoElement(element); debug!("Servo_ResolveStyle: {:?}", element); - let data = unsafe { element.ensure_data() }.borrow_mut(); + let data = unsafe { element.ensure_data() }.borrow(); let valid_styles = if allow_stale { - data.has_styles() + data.has_styles() } else { - data.has_current_styles() + element.has_current_styles(&*data) }; if !valid_styles { @@ -2003,9 +2010,11 @@ pub extern "C" fn Servo_ResolveStyle(element: RawGeckoElementBorrowed, #[no_mangle] pub extern "C" fn Servo_ResolveStyleLazily(element: RawGeckoElementBorrowed, pseudo_tag: *mut nsIAtom, + snapshots: *const ServoElementSnapshotTable, raw_data: RawServoStyleSetBorrowed) -> ServoComputedValuesStrong { + debug_assert!(!snapshots.is_null()); let global_style_data = &*GLOBAL_STYLE_DATA; let guard = global_style_data.shared_lock.read(); let element = GeckoElement(element); @@ -2031,7 +2040,8 @@ pub extern "C" fn Servo_ResolveStyleLazily(element: RawGeckoElementBorrowed, let shared = create_shared_context(&global_style_data, &guard, &mut doc_data.borrow_mut(), - TraversalFlags::empty()); + TraversalFlags::empty(), + unsafe { &*snapshots }); let mut tlc = ThreadLocalStyleContext::new(&shared); let mut context = StyleContext { shared: &shared, From c732b0c60016c3e0024c754b420870c2a3186b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 7 May 2017 02:36:19 +0200 Subject: [PATCH 3/4] Bug 1355343: Cache snapshot lookups. r=bholley MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is likely to be important at least for the initial element. For the rest of them this is likely useless because we create them in a throwaway fashion. MozReview-Commit-ID: EFz9WUdB8S0 Signed-off-by: Emilio Cobos Álvarez --- components/style/restyle_hints.rs | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/components/style/restyle_hints.rs b/components/style/restyle_hints.rs index 343c601c26f..b90dc0350fc 100644 --- a/components/style/restyle_hints.rs +++ b/components/style/restyle_hints.rs @@ -22,6 +22,7 @@ use selectors::parser::{SelectorInner, SelectorMethods}; use selectors::visitor::SelectorVisitor; use smallvec::SmallVec; use std::borrow::Borrow; +use std::cell::Cell; use std::clone::Clone; use stylist::SelectorMap; @@ -194,6 +195,7 @@ struct ElementWrapper<'a, E> where E: TElement, { element: E, + cached_snapshot: Cell>, snapshot_map: &'a SnapshotMap, } @@ -202,20 +204,28 @@ impl<'a, E> ElementWrapper<'a, E> { /// Trivially constructs an `ElementWrapper`. fn new(el: E, snapshot_map: &'a SnapshotMap) -> Self { - ElementWrapper { element: el, snapshot_map: snapshot_map } + ElementWrapper { + element: el, + cached_snapshot: Cell::new(None), + snapshot_map: snapshot_map, + } } /// Gets the snapshot associated with this element, if any. - /// - /// TODO(emilio): If the hash table lookup happens to appear in profiles, we - /// can cache the snapshot in a RefCell<&'a Snapshot>. fn snapshot(&self) -> Option<&'a Snapshot> { if !self.element.has_snapshot() { - return None + return None; + } + + if let Some(s) = self.cached_snapshot.get() { + return Some(s); } let snapshot = self.snapshot_map.get(&self.element); debug_assert!(snapshot.is_some(), "has_snapshot lied!"); + + self.cached_snapshot.set(snapshot); + snapshot } } From e6fc0aae14757004447fd8aef8f7e32d6ec8ce0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 8 May 2017 23:28:07 +0200 Subject: [PATCH 4/4] Update bindgen. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MozReview-Commit-ID: Dyyvo6YMTcL Signed-off-by: Emilio Cobos Álvarez --- Cargo.lock | 12 +- components/style/Cargo.toml | 2 +- components/style/gecko/generated/bindings.rs | 15 +- .../style/gecko/generated/structs_debug.rs | 1269 +++++++++++------ .../style/gecko/generated/structs_release.rs | 1256 ++++++++++------ .../style/gecko_bindings/sugar/refptr.rs | 1 + 6 files changed, 1734 insertions(+), 821 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 13c3ea29af0..521ac636562 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -164,13 +164,13 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aster 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", "cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clang-sys 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clang-sys 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.20.5 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -357,7 +357,7 @@ dependencies = [ [[package]] name = "clang-sys" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2784,7 +2784,7 @@ version = "0.0.1" dependencies = [ "app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bindgen 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bindgen 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)", "bit-vec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3383,7 +3383,7 @@ dependencies = [ "checksum base64 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "979d348dc50dfcd050a87df408ec61f01a0a27ee9b4ebdc6085baba8275b2c7f" "checksum binary-space-partition 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "df65281d9b2b5c332f5bfbd9bb5e5f2e62f627c259cf9dc9cd10fecb758be33d" "checksum bincode 1.0.0-alpha6 (registry+https://github.com/rust-lang/crates.io-index)" = "fb0cdeac1c5d567fdb487ae5853c024e4acf1ea85ba6a6552fe084e0805fea5d" -"checksum bindgen 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)" = "21a1de90068c1e58dd31b71daab70e1a1e54212b43cc6c4714e7c8acefb28992" +"checksum bindgen 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ccaf8958532d7e570e905266ee2dc1094c3e5c3c3cfc2c299368747a30a5e654" "checksum bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9bf6104718e80d7b26a68fdbacff3481cfc05df670821affc7e9cbc1884400c" "checksum bit-vec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5b97c2c8e8bbb4251754f559df8af22fb264853c7d009084a576cdf12565089d" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" @@ -3402,7 +3402,7 @@ dependencies = [ "checksum cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "393a5f0088efbe41f9d1fcd062f24e83c278608420e62109feb2c8abee07de7d" "checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c" "checksum cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "86765cb42c2a2c497e142af72517c1b4d7ae5bb2f25dfa77a5c69642f2342d89" -"checksum clang-sys 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f4f6aa0c4cfa318cd4d2940afae57e48b94d44d3aced603501df24f3c2a414f" +"checksum clang-sys 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "33d47b0ea88a529a570490efbb79403e416e89864ce8a96bf23e2a0f23d7e9eb" "checksum clap 2.20.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7db281b0520e97fbd15cd615dcd8f8bcad0c26f5f7d5effe705f090f39e9a758" "checksum cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "d18d68987ed4c516dcc3e7913659bfa4076f5182eea4a7e0038bb060953e76ac" "checksum cocoa 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a5d0bcb4d345adf9b4ada6c5bb3e2b87c8150b79c46f3f26446de5f4d48de4b" diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index ee15f1f42ac..f82b1c0ca34 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -65,6 +65,6 @@ kernel32-sys = "0.2" [build-dependencies] lazy_static = "0.2" log = "0.3" -bindgen = { version = "0.24", optional = true } +bindgen = { version = "0.25", optional = true } regex = {version = "0.2", optional = true} walkdir = "1.0" diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs index eddc0d90c76..d97acff7f06 100644 --- a/components/style/gecko/generated/bindings.rs +++ b/components/style/gecko/generated/bindings.rs @@ -37,6 +37,7 @@ use gecko_bindings::structs::GeckoFontMetrics; use gecko_bindings::structs::Keyframe; use gecko_bindings::structs::ServoBundledURI; use gecko_bindings::structs::ServoElementSnapshot; +use gecko_bindings::structs::ServoElementSnapshotTable; use gecko_bindings::structs::SheetParsingMode; use gecko_bindings::structs::StyleBasicShape; use gecko_bindings::structs::StyleBasicShapeType; @@ -902,8 +903,9 @@ extern "C" { -> nsChangeHint; } extern "C" { - pub fn Gecko_CreateElementSnapshot(element: RawGeckoElementBorrowed) - -> ServoElementSnapshotOwned; + pub fn Gecko_GetElementSnapshot(table: *const ServoElementSnapshotTable, + element: RawGeckoElementBorrowed) + -> *const ServoElementSnapshot; } extern "C" { pub fn Gecko_DropElementSnapshot(snapshot: ServoElementSnapshotOwned); @@ -2171,10 +2173,6 @@ extern "C" { extern "C" { pub fn Servo_Shutdown(); } -extern "C" { - pub fn Servo_Element_GetSnapshot(element: RawGeckoElementBorrowed) - -> *mut ServoElementSnapshot; -} extern "C" { pub fn Servo_Element_GetStyleRuleList(element: RawGeckoElementBorrowed, rules: @@ -2215,12 +2213,15 @@ extern "C" { extern "C" { pub fn Servo_ResolveStyleLazily(element: RawGeckoElementBorrowed, pseudo_tag: *mut nsIAtom, + snapshots: + *const ServoElementSnapshotTable, set: RawServoStyleSetBorrowed) -> ServoComputedValuesStrong; } extern "C" { pub fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed, set: RawServoStyleSetBorrowed, + snapshots: *const ServoElementSnapshotTable, root_behavior: TraversalRootBehavior, restyle_behavior: TraversalRestyleBehavior) -> bool; @@ -2233,6 +2234,8 @@ extern "C" { RawServoStyleSetBorrowed, element: RawGeckoElementBorrowed, + snapshots: + *const ServoElementSnapshotTable, pseudo_tag: *mut nsIAtom) -> ServoComputedValuesStrong; diff --git a/components/style/gecko/generated/structs_debug.rs b/components/style/gecko/generated/structs_debug.rs index 25559af6bd1..01c643203cf 100644 --- a/components/style/gecko/generated/structs_debug.rs +++ b/components/style/gecko/generated/structs_debug.rs @@ -1163,6 +1163,8 @@ pub mod root { pub struct pair<_T1, _T2> { pub first: _T1, pub second: _T2, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_T1>>, + pub _phantom_1: ::std::marker::PhantomData<::std::cell::UnsafeCell<_T2>>, } pub type pair_first_type<_T1> = _T1; pub type pair_second_type<_T2> = _T2; @@ -1199,7 +1201,7 @@ pub mod root { pub struct atomic { } #[test] - fn __bindgen_test_layout_atomic_instantiation_89271() { + fn __bindgen_test_layout_atomic_instantiation_61574() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -1208,7 +1210,7 @@ pub mod root { ( u32 ) )); } #[test] - fn __bindgen_test_layout_atomic_instantiation_89279() { + fn __bindgen_test_layout_atomic_instantiation_61582() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -1269,8 +1271,9 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator; - pub type nsStringRepr_iterator = root::nsWritingIterator; + root::nsReadingIterator; + pub type nsStringRepr_iterator = + root::nsWritingIterator; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1360,9 +1363,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator<::std::os::raw::c_char>; + root::nsReadingIterator; pub type nsCStringRepr_iterator = - root::nsWritingIterator<::std::os::raw::c_char>; + root::nsWritingIterator; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -1437,11 +1440,6 @@ pub mod root { impl Clone for nsCStringRepr { fn clone(&self) -> Self { *self } } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct AllocPolicyBasedFreePolicy { - pub _address: u8, - } /** * LinkedList supports refcounted elements using this adapter class. Clients * using LinkedList> will get a data structure that holds a strong @@ -1622,6 +1620,7 @@ pub mod root { #[derive(Debug, Copy, Clone)] pub struct ReverseIterator { pub mCurrent: IteratorT, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub mod css { #[allow(unused_imports)] @@ -2180,11 +2179,13 @@ pub mod root { pub struct OwningNonNull { pub mPtr: root::RefPtr, pub mInited: bool, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct StaticRefPtr { pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } #[repr(C)] #[derive(Debug)] @@ -3043,6 +3044,8 @@ pub mod root { pub struct RecordEntry { pub mKey: KeyType, pub mValue: ValueType, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, + pub _phantom_1: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } } /** @@ -3724,9 +3727,20 @@ pub mod root { _unused: [u8; 0], } #[repr(C)] - #[derive(Debug, Copy, Clone)] + #[derive(Debug)] pub struct EventHandlerNonNull { - _unused: [u8; 0], + pub _base: root::mozilla::dom::CallbackFunction, + } + #[test] + fn bindgen_test_layout_EventHandlerNonNull() { + assert_eq!(::std::mem::size_of::() , + 56usize , concat ! ( + "Size of: " , stringify ! ( EventHandlerNonNull ) + )); + assert_eq! (::std::mem::align_of::() , + 8usize , concat ! ( + "Alignment of " , stringify ! ( + EventHandlerNonNull ) )); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -5799,6 +5813,7 @@ pub mod root { #[derive(Debug, Copy, Clone)] pub struct StaticAutoPtr { pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } /** * This struct represents a combined color from a numeric color and @@ -6841,7 +6856,7 @@ pub mod root { _unused: [u8; 0], } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_140748() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_118258() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -7980,7 +7995,7 @@ pub mod root { #[repr(C)] #[derive(Debug)] pub struct ImageCacheKey { - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mBlobSerial: [u64; 2usize], pub mOriginAttributes: root::mozilla::OriginAttributes, pub mControlledDocument: *mut ::std::os::raw::c_void, @@ -9054,8 +9069,10 @@ pub mod root { PropertyStyleAnimationValuePair ) , "::" , stringify ! ( mValue ) )); } + pub type ComputedKeyframeValues = + root::nsTArray; #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_178191() { + fn __bindgen_test_layout_DefaultDelete_instantiation_156305() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -9634,6 +9651,22 @@ pub mod root { _unused: [u8; 0], } #[repr(C)] + #[derive(Debug)] + pub struct ServoElementSnapshotTable { + pub _base: [u64; 6usize], + } + #[test] + fn bindgen_test_layout_ServoElementSnapshotTable() { + assert_eq!(::std::mem::size_of::() , + 48usize , concat ! ( + "Size of: " , stringify ! ( ServoElementSnapshotTable ) + )); + assert_eq! (::std::mem::align_of::() , + 8usize , concat ! ( + "Alignment of " , stringify ! ( + ServoElementSnapshotTable ) )); + } + #[repr(C)] #[derive(Debug, Copy)] pub struct LookAndFeel { pub _address: u8, @@ -10153,6 +10186,7 @@ pub mod root { #[derive(Debug, Copy, Clone)] pub struct UniquePtr { pub mPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } } #[repr(C)] @@ -11353,22 +11387,6 @@ pub mod root { "Alignment of " , stringify ! ( nsCString ) )); } #[repr(C)] - #[derive(Debug)] - pub struct nsDependentCSubstring { - pub _base: root::nsACString, - } - pub type nsDependentCSubstring_self_type = root::nsDependentCSubstring; - #[test] - fn bindgen_test_layout_nsDependentCSubstring() { - assert_eq!(::std::mem::size_of::() , 16usize , - concat ! ( - "Size of: " , stringify ! ( nsDependentCSubstring ) )); - assert_eq! (::std::mem::align_of::() , 8usize , - concat ! ( - "Alignment of " , stringify ! ( nsDependentCSubstring ) - )); - } - #[repr(C)] pub struct nsCStringComparator__bindgen_vtable(::std::os::raw::c_void); #[repr(C)] #[derive(Debug, Copy)] @@ -11493,7 +11511,7 @@ pub mod root { pub _address: u8, } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_54655() { + fn __bindgen_test_layout_nsCharTraits_instantiation_51418() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11504,7 +11522,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_54659() { + fn __bindgen_test_layout_nsCharTraits_instantiation_51422() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11523,6 +11541,7 @@ pub mod root { pub mStart: *mut CharT, pub mEnd: *mut CharT, pub mPosition: *mut CharT, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsReadingIterator_self_type = root::nsReadingIterator; @@ -11540,6 +11559,7 @@ pub mod root { pub mStart: *mut CharT, pub mEnd: *mut CharT, pub mPosition: *mut CharT, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsWritingIterator_self_type = root::nsWritingIterator; @@ -12051,6 +12071,7 @@ pub mod root { #[derive(Debug)] pub struct already_AddRefed { pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type already_AddRefed_MatchNullptr = ::std::option::Option; @@ -12058,6 +12079,7 @@ pub mod root { #[derive(Debug)] pub struct RefPtr { pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type RefPtr_element_type = T; #[repr(C)] @@ -12374,6 +12396,7 @@ pub mod root { #[derive(Debug, Copy, Clone)] pub struct Handle { pub ptr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type Handle_ElementType = T; #[repr(i32)] @@ -12398,6 +12421,7 @@ pub mod root { #[derive(Debug, Copy, Clone)] pub struct MutableHandle { pub ptr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type MutableHandle_ElementType = T; /** @@ -12418,26 +12442,6 @@ pub mod root { pub type MutableHandleValue = root::JS::MutableHandle; pub type RootedObject = [u64; 3usize]; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct DeletePolicy { - pub _address: u8, - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct FreePolicy { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_FreePolicy() { - assert_eq!(::std::mem::size_of::() , 1usize , concat ! - ( "Size of: " , stringify ! ( FreePolicy ) )); - assert_eq! (::std::mem::align_of::() , 1usize , concat - ! ( "Alignment of " , stringify ! ( FreePolicy ) )); - } - impl Clone for FreePolicy { - fn clone(&self) -> Self { *self } - } /** * A GC pointer, tagged with the trace kind. * @@ -12488,6 +12492,7 @@ pub mod root { #[derive(Debug)] pub struct Heap { pub ptr: T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type Heap_ElementType = T; pub mod dbg { @@ -12744,6 +12749,11 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } + pub type WarningReporter = + ::std::option::Option; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -12905,6 +12915,96 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } + /** + * Describes a single error or warning that occurs in the execution of script. + */ + #[repr(C)] + pub struct JSErrorReport { + pub _base: root::JSErrorBase, + pub linebuf_: *const u16, + pub linebufLength_: usize, + pub tokenOffset_: usize, + pub notes: root::mozilla::UniquePtr, + pub flags: ::std::os::raw::c_uint, + pub exnType: i16, + pub _bitfield_1: u8, + pub __bindgen_padding_0: u8, + } + #[test] + fn bindgen_test_layout_JSErrorReport() { + assert_eq!(::std::mem::size_of::() , 72usize , concat ! + ( "Size of: " , stringify ! ( JSErrorReport ) )); + assert_eq! (::std::mem::align_of::() , 8usize , concat + ! ( "Alignment of " , stringify ! ( JSErrorReport ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . linebuf_ as * + const _ as usize } , 32usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( linebuf_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . linebufLength_ as + * const _ as usize } , 40usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( linebufLength_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . tokenOffset_ as * + const _ as usize } , 48usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( tokenOffset_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . notes as * const + _ as usize } , 56usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( notes ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . flags as * const + _ as usize } , 64usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( flags ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . exnType as * + const _ as usize } , 68usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( exnType ) )); + } + impl JSErrorReport { + #[inline] + pub fn isMuted(&self) -> bool { + let mask = 1usize as u8; + let field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (field_val & mask) >> 0usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_isMuted(&mut self, val: bool) { + let mask = 1usize as u8; + let val = val as u8 as u8; + let mut field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + field_val &= !mask; + field_val |= (val << 0usize) & mask; + self._bitfield_1 = unsafe { ::std::mem::transmute(field_val) }; + } + #[inline] + pub fn ownsLinebuf_(&self) -> bool { + let mask = 2usize as u8; + let field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (field_val & mask) >> 1usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_ownsLinebuf_(&mut self, val: bool) { + let mask = 2usize as u8; + let val = val as u8 as u8; + let mut field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + field_val &= !mask; + field_val |= (val << 1usize) & mask; + self._bitfield_1 = unsafe { ::std::mem::transmute(field_val) }; + } + } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JSRuntime { @@ -12966,10 +13066,11 @@ pub mod root { #[derive(Debug)] pub struct nsCOMPtr { pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsCOMPtr_element_type = T; #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_92486() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_64863() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -12983,11 +13084,13 @@ pub mod root { #[derive(Debug)] pub struct nsAutoPtr { pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsAutoPtr_Ptr { pub mPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsAutoPtr_element_type = T; #[repr(C)] @@ -13279,6 +13382,7 @@ pub mod root { pub struct nsPtrHashKey { pub _base: root::PLDHashEntryHdr, pub mKey: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsPtrHashKey_KeyType = *mut T; pub type nsPtrHashKey_KeyTypePointer = *mut T; @@ -13362,6 +13466,7 @@ pub mod root { pub struct nsRefPtrHashKey { pub _base: root::PLDHashEntryHdr, pub mKey: root::RefPtr, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsRefPtrHashKey_KeyType = *mut T; pub type nsRefPtrHashKey_KeyTypePointer = *mut T; @@ -13478,6 +13583,8 @@ pub mod root { pub struct nsBaseHashtableET { pub _base: KeyClass, pub mData: DataType, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, + pub _phantom_1: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsBaseHashtableET_KeyType = [u8; 0usize]; pub type nsBaseHashtableET_KeyTypePointer = [u8; 0usize]; @@ -13711,7 +13818,7 @@ pub mod root { #[derive(Debug)] pub struct gfxFontFeatureValueSet_ValueList { pub name: ::nsstring::nsStringRepr, - pub featureSelectors: root::nsTArray<::std::os::raw::c_uint>, + pub featureSelectors: root::nsTArray, } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { @@ -13816,7 +13923,7 @@ pub mod root { pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { pub _base: root::PLDHashEntryHdr, pub mKey: root::gfxFontFeatureValueSet_FeatureValueHashKey, - pub mValues: root::nsTArray<::std::os::raw::c_uint>, + pub mValues: root::nsTArray, } pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = *const root::gfxFontFeatureValueSet_FeatureValueHashKey; @@ -13926,7 +14033,7 @@ pub mod root { pub alternateValues: root::nsTArray, pub featureValueLookup: root::RefPtr, pub fontFeatureSettings: root::nsTArray, - pub fontVariationSettings: root::nsTArray, + pub fontVariationSettings: root::nsTArray, pub languageOverride: u32, } #[test] @@ -14055,6 +14162,7 @@ pub mod root { pub struct nsStyleAutoArray { pub mFirstElement: T, pub mOtherElements: root::nsTArray, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -16319,7 +16427,7 @@ pub mod root { */ pub mFrameRequestCallbackCounter: i32, pub mStaticCloneCount: u32, - pub mBlockedTrackingNodes: root::nsTArray>, + pub mBlockedTrackingNodes: root::nsTArray, pub mWindow: *mut root::nsPIDOMWindowInner, pub mCachedEncoder: root::nsCOMPtr, pub mFrameRequestCallbacks: root::nsTArray, @@ -17765,6 +17873,401 @@ pub mod root { ! ( "Size of: " , stringify ! ( nsPresContext ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( nsPresContext ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mRefCnt as * + const _ as usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mRefCnt ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . _mOwningThread as + * const _ as usize } , 24usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( _mOwningThread ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mType as * const + _ as usize } , 32usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mType ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mShell as * const + _ as usize } , 40usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mShell ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mDocument as * + const _ as usize } , 48usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mDocument ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mDeviceContext as + * const _ as usize } , 56usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mDeviceContext ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mEventManager as + * const _ as usize } , 64usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mEventManager ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mRefreshDriver as + * const _ as usize } , 72usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mRefreshDriver ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mEffectCompositor + as * const _ as usize } , 80usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mEffectCompositor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mTransitionManager as * const _ as usize } , 88usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTransitionManager ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mAnimationManager + as * const _ as usize } , 96usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mAnimationManager ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mRestyleManager + as * const _ as usize } , 104usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mRestyleManager ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mCounterStyleManager as * const _ as usize } , 112usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mCounterStyleManager ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mMedium as * + const _ as usize } , 120usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mMedium ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mMediaEmulated as + * const _ as usize } , 128usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mMediaEmulated ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mLinkHandler as * + const _ as usize } , 136usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLinkHandler ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mLanguage as * + const _ as usize } , 144usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLanguage ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mInflationDisabledForShrinkWrap as * const _ as usize } , + 152usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mInflationDisabledForShrinkWrap ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mContainer as * + const _ as usize } , 160usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mContainer ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mBaseMinFontSize + as * const _ as usize } , 168usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mBaseMinFontSize ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mSystemFontScale + as * const _ as usize } , 172usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mSystemFontScale ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mTextZoom as * + const _ as usize } , 176usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTextZoom ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mEffectiveTextZoom as * const _ as usize } , 180usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mEffectiveTextZoom ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFullZoom as * + const _ as usize } , 184usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFullZoom ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mOverrideDPPX as + * const _ as usize } , 188usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mOverrideDPPX ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mLastFontInflationScreenSize as * const _ as usize } , + 192usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLastFontInflationScreenSize ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mCurAppUnitsPerDevPixel as * const _ as usize } , 208usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mCurAppUnitsPerDevPixel ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mAutoQualityMinFontSizePixelsPref as * const _ as usize } + , 212usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mAutoQualityMinFontSizePixelsPref ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mTheme as * const + _ as usize } , 216usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTheme ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mLangService as * + const _ as usize } , 224usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLangService ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mPrintSettings as + * const _ as usize } , 232usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mPrintSettings ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mPrefChangedTimer + as * const _ as usize } , 240usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mPrefChangedTimer ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mBidiEngine as * + const _ as usize } , 248usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mBidiEngine ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mPropertyTable as + * const _ as usize } , 256usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mPropertyTable ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mTransactions as + * const _ as usize } , 320usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTransactions ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mTextPerf as * + const _ as usize } , 400usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTextPerf ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mMissingFonts as + * const _ as usize } , 408usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mMissingFonts ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mVisibleArea as * + const _ as usize } , 416usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mVisibleArea ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mPageSize as * + const _ as usize } , 432usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mPageSize ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mPageScale as * + const _ as usize } , 440usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mPageScale ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mPPScale as * + const _ as usize } , 444usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mPPScale ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mDefaultColor as + * const _ as usize } , 448usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mDefaultColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mBackgroundColor + as * const _ as usize } , 452usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mBackgroundColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mLinkColor as * + const _ as usize } , 456usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLinkColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mActiveLinkColor + as * const _ as usize } , 460usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mActiveLinkColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mVisitedLinkColor + as * const _ as usize } , 464usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mVisitedLinkColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mFocusBackgroundColor as * const _ as usize } , 468usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFocusBackgroundColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFocusTextColor + as * const _ as usize } , 472usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFocusTextColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mBodyTextColor as + * const _ as usize } , 476usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mBodyTextColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mViewportStyleScrollbar as * const _ as usize } , 480usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mViewportStyleScrollbar ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFocusRingWidth + as * const _ as usize } , 544usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFocusRingWidth ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mExistThrottledUpdates as * const _ as usize } , 545usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mExistThrottledUpdates ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mImageAnimationMode as * const _ as usize } , 546usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mImageAnimationMode ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mImageAnimationModePref as * const _ as usize } , 548usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mImageAnimationModePref ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mLangGroupFontPrefs as * const _ as usize } , 552usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLangGroupFontPrefs ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mBorderWidthTable + as * const _ as usize } , 1192usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mBorderWidthTable ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mInterruptChecksToSkip as * const _ as usize } , 1204usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mInterruptChecksToSkip ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mElementsRestyled + as * const _ as usize } , 1208usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mElementsRestyled ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mFramesConstructed as * const _ as usize } , 1216usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFramesConstructed ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFramesReflowed + as * const _ as usize } , 1224usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFramesReflowed ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mReflowStartTime + as * const _ as usize } , 1232usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mReflowStartTime ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mFirstNonBlankPaintTime as * const _ as usize } , + 1240usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFirstNonBlankPaintTime ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFirstClickTime + as * const _ as usize } , 1248usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFirstClickTime ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFirstKeyTime as + * const _ as usize } , 1256usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFirstKeyTime ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mFirstMouseMoveTime as * const _ as usize } , 1264usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFirstMouseMoveTime ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFirstScrollTime + as * const _ as usize } , 1272usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFirstScrollTime ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mInteractionTimeEnabled as * const _ as usize } , + 1280usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mInteractionTimeEnabled ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mLastStyleUpdateForAllAnimations as * const _ as usize } , + 1288usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLastStyleUpdateForAllAnimations ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mTelemetryScrollLastY as * const _ as usize } , 1296usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTelemetryScrollLastY ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mTelemetryScrollMaxY as * const _ as usize } , 1300usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTelemetryScrollMaxY ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mTelemetryScrollTotalY as * const _ as usize } , 1304usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTelemetryScrollTotalY ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mRestyleLoggingEnabled as * const _ as usize } , 1314usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mRestyleLoggingEnabled ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mInitialized as * + const _ as usize } , 1315usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mInitialized ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mLayoutPhaseCount + as * const _ as usize } , 1316usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLayoutPhaseCount ) )); } impl nsPresContext { #[inline] @@ -19204,7 +19707,7 @@ pub mod root { pub _base_1: root::nsWrapperCache, pub mRefCnt: root::nsCycleCollectingAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, - pub mContent: root::nsCOMPtr, + pub mContent: root::nsCOMPtr, /** * Cache of Attrs. */ @@ -20237,66 +20740,57 @@ pub mod root { pub struct nsDOMMutationObserver { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_SHARED_RESTYLE_BIT_1; - pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_SHARED_RESTYLE_BIT_2; - pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_SHARED_RESTYLE_BIT_1; - pub const NODE_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_SHARED_RESTYLE_BIT_2; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_84 = - _bindgen_ty_84::NODE_TYPE_SPECIFIC_BITS_OFFSET; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_HAS_LISTENERMANAGER; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_HAS_PROPERTIES; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_IS_ANONYMOUS_ROOT; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_IS_NATIVE_ANONYMOUS_ROOT; + pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_FORCE_XBL_BINDINGS; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_MAY_BE_IN_BINDING_MNGR; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_IS_EDITABLE; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_IS_NATIVE_ANONYMOUS; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_IS_IN_SHADOW_TREE; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_HAS_EMPTY_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_HAS_SLOW_SELECTOR; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_HAS_EDGE_CHILD_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_ALL_SELECTOR_FLAGS; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_NEEDS_FRAME; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_DESCENDANTS_NEED_FRAMES; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_HAS_ACCESSKEY; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_HAS_DIRECTION_RTL; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_HAS_DIRECTION_LTR; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_ALL_DIRECTION_FLAGS; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_CHROME_ONLY_ACCESS; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_77 = + _bindgen_ty_77::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_84 { + pub enum _bindgen_ty_77 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -20320,9 +20814,7 @@ pub mod root { NODE_ALL_DIRECTION_FLAGS = 1572864, NODE_CHROME_ONLY_ACCESS = 2097152, NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS = 4194304, - NODE_SHARED_RESTYLE_BIT_1 = 8388608, - NODE_SHARED_RESTYLE_BIT_2 = 16777216, - NODE_TYPE_SPECIFIC_BITS_OFFSET = 23, + NODE_TYPE_SPECIFIC_BITS_OFFSET = 21, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -20627,6 +21119,28 @@ pub mod root { pub type nsRefPtrHashtable_KeyType = [u8; 0usize]; pub type nsRefPtrHashtable_UserDataType = *mut PtrType; pub type nsRefPtrHashtable_base_type = root::nsBaseHashtable; + /** + * templated hashtable class maps keys to C++ object pointers. + * See nsBaseHashtable for complete declaration. + * @param KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h + * for a complete specification. + * @param Class the class-type being wrapped + * @see nsInterfaceHashtable, nsClassHashtable + */ + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsClassHashtable { + } + pub type nsClassHashtable_KeyType = [u8; 0usize]; + pub type nsClassHashtable_UserDataType = *mut T; + pub type nsClassHashtable_base_type = root::nsBaseHashtable; + #[repr(C)] + #[derive(Debug)] + pub struct nsClassHashtable_EntryPtr { + pub mEntry: *mut root::nsClassHashtable_base_type, + pub mTable: *mut root::nsClassHashtable_base_type, + pub mTableGeneration: u32, + } #[repr(C)] pub struct nsPresArena { pub mFreeLists: [u64; 6usize], @@ -21669,6 +22183,7 @@ pub mod root { #[derive(Debug)] pub struct nsRevocableEventPtr { pub mEvent: root::RefPtr, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } #[repr(C)] #[derive(Debug)] @@ -25407,6 +25922,7 @@ pub mod root { pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, pub mRawPtr: *mut T, pub mStrict: bool, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsMainThreadPtrHolder_HasThreadSafeRefCnt = root::mozilla::TrueType; @@ -25414,6 +25930,7 @@ pub mod root { #[derive(Debug)] pub struct nsMainThreadPtrHandle { pub mPtr: root::RefPtr>, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } #[repr(C)] #[derive(Debug)] @@ -25426,7 +25943,7 @@ pub mod root { pub mRefCnt: root::nsAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, pub mBehaviour: root::mozilla::UniquePtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr, pub mLoadFlags: root::nsLoadFlags, @@ -26658,7 +27175,7 @@ pub mod root { pub _mOwningThread: root::nsAutoOwningThread, pub mLoader: *mut root::imgLoader, pub mRequest: root::nsCOMPtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mCurrentURI: root::nsCOMPtr, pub mLoadingPrincipal: root::nsCOMPtr, pub mPrincipal: root::nsCOMPtr, @@ -26685,8 +27202,8 @@ pub mod root { pub mImageErrorCode: root::nsresult, pub mBoostCategoriesRequested: u32, pub mMutex: root::mozilla::Mutex, - pub mProgressTracker: root::RefPtr, - pub mImage: root::RefPtr, + pub mProgressTracker: root::RefPtr, + pub mImage: root::RefPtr, pub _bitfield_1: u8, pub __bindgen_padding_0: [u8; 7usize], } @@ -28116,7 +28633,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_174211() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_152353() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30171,6 +30688,7 @@ pub mod root { #[derive(Debug)] pub struct nsTArray { pub mBuffer: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } /** *
@@ -30214,7 +30732,7 @@ pub mod root { pub type RawGeckoURLExtraData = root::mozilla::URLExtraData; pub type RawGeckoKeyframeList = root::nsTArray; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray>; + root::nsTArray; pub type RawGeckoAnimationValueList = root::nsTArray; pub type RawGeckoStyleAnimationList = @@ -30577,6 +31095,59 @@ pub mod root { pub struct nsAttrValueOrString { _unused: [u8; 0], } + pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: + root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_79 + = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: + root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; + pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_PENDING_RESTYLE_FLAGS; + pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; + pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_ALL_RESTYLE_FLAGS; + pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_HAS_SCROLLGRAB; + pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + #[repr(u32)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum _bindgen_ty_79 { + ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, + ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, + ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, + ELEMENT_SHARED_RESTYLE_BIT_4 = 67108864, + ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR = 134217728, + ELEMENT_PENDING_RESTYLE_FLAGS = 41943040, + ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS = 83886080, + ELEMENT_ALL_RESTYLE_FLAGS = 260046848, + ELEMENT_HAS_SCROLLGRAB = 268435456, + ELEMENT_TYPE_SPECIFIC_BITS_OFFSET = 27, + } #[repr(C)] #[derive(Debug, Copy)] pub struct LookAndFeelInt { @@ -31286,7 +31857,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_194544() { + fn __bindgen_test_layout_IntegralConstant_instantiation_179987() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31295,7 +31866,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_194548() { + fn __bindgen_test_layout_IntegralConstant_instantiation_179991() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31304,69 +31875,59 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_195375() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_195379() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_195452() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsReadingIterator_instantiation_180823() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); + root::nsReadingIterator + ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_195456() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsWritingIterator_instantiation_180826() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); - } - #[test] - fn __bindgen_test_layout__bindgen_ty_id_201275_instantiation_201272() { - assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( u8 ) - )); - assert_eq!(::std::mem::align_of::() , 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( u8 + root::nsWritingIterator ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_201308_instantiation_201305() { - assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( u8 ) - )); - assert_eq!(::std::mem::align_of::() , 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( u8 + fn __bindgen_test_layout_nsReadingIterator_instantiation_180898() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsReadingIterator ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_201576() { + fn __bindgen_test_layout_nsWritingIterator_instantiation_180901() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_185301() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31377,7 +31938,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_202535() { + fn __bindgen_test_layout_Handle_instantiation_186152() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31388,7 +31949,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_202551() { + fn __bindgen_test_layout_Handle_instantiation_186168() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31399,7 +31960,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_202561() { + fn __bindgen_test_layout_MutableHandle_instantiation_186178() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31410,7 +31971,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_202577() { + fn __bindgen_test_layout_MutableHandle_instantiation_186194() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31421,7 +31982,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_202580() { + fn __bindgen_test_layout_Rooted_instantiation_186197() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31432,18 +31993,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_202917() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_204967() { + fn __bindgen_test_layout_nsTArray_instantiation_188744() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31454,7 +32004,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_204971() { + fn __bindgen_test_layout_nsTArray_instantiation_188748() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31465,18 +32015,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_204984() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_188761() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_instantiation_206109() { + fn __bindgen_test_layout_TenuredHeap_instantiation_189923() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31487,7 +32037,7 @@ pub mod root { root::JS::TenuredHeap ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_206199() { + fn __bindgen_test_layout_Heap_instantiation_190013() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31498,7 +32048,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_206314() { + fn __bindgen_test_layout_Heap_instantiation_190128() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31509,7 +32059,7 @@ pub mod root { root::JS::Heap ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_206321() { + fn __bindgen_test_layout_TErrorResult_instantiation_190135() { assert_eq!(::std::mem::size_of::() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31520,7 +32070,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_206337() { + fn __bindgen_test_layout_TErrorResult_instantiation_190151() { assert_eq!(::std::mem::size_of::() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31531,7 +32081,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_206342() { + fn __bindgen_test_layout_already_AddRefed_instantiation_190156() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31542,7 +32092,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_206394() { + fn __bindgen_test_layout_already_AddRefed_instantiation_190208() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31553,7 +32103,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_206877() { + fn __bindgen_test_layout_RefPtr_instantiation_190691() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31564,7 +32114,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_207223() { + fn __bindgen_test_layout_already_AddRefed_instantiation_191037() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31575,7 +32125,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_207468() { + fn __bindgen_test_layout_already_AddRefed_instantiation_191282() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31586,7 +32136,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_207615() { + fn __bindgen_test_layout_already_AddRefed_instantiation_191429() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31597,18 +32147,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_211734() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_211732() { + fn __bindgen_test_layout_UniquePtr_instantiation_195533() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31619,7 +32158,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_iterator_instantiation_211767() { + fn __bindgen_test_layout_iterator_instantiation_195565() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31630,7 +32169,7 @@ pub mod root { root::std::iterator ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_212323() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_196134() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31641,7 +32180,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_213921() { + fn __bindgen_test_layout_nsTArray_instantiation_197727() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31654,7 +32193,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_LinkedList_instantiation_214197() { + fn __bindgen_test_layout_LinkedList_instantiation_198000() { assert_eq!(::std::mem::size_of::() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31665,7 +32204,7 @@ pub mod root { root::mozilla::LinkedList ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_214213() { + fn __bindgen_test_layout_RefPtr_instantiation_198016() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31676,7 +32215,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_214212() { + fn __bindgen_test_layout_nsTArray_instantiation_198015() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31689,7 +32228,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_214242() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_198045() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31700,7 +32239,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_214241() { + fn __bindgen_test_layout_nsTArray_instantiation_198044() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31711,7 +32250,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_214287() { + fn __bindgen_test_layout_already_AddRefed_instantiation_198090() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31722,7 +32261,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_214452() { + fn __bindgen_test_layout_already_AddRefed_instantiation_198255() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31733,7 +32272,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_214779() { + fn __bindgen_test_layout_already_AddRefed_instantiation_198582() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31744,7 +32283,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_214872() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_198675() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31755,29 +32294,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_214909() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_215167() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_215165() { + fn __bindgen_test_layout_UniquePtr_instantiation_198966() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31788,7 +32305,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_215715() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_199513() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31801,7 +32318,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_215714() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_199512() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31812,7 +32329,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_215831() { + fn __bindgen_test_layout_nsTArray_instantiation_199628() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31823,7 +32340,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_215882() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_199679() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -31832,7 +32349,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_216055() { + fn __bindgen_test_layout_nsTArray_instantiation_199857() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31843,18 +32360,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_216171() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_216334() { + fn __bindgen_test_layout_nsTArray_instantiation_200133() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31865,7 +32371,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_217121() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_200920() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31876,7 +32382,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_217173() { + fn __bindgen_test_layout_already_AddRefed_instantiation_201012() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31887,7 +32393,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_217354() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_201193() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31898,7 +32404,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_217861() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_201716() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31909,7 +32415,7 @@ pub mod root { root::nsPtrHashKey<::std::os::raw::c_void> ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_217869() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_201724() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31920,7 +32426,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_217984() { + fn __bindgen_test_layout_OwningNonNull_instantiation_201839() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31931,7 +32437,18 @@ pub mod root { root::mozilla::OwningNonNull ) )); } #[test] - fn __bindgen_test_layout_PointTyped_instantiation_219063() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_201966() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_PointTyped_instantiation_202918() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31942,7 +32459,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_219068() { + fn __bindgen_test_layout_IntPointTyped_instantiation_202921() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31953,7 +32470,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_219071() { + fn __bindgen_test_layout_SizeTyped_instantiation_202924() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31964,7 +32481,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_219079() { + fn __bindgen_test_layout_RectTyped_instantiation_202930() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31975,7 +32492,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_219111() { + fn __bindgen_test_layout_IntPointTyped_instantiation_202954() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31986,7 +32503,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_219119() { + fn __bindgen_test_layout_IntSizeTyped_instantiation_202960() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31997,7 +32514,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_219127() { + fn __bindgen_test_layout_IntRectTyped_instantiation_202966() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32008,7 +32525,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_219294() { + fn __bindgen_test_layout_MarginTyped_instantiation_203095() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32019,7 +32536,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_219329() { + fn __bindgen_test_layout_RectTyped_instantiation_203122() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32030,7 +32547,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_219334() { + fn __bindgen_test_layout_IntRectTyped_instantiation_203125() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32041,7 +32558,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_219380() { + fn __bindgen_test_layout_ScaleFactor_instantiation_203161() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -32050,7 +32567,7 @@ pub mod root { u32 ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_219480() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_203261() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32061,7 +32578,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_219488() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_203269() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32072,7 +32589,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_219532() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_203313() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32083,7 +32600,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_220162() { + fn __bindgen_test_layout_nsTArray_instantiation_203943() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32096,7 +32613,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_220178() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_203959() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32107,7 +32624,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_223376() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_207212() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32118,7 +32635,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_224012() { + fn __bindgen_test_layout_already_AddRefed_instantiation_207845() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32129,18 +32646,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_224103() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_224107() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_207937() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32151,7 +32657,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_225304() { + fn __bindgen_test_layout_already_AddRefed_instantiation_209134() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32162,7 +32668,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_225590() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_209480() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32173,7 +32679,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_227165() { + fn __bindgen_test_layout_nsTArray_instantiation_211045() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32184,7 +32690,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_227177() { + fn __bindgen_test_layout_RefPtr_instantiation_211057() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32197,7 +32703,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_227176() { + fn __bindgen_test_layout_nsTArray_instantiation_211056() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32210,7 +32716,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_227210() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_211090() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32221,7 +32727,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_227307() { + fn __bindgen_test_layout_UniquePtr_instantiation_211187() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32232,7 +32738,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_229255() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_213125() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32243,7 +32749,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_229294() { + fn __bindgen_test_layout_OwningNonNull_instantiation_213164() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32256,7 +32762,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_229315() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_213185() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32267,7 +32773,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_229346() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_213216() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32278,18 +32784,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_229891() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_229905() { + fn __bindgen_test_layout_already_AddRefed_instantiation_213772() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32300,7 +32795,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_229909() { + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_213776() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32311,7 +32806,7 @@ pub mod root { root::nsMainThreadPtrHolder ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_229983() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_213850() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32322,18 +32817,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_230270() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_230268() { + fn __bindgen_test_layout_UniquePtr_instantiation_214135() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32344,18 +32828,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_230276() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_230274() { + fn __bindgen_test_layout_UniquePtr_instantiation_214138() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32366,7 +32839,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_230619() { + fn __bindgen_test_layout_Maybe_instantiation_214480() { assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32377,7 +32850,7 @@ pub mod root { [u64; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_230786() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_214646() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32386,7 +32859,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_230937() { + fn __bindgen_test_layout_Maybe_instantiation_214797() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32397,7 +32870,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_230952() { + fn __bindgen_test_layout_already_AddRefed_instantiation_214812() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32408,18 +32881,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_230960() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_230958() { + fn __bindgen_test_layout_UniquePtr_instantiation_214818() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32430,18 +32892,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_230999() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_pair_instantiation_231150() { + fn __bindgen_test_layout_pair_instantiation_215004() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32452,7 +32903,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_231149() { + fn __bindgen_test_layout_nsTArray_instantiation_215003() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -32467,7 +32918,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_232140() { + fn __bindgen_test_layout_RefPtr_instantiation_215983() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32478,7 +32929,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_233862() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_219971() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32489,7 +32940,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_234454() { + fn __bindgen_test_layout_nsTArray_instantiation_220563() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32502,7 +32953,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_234636() { + fn __bindgen_test_layout_Maybe_instantiation_220743() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32513,7 +32964,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_234811() { + fn __bindgen_test_layout_RefPtr_instantiation_220918() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32524,7 +32975,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_235055() { + fn __bindgen_test_layout_Sequence_instantiation_221162() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32533,7 +32984,29 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_236461() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_221461() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + } + #[test] + fn __bindgen_test_layout_nsClassHashtable_instantiation_221460() { + assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 6usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 6usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 6usize] ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_222579() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32544,7 +33017,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_236499() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_222617() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/components/style/gecko/generated/structs_release.rs b/components/style/gecko/generated/structs_release.rs index 75d11e072b4..c17a61e810c 100644 --- a/components/style/gecko/generated/structs_release.rs +++ b/components/style/gecko/generated/structs_release.rs @@ -1163,6 +1163,8 @@ pub mod root { pub struct pair<_T1, _T2> { pub first: _T1, pub second: _T2, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_T1>>, + pub _phantom_1: ::std::marker::PhantomData<::std::cell::UnsafeCell<_T2>>, } pub type pair_first_type<_T1> = _T1; pub type pair_second_type<_T2> = _T2; @@ -1199,7 +1201,7 @@ pub mod root { pub struct atomic { } #[test] - fn __bindgen_test_layout_atomic_instantiation_88059() { + fn __bindgen_test_layout_atomic_instantiation_60419() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -1208,7 +1210,7 @@ pub mod root { ( u32 ) )); } #[test] - fn __bindgen_test_layout_atomic_instantiation_88067() { + fn __bindgen_test_layout_atomic_instantiation_60427() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -1263,8 +1265,9 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator; - pub type nsStringRepr_iterator = root::nsWritingIterator; + root::nsReadingIterator; + pub type nsStringRepr_iterator = + root::nsWritingIterator; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1354,9 +1357,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator<::std::os::raw::c_char>; + root::nsReadingIterator; pub type nsCStringRepr_iterator = - root::nsWritingIterator<::std::os::raw::c_char>; + root::nsWritingIterator; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -1546,6 +1549,7 @@ pub mod root { #[derive(Debug, Copy, Clone)] pub struct ReverseIterator { pub mCurrent: IteratorT, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub mod css { #[allow(unused_imports)] @@ -2080,11 +2084,13 @@ pub mod root { #[derive(Debug)] pub struct OwningNonNull { pub mPtr: root::RefPtr, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct StaticRefPtr { pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } #[repr(C)] #[derive(Debug)] @@ -2943,6 +2949,8 @@ pub mod root { pub struct RecordEntry { pub mKey: KeyType, pub mValue: ValueType, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, + pub _phantom_1: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } } /** @@ -3617,9 +3625,20 @@ pub mod root { _unused: [u8; 0], } #[repr(C)] - #[derive(Debug, Copy, Clone)] + #[derive(Debug)] pub struct EventHandlerNonNull { - _unused: [u8; 0], + pub _base: root::mozilla::dom::CallbackFunction, + } + #[test] + fn bindgen_test_layout_EventHandlerNonNull() { + assert_eq!(::std::mem::size_of::() , + 48usize , concat ! ( + "Size of: " , stringify ! ( EventHandlerNonNull ) + )); + assert_eq! (::std::mem::align_of::() , + 8usize , concat ! ( + "Alignment of " , stringify ! ( + EventHandlerNonNull ) )); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -5662,6 +5681,7 @@ pub mod root { #[derive(Debug, Copy, Clone)] pub struct StaticAutoPtr { pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } /** * This struct represents a combined color from a numeric color and @@ -6295,24 +6315,6 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] - pub struct MallocAllocPolicy { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_MallocAllocPolicy() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of: " , stringify ! ( MallocAllocPolicy ) )); - assert_eq! (::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of " , stringify ! ( MallocAllocPolicy ) - )); - } - impl Clone for MallocAllocPolicy { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] pub struct ErrorResult { pub _bindgen_opaque_blob: [u64; 2usize], } @@ -6706,7 +6708,7 @@ pub mod root { _unused: [u8; 0], } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_137486() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_114917() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -7735,7 +7737,7 @@ pub mod root { #[repr(C)] #[derive(Debug)] pub struct ImageCacheKey { - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mBlobSerial: [u64; 2usize], pub mOriginAttributes: root::mozilla::OriginAttributes, pub mControlledDocument: *mut ::std::os::raw::c_void, @@ -8809,8 +8811,10 @@ pub mod root { PropertyStyleAnimationValuePair ) , "::" , stringify ! ( mValue ) )); } + pub type ComputedKeyframeValues = + root::nsTArray; #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_174434() { + fn __bindgen_test_layout_DefaultDelete_instantiation_152619() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -9389,6 +9393,22 @@ pub mod root { _unused: [u8; 0], } #[repr(C)] + #[derive(Debug)] + pub struct ServoElementSnapshotTable { + pub _base: [u64; 5usize], + } + #[test] + fn bindgen_test_layout_ServoElementSnapshotTable() { + assert_eq!(::std::mem::size_of::() , + 40usize , concat ! ( + "Size of: " , stringify ! ( ServoElementSnapshotTable ) + )); + assert_eq! (::std::mem::align_of::() , + 8usize , concat ! ( + "Alignment of " , stringify ! ( + ServoElementSnapshotTable ) )); + } + #[repr(C)] #[derive(Debug, Copy)] pub struct LookAndFeel { pub _address: u8, @@ -9908,6 +9928,7 @@ pub mod root { #[derive(Debug, Copy, Clone)] pub struct UniquePtr { pub mPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } } pub type va_list = root::__builtin_va_list; @@ -10886,22 +10907,6 @@ pub mod root { "Alignment of " , stringify ! ( nsCString ) )); } #[repr(C)] - #[derive(Debug)] - pub struct nsDependentCSubstring { - pub _base: root::nsACString, - } - pub type nsDependentCSubstring_self_type = root::nsDependentCSubstring; - #[test] - fn bindgen_test_layout_nsDependentCSubstring() { - assert_eq!(::std::mem::size_of::() , 16usize , - concat ! ( - "Size of: " , stringify ! ( nsDependentCSubstring ) )); - assert_eq! (::std::mem::align_of::() , 8usize , - concat ! ( - "Alignment of " , stringify ! ( nsDependentCSubstring ) - )); - } - #[repr(C)] pub struct nsCStringComparator__bindgen_vtable(::std::os::raw::c_void); #[repr(C)] #[derive(Debug, Copy)] @@ -11026,7 +11031,7 @@ pub mod root { pub _address: u8, } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_53351() { + fn __bindgen_test_layout_nsCharTraits_instantiation_50153() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11037,7 +11042,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_53355() { + fn __bindgen_test_layout_nsCharTraits_instantiation_50157() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11056,6 +11061,7 @@ pub mod root { pub mStart: *mut CharT, pub mEnd: *mut CharT, pub mPosition: *mut CharT, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsReadingIterator_self_type = root::nsReadingIterator; @@ -11073,6 +11079,7 @@ pub mod root { pub mStart: *mut CharT, pub mEnd: *mut CharT, pub mPosition: *mut CharT, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsWritingIterator_self_type = root::nsWritingIterator; @@ -11554,6 +11561,7 @@ pub mod root { #[derive(Debug)] pub struct already_AddRefed { pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type already_AddRefed_MatchNullptr = ::std::option::Option; @@ -11579,6 +11587,7 @@ pub mod root { #[derive(Debug)] pub struct RefPtr { pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type RefPtr_element_type = T; #[repr(C)] @@ -11895,6 +11904,7 @@ pub mod root { #[derive(Debug, Copy, Clone)] pub struct Handle { pub ptr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type Handle_ElementType = T; #[repr(i32)] @@ -11919,6 +11929,7 @@ pub mod root { #[derive(Debug, Copy, Clone)] pub struct MutableHandle { pub ptr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type MutableHandle_ElementType = T; /** @@ -11939,26 +11950,6 @@ pub mod root { pub type MutableHandleValue = root::JS::MutableHandle; pub type RootedObject = [u64; 3usize]; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct DeletePolicy { - pub _address: u8, - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct FreePolicy { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_FreePolicy() { - assert_eq!(::std::mem::size_of::() , 1usize , concat ! - ( "Size of: " , stringify ! ( FreePolicy ) )); - assert_eq! (::std::mem::align_of::() , 1usize , concat - ! ( "Alignment of " , stringify ! ( FreePolicy ) )); - } - impl Clone for FreePolicy { - fn clone(&self) -> Self { *self } - } /** * A GC pointer, tagged with the trace kind. * @@ -12009,6 +12000,7 @@ pub mod root { #[derive(Debug)] pub struct Heap { pub ptr: T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type Heap_ElementType = T; pub mod dbg { @@ -12265,6 +12257,11 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } + pub type WarningReporter = + ::std::option::Option; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -12418,6 +12415,96 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } + /** + * Describes a single error or warning that occurs in the execution of script. + */ + #[repr(C)] + pub struct JSErrorReport { + pub _base: root::JSErrorBase, + pub linebuf_: *const u16, + pub linebufLength_: usize, + pub tokenOffset_: usize, + pub notes: root::mozilla::UniquePtr, + pub flags: ::std::os::raw::c_uint, + pub exnType: i16, + pub _bitfield_1: u8, + pub __bindgen_padding_0: u8, + } + #[test] + fn bindgen_test_layout_JSErrorReport() { + assert_eq!(::std::mem::size_of::() , 72usize , concat ! + ( "Size of: " , stringify ! ( JSErrorReport ) )); + assert_eq! (::std::mem::align_of::() , 8usize , concat + ! ( "Alignment of " , stringify ! ( JSErrorReport ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . linebuf_ as * + const _ as usize } , 32usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( linebuf_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . linebufLength_ as + * const _ as usize } , 40usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( linebufLength_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . tokenOffset_ as * + const _ as usize } , 48usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( tokenOffset_ ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . notes as * const + _ as usize } , 56usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( notes ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . flags as * const + _ as usize } , 64usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( flags ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const JSErrorReport ) ) . exnType as * + const _ as usize } , 68usize , concat ! ( + "Alignment of field: " , stringify ! ( JSErrorReport ) , + "::" , stringify ! ( exnType ) )); + } + impl JSErrorReport { + #[inline] + pub fn isMuted(&self) -> bool { + let mask = 1usize as u8; + let field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (field_val & mask) >> 0usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_isMuted(&mut self, val: bool) { + let mask = 1usize as u8; + let val = val as u8 as u8; + let mut field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + field_val &= !mask; + field_val |= (val << 0usize) & mask; + self._bitfield_1 = unsafe { ::std::mem::transmute(field_val) }; + } + #[inline] + pub fn ownsLinebuf_(&self) -> bool { + let mask = 2usize as u8; + let field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (field_val & mask) >> 1usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_ownsLinebuf_(&mut self, val: bool) { + let mask = 2usize as u8; + let val = val as u8 as u8; + let mut field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + field_val &= !mask; + field_val |= (val << 1usize) & mask; + self._bitfield_1 = unsafe { ::std::mem::transmute(field_val) }; + } + } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JSRuntime { @@ -12667,7 +12754,7 @@ pub mod root { } pub type nsCOMPtr_element_type = T; #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_91145() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_63583() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -12681,11 +12768,13 @@ pub mod root { #[derive(Debug)] pub struct nsAutoPtr { pub mRawPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsAutoPtr_Ptr { pub mPtr: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsAutoPtr_element_type = T; #[repr(C)] @@ -12946,6 +13035,7 @@ pub mod root { pub struct nsPtrHashKey { pub _base: root::PLDHashEntryHdr, pub mKey: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsPtrHashKey_KeyType = *mut T; pub type nsPtrHashKey_KeyTypePointer = *mut T; @@ -13029,6 +13119,7 @@ pub mod root { pub struct nsRefPtrHashKey { pub _base: root::PLDHashEntryHdr, pub mKey: root::RefPtr, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsRefPtrHashKey_KeyType = *mut T; pub type nsRefPtrHashKey_KeyTypePointer = *mut T; @@ -13145,6 +13236,8 @@ pub mod root { pub struct nsBaseHashtableET { pub _base: KeyClass, pub mData: DataType, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, + pub _phantom_1: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsBaseHashtableET_KeyType = [u8; 0usize]; pub type nsBaseHashtableET_KeyTypePointer = [u8; 0usize]; @@ -13377,7 +13470,7 @@ pub mod root { #[derive(Debug)] pub struct gfxFontFeatureValueSet_ValueList { pub name: ::nsstring::nsStringRepr, - pub featureSelectors: root::nsTArray<::std::os::raw::c_uint>, + pub featureSelectors: root::nsTArray, } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { @@ -13482,7 +13575,7 @@ pub mod root { pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { pub _base: root::PLDHashEntryHdr, pub mKey: root::gfxFontFeatureValueSet_FeatureValueHashKey, - pub mValues: root::nsTArray<::std::os::raw::c_uint>, + pub mValues: root::nsTArray, } pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = *const root::gfxFontFeatureValueSet_FeatureValueHashKey; @@ -13585,7 +13678,7 @@ pub mod root { pub alternateValues: root::nsTArray, pub featureValueLookup: root::RefPtr, pub fontFeatureSettings: root::nsTArray, - pub fontVariationSettings: root::nsTArray, + pub fontVariationSettings: root::nsTArray, pub languageOverride: u32, } #[test] @@ -13714,6 +13807,7 @@ pub mod root { pub struct nsStyleAutoArray { pub mFirstElement: T, pub mOtherElements: root::nsTArray, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -15951,7 +16045,7 @@ pub mod root { */ pub mFrameRequestCallbackCounter: i32, pub mStaticCloneCount: u32, - pub mBlockedTrackingNodes: root::nsTArray, + pub mBlockedTrackingNodes: root::nsTArray, pub mWindow: *mut root::nsPIDOMWindowInner, pub mCachedEncoder: root::nsCOMPtr, pub mFrameRequestCallbacks: root::nsTArray, @@ -17394,6 +17488,380 @@ pub mod root { ! ( "Size of: " , stringify ! ( nsPresContext ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( nsPresContext ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mRefCnt as * + const _ as usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mRefCnt ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mType as * const + _ as usize } , 24usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mType ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mShell as * const + _ as usize } , 32usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mShell ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mDocument as * + const _ as usize } , 40usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mDocument ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mDeviceContext as + * const _ as usize } , 48usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mDeviceContext ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mEventManager as + * const _ as usize } , 56usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mEventManager ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mRefreshDriver as + * const _ as usize } , 64usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mRefreshDriver ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mEffectCompositor + as * const _ as usize } , 72usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mEffectCompositor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mTransitionManager as * const _ as usize } , 80usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTransitionManager ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mAnimationManager + as * const _ as usize } , 88usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mAnimationManager ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mRestyleManager + as * const _ as usize } , 96usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mRestyleManager ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mCounterStyleManager as * const _ as usize } , 104usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mCounterStyleManager ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mMedium as * + const _ as usize } , 112usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mMedium ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mMediaEmulated as + * const _ as usize } , 120usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mMediaEmulated ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mLinkHandler as * + const _ as usize } , 128usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLinkHandler ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mLanguage as * + const _ as usize } , 136usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLanguage ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mInflationDisabledForShrinkWrap as * const _ as usize } , + 144usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mInflationDisabledForShrinkWrap ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mContainer as * + const _ as usize } , 152usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mContainer ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mBaseMinFontSize + as * const _ as usize } , 160usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mBaseMinFontSize ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mSystemFontScale + as * const _ as usize } , 164usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mSystemFontScale ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mTextZoom as * + const _ as usize } , 168usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTextZoom ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mEffectiveTextZoom as * const _ as usize } , 172usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mEffectiveTextZoom ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFullZoom as * + const _ as usize } , 176usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFullZoom ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mOverrideDPPX as + * const _ as usize } , 180usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mOverrideDPPX ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mLastFontInflationScreenSize as * const _ as usize } , + 184usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLastFontInflationScreenSize ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mCurAppUnitsPerDevPixel as * const _ as usize } , 200usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mCurAppUnitsPerDevPixel ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mAutoQualityMinFontSizePixelsPref as * const _ as usize } + , 204usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mAutoQualityMinFontSizePixelsPref ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mTheme as * const + _ as usize } , 208usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTheme ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mLangService as * + const _ as usize } , 216usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLangService ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mPrintSettings as + * const _ as usize } , 224usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mPrintSettings ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mPrefChangedTimer + as * const _ as usize } , 232usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mPrefChangedTimer ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mBidiEngine as * + const _ as usize } , 240usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mBidiEngine ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mPropertyTable as + * const _ as usize } , 248usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mPropertyTable ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mTransactions as + * const _ as usize } , 304usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTransactions ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mTextPerf as * + const _ as usize } , 384usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTextPerf ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mMissingFonts as + * const _ as usize } , 392usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mMissingFonts ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mVisibleArea as * + const _ as usize } , 400usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mVisibleArea ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mPageSize as * + const _ as usize } , 416usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mPageSize ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mPageScale as * + const _ as usize } , 424usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mPageScale ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mPPScale as * + const _ as usize } , 428usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mPPScale ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mDefaultColor as + * const _ as usize } , 432usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mDefaultColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mBackgroundColor + as * const _ as usize } , 436usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mBackgroundColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mLinkColor as * + const _ as usize } , 440usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLinkColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mActiveLinkColor + as * const _ as usize } , 444usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mActiveLinkColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mVisitedLinkColor + as * const _ as usize } , 448usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mVisitedLinkColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mFocusBackgroundColor as * const _ as usize } , 452usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFocusBackgroundColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFocusTextColor + as * const _ as usize } , 456usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFocusTextColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mBodyTextColor as + * const _ as usize } , 460usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mBodyTextColor ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mViewportStyleScrollbar as * const _ as usize } , 464usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mViewportStyleScrollbar ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFocusRingWidth + as * const _ as usize } , 528usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFocusRingWidth ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mExistThrottledUpdates as * const _ as usize } , 529usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mExistThrottledUpdates ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mImageAnimationMode as * const _ as usize } , 530usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mImageAnimationMode ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mImageAnimationModePref as * const _ as usize } , 532usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mImageAnimationModePref ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mLangGroupFontPrefs as * const _ as usize } , 536usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLangGroupFontPrefs ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mBorderWidthTable + as * const _ as usize } , 1176usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mBorderWidthTable ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mInterruptChecksToSkip as * const _ as usize } , 1188usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mInterruptChecksToSkip ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mElementsRestyled + as * const _ as usize } , 1192usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mElementsRestyled ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mFramesConstructed as * const _ as usize } , 1200usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFramesConstructed ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFramesReflowed + as * const _ as usize } , 1208usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFramesReflowed ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mReflowStartTime + as * const _ as usize } , 1216usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mReflowStartTime ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mFirstNonBlankPaintTime as * const _ as usize } , + 1224usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFirstNonBlankPaintTime ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFirstClickTime + as * const _ as usize } , 1232usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFirstClickTime ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFirstKeyTime as + * const _ as usize } , 1240usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFirstKeyTime ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mFirstMouseMoveTime as * const _ as usize } , 1248usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFirstMouseMoveTime ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . mFirstScrollTime + as * const _ as usize } , 1256usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mFirstScrollTime ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mInteractionTimeEnabled as * const _ as usize } , + 1264usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mInteractionTimeEnabled ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mLastStyleUpdateForAllAnimations as * const _ as usize } , + 1272usize , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mLastStyleUpdateForAllAnimations ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mTelemetryScrollLastY as * const _ as usize } , 1280usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTelemetryScrollLastY ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mTelemetryScrollMaxY as * const _ as usize } , 1284usize , + concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTelemetryScrollMaxY ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsPresContext ) ) . + mTelemetryScrollTotalY as * const _ as usize } , 1288usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsPresContext ) , + "::" , stringify ! ( mTelemetryScrollTotalY ) )); } impl nsPresContext { #[inline] @@ -19837,66 +20305,57 @@ pub mod root { pub struct nsDOMMutationObserver { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_SHARED_RESTYLE_BIT_1; - pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_SHARED_RESTYLE_BIT_2; - pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_SHARED_RESTYLE_BIT_1; - pub const NODE_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_SHARED_RESTYLE_BIT_2; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_82 = - _bindgen_ty_82::NODE_TYPE_SPECIFIC_BITS_OFFSET; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_LISTENERMANAGER; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_PROPERTIES; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_ANONYMOUS_ROOT; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_NATIVE_ANONYMOUS_ROOT; + pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_FORCE_XBL_BINDINGS; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_MAY_BE_IN_BINDING_MNGR; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_EDITABLE; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_NATIVE_ANONYMOUS; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_IN_SHADOW_TREE; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_EMPTY_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_SLOW_SELECTOR; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_EDGE_CHILD_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_ALL_SELECTOR_FLAGS; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_NEEDS_FRAME; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_DESCENDANTS_NEED_FRAMES; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_ACCESSKEY; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_DIRECTION_RTL; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_HAS_DIRECTION_LTR; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_ALL_DIRECTION_FLAGS; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_CHROME_ONLY_ACCESS; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_72 = + _bindgen_ty_72::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_82 { + pub enum _bindgen_ty_72 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -19920,9 +20379,7 @@ pub mod root { NODE_ALL_DIRECTION_FLAGS = 1572864, NODE_CHROME_ONLY_ACCESS = 2097152, NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS = 4194304, - NODE_SHARED_RESTYLE_BIT_1 = 8388608, - NODE_SHARED_RESTYLE_BIT_2 = 16777216, - NODE_TYPE_SPECIFIC_BITS_OFFSET = 23, + NODE_TYPE_SPECIFIC_BITS_OFFSET = 21, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -20228,6 +20685,26 @@ pub mod root { pub type nsRefPtrHashtable_KeyType = [u8; 0usize]; pub type nsRefPtrHashtable_UserDataType = *mut PtrType; pub type nsRefPtrHashtable_base_type = root::nsBaseHashtable; + /** + * templated hashtable class maps keys to C++ object pointers. + * See nsBaseHashtable for complete declaration. + * @param KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h + * for a complete specification. + * @param Class the class-type being wrapped + * @see nsInterfaceHashtable, nsClassHashtable + */ + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsClassHashtable { + } + pub type nsClassHashtable_KeyType = [u8; 0usize]; + pub type nsClassHashtable_UserDataType = *mut T; + pub type nsClassHashtable_base_type = root::nsBaseHashtable; + #[repr(C)] + #[derive(Debug)] + pub struct nsClassHashtable_EntryPtr { + pub mEntry: *mut root::nsClassHashtable_base_type, + } #[repr(C)] pub struct nsPresArena { pub mFreeLists: [u64; 5usize], @@ -21270,6 +21747,7 @@ pub mod root { #[derive(Debug)] pub struct nsRevocableEventPtr { pub mEvent: root::RefPtr, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } #[repr(C)] #[derive(Debug)] @@ -25008,6 +25486,7 @@ pub mod root { pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, pub mRawPtr: *mut T, pub mStrict: bool, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } pub type nsMainThreadPtrHolder_HasThreadSafeRefCnt = root::mozilla::TrueType; @@ -25015,6 +25494,7 @@ pub mod root { #[derive(Debug)] pub struct nsMainThreadPtrHandle { pub mPtr: root::RefPtr>, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } #[repr(C)] #[derive(Debug)] @@ -25026,7 +25506,7 @@ pub mod root { pub _base_4: root::nsITimedChannel, pub mRefCnt: root::nsAutoRefCnt, pub mBehaviour: root::mozilla::UniquePtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr, pub mLoadFlags: root::nsLoadFlags, @@ -26166,7 +26646,7 @@ pub mod root { pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, pub mLoader: *mut root::imgLoader, pub mRequest: root::nsCOMPtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mCurrentURI: root::nsCOMPtr, pub mLoadingPrincipal: root::nsCOMPtr, pub mPrincipal: root::nsCOMPtr, @@ -26193,8 +26673,8 @@ pub mod root { pub mImageErrorCode: root::nsresult, pub mBoostCategoriesRequested: u32, pub mMutex: root::mozilla::Mutex, - pub mProgressTracker: root::RefPtr, - pub mImage: root::RefPtr, + pub mProgressTracker: root::RefPtr, + pub mImage: root::RefPtr, pub _bitfield_1: u8, pub __bindgen_padding_0: [u8; 7usize], } @@ -27624,7 +28104,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_170454() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_148667() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -29679,6 +30159,7 @@ pub mod root { #[derive(Debug)] pub struct nsTArray { pub mBuffer: *mut T, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } /** *
@@ -29722,7 +30203,7 @@ pub mod root { pub type RawGeckoURLExtraData = root::mozilla::URLExtraData; pub type RawGeckoKeyframeList = root::nsTArray; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray>; + root::nsTArray; pub type RawGeckoAnimationValueList = root::nsTArray; pub type RawGeckoStyleAnimationList = @@ -30085,6 +30566,59 @@ pub mod root { pub struct nsAttrValueOrString { _unused: [u8; 0], } + pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: + root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_74 + = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: + root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; + pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_PENDING_RESTYLE_FLAGS; + pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; + pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_ALL_RESTYLE_FLAGS; + pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_HAS_SCROLLGRAB; + pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_74 = + _bindgen_ty_74::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + #[repr(u32)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum _bindgen_ty_74 { + ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, + ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, + ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, + ELEMENT_SHARED_RESTYLE_BIT_4 = 67108864, + ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR = 134217728, + ELEMENT_PENDING_RESTYLE_FLAGS = 41943040, + ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS = 83886080, + ELEMENT_ALL_RESTYLE_FLAGS = 260046848, + ELEMENT_HAS_SCROLLGRAB = 268435456, + ELEMENT_TYPE_SPECIFIC_BITS_OFFSET = 27, + } #[repr(C)] #[derive(Debug, Copy)] pub struct LookAndFeelInt { @@ -30794,7 +31328,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_190670() { + fn __bindgen_test_layout_IntegralConstant_instantiation_176182() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -30803,7 +31337,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_190674() { + fn __bindgen_test_layout_IntegralConstant_instantiation_176186() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -30812,69 +31346,59 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_191498() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_191502() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_191575() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsReadingIterator_instantiation_177015() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); + root::nsReadingIterator + ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_191579() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsWritingIterator_instantiation_177018() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); - } - #[test] - fn __bindgen_test_layout__bindgen_ty_id_197341_instantiation_197338() { - assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( u8 ) - )); - assert_eq!(::std::mem::align_of::() , 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( u8 + root::nsWritingIterator ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_197374_instantiation_197371() { - assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( u8 ) - )); - assert_eq!(::std::mem::align_of::() , 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( u8 + fn __bindgen_test_layout_nsReadingIterator_instantiation_177090() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsReadingIterator ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_197642() { + fn __bindgen_test_layout_nsWritingIterator_instantiation_177093() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_181440() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30885,7 +31409,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_198594() { + fn __bindgen_test_layout_Handle_instantiation_182284() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30896,7 +31420,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_198610() { + fn __bindgen_test_layout_Handle_instantiation_182300() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30907,7 +31431,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_198620() { + fn __bindgen_test_layout_MutableHandle_instantiation_182310() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30918,7 +31442,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_198636() { + fn __bindgen_test_layout_MutableHandle_instantiation_182326() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30929,7 +31453,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_198639() { + fn __bindgen_test_layout_Rooted_instantiation_182329() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30940,18 +31464,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_198976() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_200979() { + fn __bindgen_test_layout_nsTArray_instantiation_184832() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30962,7 +31475,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_200983() { + fn __bindgen_test_layout_nsTArray_instantiation_184836() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30973,18 +31486,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_200996() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_184849() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_instantiation_201855() { + fn __bindgen_test_layout_TenuredHeap_instantiation_185702() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30995,7 +31508,7 @@ pub mod root { root::JS::TenuredHeap ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_201945() { + fn __bindgen_test_layout_Heap_instantiation_185792() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31006,7 +31519,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_202055() { + fn __bindgen_test_layout_TErrorResult_instantiation_185902() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31017,7 +31530,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_202071() { + fn __bindgen_test_layout_TErrorResult_instantiation_185918() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31028,7 +31541,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_202076() { + fn __bindgen_test_layout_already_AddRefed_instantiation_185923() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31039,7 +31552,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_202128() { + fn __bindgen_test_layout_already_AddRefed_instantiation_185975() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31050,7 +31563,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_202602() { + fn __bindgen_test_layout_RefPtr_instantiation_186449() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31061,7 +31574,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_202948() { + fn __bindgen_test_layout_already_AddRefed_instantiation_186795() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31072,7 +31585,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_203191() { + fn __bindgen_test_layout_already_AddRefed_instantiation_187038() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31083,7 +31596,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_203338() { + fn __bindgen_test_layout_already_AddRefed_instantiation_187185() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31094,18 +31607,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_207426() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_207424() { + fn __bindgen_test_layout_UniquePtr_instantiation_191265() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31116,7 +31618,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_iterator_instantiation_207459() { + fn __bindgen_test_layout_iterator_instantiation_191297() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31127,7 +31629,7 @@ pub mod root { root::std::iterator ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_208013() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_191864() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31138,7 +31640,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_209271() { + fn __bindgen_test_layout_Heap_instantiation_193117() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31149,7 +31651,7 @@ pub mod root { root::JS::Heap ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_209613() { + fn __bindgen_test_layout_nsTArray_instantiation_193459() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31162,7 +31664,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_LinkedList_instantiation_209889() { + fn __bindgen_test_layout_LinkedList_instantiation_193732() { assert_eq!(::std::mem::size_of::() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31173,7 +31675,7 @@ pub mod root { root::mozilla::LinkedList ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_209905() { + fn __bindgen_test_layout_RefPtr_instantiation_193748() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31184,7 +31686,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_209904() { + fn __bindgen_test_layout_nsTArray_instantiation_193747() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31197,7 +31699,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_209934() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_193777() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31208,7 +31710,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_209933() { + fn __bindgen_test_layout_nsTArray_instantiation_193776() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31219,7 +31721,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_209979() { + fn __bindgen_test_layout_already_AddRefed_instantiation_193822() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31230,7 +31732,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_210144() { + fn __bindgen_test_layout_already_AddRefed_instantiation_193987() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31241,7 +31743,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_210471() { + fn __bindgen_test_layout_already_AddRefed_instantiation_194314() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31252,7 +31754,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_210564() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_194407() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31263,29 +31765,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_210601() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_210857() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_210855() { + fn __bindgen_test_layout_UniquePtr_instantiation_194696() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31296,7 +31776,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_211395() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_195233() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31309,7 +31789,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_211394() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_195232() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31320,7 +31800,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_211511() { + fn __bindgen_test_layout_nsTArray_instantiation_195348() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31331,7 +31811,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_211558() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_195395() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -31340,7 +31820,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_211728() { + fn __bindgen_test_layout_nsTArray_instantiation_195570() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31351,18 +31831,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_211844() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_212004() { + fn __bindgen_test_layout_nsTArray_instantiation_195843() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31373,7 +31842,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_212791() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_196630() { assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31384,7 +31853,7 @@ pub mod root { [u64; 28usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_212843() { + fn __bindgen_test_layout_already_AddRefed_instantiation_196722() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31395,7 +31864,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_213024() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_196903() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31406,7 +31875,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_213525() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_197420() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31417,7 +31886,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_213640() { + fn __bindgen_test_layout_OwningNonNull_instantiation_197535() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31428,7 +31897,18 @@ pub mod root { root::mozilla::OwningNonNull ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_213925() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_197662() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_instantiation_197822() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31439,7 +31919,7 @@ pub mod root { root::nsPtrHashKey<::std::os::raw::c_void> ) )); } #[test] - fn __bindgen_test_layout_PointTyped_instantiation_214716() { + fn __bindgen_test_layout_PointTyped_instantiation_198611() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31450,7 +31930,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_214721() { + fn __bindgen_test_layout_IntPointTyped_instantiation_198614() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31461,7 +31941,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_214724() { + fn __bindgen_test_layout_SizeTyped_instantiation_198617() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31472,7 +31952,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_214732() { + fn __bindgen_test_layout_RectTyped_instantiation_198623() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31483,7 +31963,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_214764() { + fn __bindgen_test_layout_IntPointTyped_instantiation_198647() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31494,7 +31974,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_214772() { + fn __bindgen_test_layout_IntSizeTyped_instantiation_198653() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31505,7 +31985,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_214780() { + fn __bindgen_test_layout_IntRectTyped_instantiation_198659() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31516,7 +31996,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_214947() { + fn __bindgen_test_layout_MarginTyped_instantiation_198788() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31527,7 +32007,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_214982() { + fn __bindgen_test_layout_RectTyped_instantiation_198815() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31538,7 +32018,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_214987() { + fn __bindgen_test_layout_IntRectTyped_instantiation_198818() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31549,7 +32029,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_215033() { + fn __bindgen_test_layout_ScaleFactor_instantiation_198854() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -31558,7 +32038,7 @@ pub mod root { u32 ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_215133() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_198954() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31569,7 +32049,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_215141() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_198962() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31580,7 +32060,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_215185() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_199006() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31591,7 +32071,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_215815() { + fn __bindgen_test_layout_nsTArray_instantiation_199636() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31604,7 +32084,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_215831() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_199652() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31615,7 +32095,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_218957() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_202900() { assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31626,7 +32106,7 @@ pub mod root { [u64; 28usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_219587() { + fn __bindgen_test_layout_already_AddRefed_instantiation_203527() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31637,18 +32117,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_219678() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_219682() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_203619() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31659,7 +32128,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_220879() { + fn __bindgen_test_layout_already_AddRefed_instantiation_204816() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31670,7 +32139,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_221165() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_205162() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31681,7 +32150,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_222740() { + fn __bindgen_test_layout_nsTArray_instantiation_206727() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31692,7 +32161,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_222752() { + fn __bindgen_test_layout_RefPtr_instantiation_206739() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31705,7 +32174,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_222751() { + fn __bindgen_test_layout_nsTArray_instantiation_206738() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31718,7 +32187,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_222785() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_206772() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31729,7 +32198,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_222882() { + fn __bindgen_test_layout_UniquePtr_instantiation_206869() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31740,7 +32209,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_224810() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_208787() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31751,7 +32220,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_224849() { + fn __bindgen_test_layout_OwningNonNull_instantiation_208826() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31764,7 +32233,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_224870() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_208847() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31775,7 +32244,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_224901() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_208878() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31786,18 +32255,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_225446() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_225460() { + fn __bindgen_test_layout_already_AddRefed_instantiation_209434() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31808,7 +32266,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_225464() { + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_209438() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31819,7 +32277,7 @@ pub mod root { root::nsMainThreadPtrHolder ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_225538() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_209512() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31830,18 +32288,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_225825() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_225823() { + fn __bindgen_test_layout_UniquePtr_instantiation_209797() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31852,18 +32299,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_225831() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_225829() { + fn __bindgen_test_layout_UniquePtr_instantiation_209800() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31874,7 +32310,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_226101() { + fn __bindgen_test_layout_Maybe_instantiation_210069() { assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31885,7 +32321,7 @@ pub mod root { [u64; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_226268() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_210235() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -31894,7 +32330,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_226416() { + fn __bindgen_test_layout_Maybe_instantiation_210383() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31905,7 +32341,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_226431() { + fn __bindgen_test_layout_already_AddRefed_instantiation_210398() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31916,18 +32352,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_226439() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_226437() { + fn __bindgen_test_layout_UniquePtr_instantiation_210404() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31938,18 +32363,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_226478() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_pair_instantiation_226629() { + fn __bindgen_test_layout_pair_instantiation_210590() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31960,7 +32374,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_226628() { + fn __bindgen_test_layout_nsTArray_instantiation_210589() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -31975,7 +32389,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_227619() { + fn __bindgen_test_layout_RefPtr_instantiation_211569() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31986,7 +32400,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_229341() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_215557() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31997,7 +32411,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_229933() { + fn __bindgen_test_layout_nsTArray_instantiation_216149() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32010,7 +32424,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_230109() { + fn __bindgen_test_layout_Maybe_instantiation_216323() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32021,7 +32435,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_230284() { + fn __bindgen_test_layout_RefPtr_instantiation_216498() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32032,7 +32446,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_230528() { + fn __bindgen_test_layout_Sequence_instantiation_216742() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32041,7 +32455,29 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_231932() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_217041() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + } + #[test] + fn __bindgen_test_layout_nsClassHashtable_instantiation_217040() { + assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 5usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 5usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 5usize] ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_218157() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32052,7 +32488,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_231968() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_218193() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/components/style/gecko_bindings/sugar/refptr.rs b/components/style/gecko_bindings/sugar/refptr.rs index 332fd3d857f..b90477e13a4 100644 --- a/components/style/gecko_bindings/sugar/refptr.rs +++ b/components/style/gecko_bindings/sugar/refptr.rs @@ -85,6 +85,7 @@ impl RefPtr { pub fn forget(self) -> structs::RefPtr { let ret = structs::RefPtr { mRawPtr: self.ptr, + _phantom_0: PhantomData, }; mem::forget(self); ret