mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #17794 - birtles:assign-properties-safely, r=hiro
Assign properties safely These are the Servo-side changes for [Bugzilla bug 1381389](https://bugzilla.mozilla.org/show_bug.cgi?id=1381389). <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17794) <!-- Reviewable:end -->
This commit is contained in:
commit
513e6b2979
5 changed files with 2587 additions and 2889 deletions
|
@ -124,6 +124,8 @@ cfg_if! {
|
||||||
pub static nsGkAtoms_allowmodals: *mut nsIAtom;
|
pub static nsGkAtoms_allowmodals: *mut nsIAtom;
|
||||||
#[link_name = "_ZN9nsGkAtoms20alloworientationlockE"]
|
#[link_name = "_ZN9nsGkAtoms20alloworientationlockE"]
|
||||||
pub static nsGkAtoms_alloworientationlock: *mut nsIAtom;
|
pub static nsGkAtoms_alloworientationlock: *mut nsIAtom;
|
||||||
|
#[link_name = "_ZN9nsGkAtoms19allowpaymentrequestE"]
|
||||||
|
pub static nsGkAtoms_allowpaymentrequest: *mut nsIAtom;
|
||||||
#[link_name = "_ZN9nsGkAtoms16allowpointerlockE"]
|
#[link_name = "_ZN9nsGkAtoms16allowpointerlockE"]
|
||||||
pub static nsGkAtoms_allowpointerlock: *mut nsIAtom;
|
pub static nsGkAtoms_allowpointerlock: *mut nsIAtom;
|
||||||
#[link_name = "_ZN9nsGkAtoms26allowpopupstoescapesandboxE"]
|
#[link_name = "_ZN9nsGkAtoms26allowpopupstoescapesandboxE"]
|
||||||
|
@ -4338,8 +4340,8 @@ cfg_if! {
|
||||||
pub static nsGkAtoms_scrollbar_thumb_proportional: *mut nsIAtom;
|
pub static nsGkAtoms_scrollbar_thumb_proportional: *mut nsIAtom;
|
||||||
#[link_name = "_ZN9nsGkAtoms18overlay_scrollbarsE"]
|
#[link_name = "_ZN9nsGkAtoms18overlay_scrollbarsE"]
|
||||||
pub static nsGkAtoms_overlay_scrollbars: *mut nsIAtom;
|
pub static nsGkAtoms_overlay_scrollbars: *mut nsIAtom;
|
||||||
#[link_name = "_ZN9nsGkAtoms28windows_accent_color_appliesE"]
|
#[link_name = "_ZN9nsGkAtoms32windows_accent_color_in_titlebarE"]
|
||||||
pub static nsGkAtoms_windows_accent_color_applies: *mut nsIAtom;
|
pub static nsGkAtoms_windows_accent_color_in_titlebar: *mut nsIAtom;
|
||||||
#[link_name = "_ZN9nsGkAtoms21windows_default_themeE"]
|
#[link_name = "_ZN9nsGkAtoms21windows_default_themeE"]
|
||||||
pub static nsGkAtoms_windows_default_theme: *mut nsIAtom;
|
pub static nsGkAtoms_windows_default_theme: *mut nsIAtom;
|
||||||
#[link_name = "_ZN9nsGkAtoms18mac_graphite_themeE"]
|
#[link_name = "_ZN9nsGkAtoms18mac_graphite_themeE"]
|
||||||
|
@ -4390,8 +4392,8 @@ cfg_if! {
|
||||||
pub static nsGkAtoms__moz_scrollbar_thumb_proportional: *mut nsIAtom;
|
pub static nsGkAtoms__moz_scrollbar_thumb_proportional: *mut nsIAtom;
|
||||||
#[link_name = "_ZN9nsGkAtoms23_moz_overlay_scrollbarsE"]
|
#[link_name = "_ZN9nsGkAtoms23_moz_overlay_scrollbarsE"]
|
||||||
pub static nsGkAtoms__moz_overlay_scrollbars: *mut nsIAtom;
|
pub static nsGkAtoms__moz_overlay_scrollbars: *mut nsIAtom;
|
||||||
#[link_name = "_ZN9nsGkAtoms33_moz_windows_accent_color_appliesE"]
|
#[link_name = "_ZN9nsGkAtoms37_moz_windows_accent_color_in_titlebarE"]
|
||||||
pub static nsGkAtoms__moz_windows_accent_color_applies: *mut nsIAtom;
|
pub static nsGkAtoms__moz_windows_accent_color_in_titlebar: *mut nsIAtom;
|
||||||
#[link_name = "_ZN9nsGkAtoms26_moz_windows_default_themeE"]
|
#[link_name = "_ZN9nsGkAtoms26_moz_windows_default_themeE"]
|
||||||
pub static nsGkAtoms__moz_windows_default_theme: *mut nsIAtom;
|
pub static nsGkAtoms__moz_windows_default_theme: *mut nsIAtom;
|
||||||
#[link_name = "_ZN9nsGkAtoms23_moz_mac_graphite_themeE"]
|
#[link_name = "_ZN9nsGkAtoms23_moz_mac_graphite_themeE"]
|
||||||
|
@ -5251,6 +5253,8 @@ cfg_if! {
|
||||||
pub static nsGkAtoms_allowmodals: *mut nsIAtom;
|
pub static nsGkAtoms_allowmodals: *mut nsIAtom;
|
||||||
#[link_name = "?alloworientationlock@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
#[link_name = "?alloworientationlock@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
||||||
pub static nsGkAtoms_alloworientationlock: *mut nsIAtom;
|
pub static nsGkAtoms_alloworientationlock: *mut nsIAtom;
|
||||||
|
#[link_name = "?allowpaymentrequest@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
||||||
|
pub static nsGkAtoms_allowpaymentrequest: *mut nsIAtom;
|
||||||
#[link_name = "?allowpointerlock@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
#[link_name = "?allowpointerlock@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
||||||
pub static nsGkAtoms_allowpointerlock: *mut nsIAtom;
|
pub static nsGkAtoms_allowpointerlock: *mut nsIAtom;
|
||||||
#[link_name = "?allowpopupstoescapesandbox@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
#[link_name = "?allowpopupstoescapesandbox@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
||||||
|
@ -9465,8 +9469,8 @@ cfg_if! {
|
||||||
pub static nsGkAtoms_scrollbar_thumb_proportional: *mut nsIAtom;
|
pub static nsGkAtoms_scrollbar_thumb_proportional: *mut nsIAtom;
|
||||||
#[link_name = "?overlay_scrollbars@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
#[link_name = "?overlay_scrollbars@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
||||||
pub static nsGkAtoms_overlay_scrollbars: *mut nsIAtom;
|
pub static nsGkAtoms_overlay_scrollbars: *mut nsIAtom;
|
||||||
#[link_name = "?windows_accent_color_applies@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
#[link_name = "?windows_accent_color_in_titlebar@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
||||||
pub static nsGkAtoms_windows_accent_color_applies: *mut nsIAtom;
|
pub static nsGkAtoms_windows_accent_color_in_titlebar: *mut nsIAtom;
|
||||||
#[link_name = "?windows_default_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
#[link_name = "?windows_default_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
||||||
pub static nsGkAtoms_windows_default_theme: *mut nsIAtom;
|
pub static nsGkAtoms_windows_default_theme: *mut nsIAtom;
|
||||||
#[link_name = "?mac_graphite_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
#[link_name = "?mac_graphite_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
||||||
|
@ -9517,8 +9521,8 @@ cfg_if! {
|
||||||
pub static nsGkAtoms__moz_scrollbar_thumb_proportional: *mut nsIAtom;
|
pub static nsGkAtoms__moz_scrollbar_thumb_proportional: *mut nsIAtom;
|
||||||
#[link_name = "?_moz_overlay_scrollbars@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
#[link_name = "?_moz_overlay_scrollbars@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
||||||
pub static nsGkAtoms__moz_overlay_scrollbars: *mut nsIAtom;
|
pub static nsGkAtoms__moz_overlay_scrollbars: *mut nsIAtom;
|
||||||
#[link_name = "?_moz_windows_accent_color_applies@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
#[link_name = "?_moz_windows_accent_color_in_titlebar@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
||||||
pub static nsGkAtoms__moz_windows_accent_color_applies: *mut nsIAtom;
|
pub static nsGkAtoms__moz_windows_accent_color_in_titlebar: *mut nsIAtom;
|
||||||
#[link_name = "?_moz_windows_default_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
#[link_name = "?_moz_windows_default_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
||||||
pub static nsGkAtoms__moz_windows_default_theme: *mut nsIAtom;
|
pub static nsGkAtoms__moz_windows_default_theme: *mut nsIAtom;
|
||||||
#[link_name = "?_moz_mac_graphite_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
#[link_name = "?_moz_mac_graphite_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"]
|
||||||
|
@ -10378,6 +10382,8 @@ cfg_if! {
|
||||||
pub static nsGkAtoms_allowmodals: *mut nsIAtom;
|
pub static nsGkAtoms_allowmodals: *mut nsIAtom;
|
||||||
#[link_name = "\x01?alloworientationlock@nsGkAtoms@@2PAVnsIAtom@@A"]
|
#[link_name = "\x01?alloworientationlock@nsGkAtoms@@2PAVnsIAtom@@A"]
|
||||||
pub static nsGkAtoms_alloworientationlock: *mut nsIAtom;
|
pub static nsGkAtoms_alloworientationlock: *mut nsIAtom;
|
||||||
|
#[link_name = "\x01?allowpaymentrequest@nsGkAtoms@@2PAVnsIAtom@@A"]
|
||||||
|
pub static nsGkAtoms_allowpaymentrequest: *mut nsIAtom;
|
||||||
#[link_name = "\x01?allowpointerlock@nsGkAtoms@@2PAVnsIAtom@@A"]
|
#[link_name = "\x01?allowpointerlock@nsGkAtoms@@2PAVnsIAtom@@A"]
|
||||||
pub static nsGkAtoms_allowpointerlock: *mut nsIAtom;
|
pub static nsGkAtoms_allowpointerlock: *mut nsIAtom;
|
||||||
#[link_name = "\x01?allowpopupstoescapesandbox@nsGkAtoms@@2PAVnsIAtom@@A"]
|
#[link_name = "\x01?allowpopupstoescapesandbox@nsGkAtoms@@2PAVnsIAtom@@A"]
|
||||||
|
@ -14592,8 +14598,8 @@ cfg_if! {
|
||||||
pub static nsGkAtoms_scrollbar_thumb_proportional: *mut nsIAtom;
|
pub static nsGkAtoms_scrollbar_thumb_proportional: *mut nsIAtom;
|
||||||
#[link_name = "\x01?overlay_scrollbars@nsGkAtoms@@2PAVnsIAtom@@A"]
|
#[link_name = "\x01?overlay_scrollbars@nsGkAtoms@@2PAVnsIAtom@@A"]
|
||||||
pub static nsGkAtoms_overlay_scrollbars: *mut nsIAtom;
|
pub static nsGkAtoms_overlay_scrollbars: *mut nsIAtom;
|
||||||
#[link_name = "\x01?windows_accent_color_applies@nsGkAtoms@@2PAVnsIAtom@@A"]
|
#[link_name = "\x01?windows_accent_color_in_titlebar@nsGkAtoms@@2PAVnsIAtom@@A"]
|
||||||
pub static nsGkAtoms_windows_accent_color_applies: *mut nsIAtom;
|
pub static nsGkAtoms_windows_accent_color_in_titlebar: *mut nsIAtom;
|
||||||
#[link_name = "\x01?windows_default_theme@nsGkAtoms@@2PAVnsIAtom@@A"]
|
#[link_name = "\x01?windows_default_theme@nsGkAtoms@@2PAVnsIAtom@@A"]
|
||||||
pub static nsGkAtoms_windows_default_theme: *mut nsIAtom;
|
pub static nsGkAtoms_windows_default_theme: *mut nsIAtom;
|
||||||
#[link_name = "\x01?mac_graphite_theme@nsGkAtoms@@2PAVnsIAtom@@A"]
|
#[link_name = "\x01?mac_graphite_theme@nsGkAtoms@@2PAVnsIAtom@@A"]
|
||||||
|
@ -14644,8 +14650,8 @@ cfg_if! {
|
||||||
pub static nsGkAtoms__moz_scrollbar_thumb_proportional: *mut nsIAtom;
|
pub static nsGkAtoms__moz_scrollbar_thumb_proportional: *mut nsIAtom;
|
||||||
#[link_name = "\x01?_moz_overlay_scrollbars@nsGkAtoms@@2PAVnsIAtom@@A"]
|
#[link_name = "\x01?_moz_overlay_scrollbars@nsGkAtoms@@2PAVnsIAtom@@A"]
|
||||||
pub static nsGkAtoms__moz_overlay_scrollbars: *mut nsIAtom;
|
pub static nsGkAtoms__moz_overlay_scrollbars: *mut nsIAtom;
|
||||||
#[link_name = "\x01?_moz_windows_accent_color_applies@nsGkAtoms@@2PAVnsIAtom@@A"]
|
#[link_name = "\x01?_moz_windows_accent_color_in_titlebar@nsGkAtoms@@2PAVnsIAtom@@A"]
|
||||||
pub static nsGkAtoms__moz_windows_accent_color_applies: *mut nsIAtom;
|
pub static nsGkAtoms__moz_windows_accent_color_in_titlebar: *mut nsIAtom;
|
||||||
#[link_name = "\x01?_moz_windows_default_theme@nsGkAtoms@@2PAVnsIAtom@@A"]
|
#[link_name = "\x01?_moz_windows_default_theme@nsGkAtoms@@2PAVnsIAtom@@A"]
|
||||||
pub static nsGkAtoms__moz_windows_default_theme: *mut nsIAtom;
|
pub static nsGkAtoms__moz_windows_default_theme: *mut nsIAtom;
|
||||||
#[link_name = "\x01?_moz_mac_graphite_theme@nsGkAtoms@@2PAVnsIAtom@@A"]
|
#[link_name = "\x01?_moz_mac_graphite_theme@nsGkAtoms@@2PAVnsIAtom@@A"]
|
||||||
|
@ -15508,6 +15514,8 @@ macro_rules! atom {
|
||||||
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_allowmodals as *mut _) } };
|
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_allowmodals as *mut _) } };
|
||||||
("allow-orientation-lock") =>
|
("allow-orientation-lock") =>
|
||||||
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_alloworientationlock as *mut _) } };
|
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_alloworientationlock as *mut _) } };
|
||||||
|
("allowpaymentrequest") =>
|
||||||
|
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_allowpaymentrequest as *mut _) } };
|
||||||
("allow-pointer-lock") =>
|
("allow-pointer-lock") =>
|
||||||
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_allowpointerlock as *mut _) } };
|
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_allowpointerlock as *mut _) } };
|
||||||
("allow-popups-to-escape-sandbox") =>
|
("allow-popups-to-escape-sandbox") =>
|
||||||
|
@ -19722,8 +19730,8 @@ macro_rules! atom {
|
||||||
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_scrollbar_thumb_proportional as *mut _) } };
|
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_scrollbar_thumb_proportional as *mut _) } };
|
||||||
("overlay-scrollbars") =>
|
("overlay-scrollbars") =>
|
||||||
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_overlay_scrollbars as *mut _) } };
|
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_overlay_scrollbars as *mut _) } };
|
||||||
("windows-accent-color-applies") =>
|
("windows-accent-color-in-titlebar") =>
|
||||||
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_windows_accent_color_applies as *mut _) } };
|
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_windows_accent_color_in_titlebar as *mut _) } };
|
||||||
("windows-default-theme") =>
|
("windows-default-theme") =>
|
||||||
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_windows_default_theme as *mut _) } };
|
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_windows_default_theme as *mut _) } };
|
||||||
("mac-graphite-theme") =>
|
("mac-graphite-theme") =>
|
||||||
|
@ -19774,8 +19782,8 @@ macro_rules! atom {
|
||||||
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__moz_scrollbar_thumb_proportional as *mut _) } };
|
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__moz_scrollbar_thumb_proportional as *mut _) } };
|
||||||
("-moz-overlay-scrollbars") =>
|
("-moz-overlay-scrollbars") =>
|
||||||
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__moz_overlay_scrollbars as *mut _) } };
|
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__moz_overlay_scrollbars as *mut _) } };
|
||||||
("-moz-windows-accent-color-applies") =>
|
("-moz-windows-accent-color-in-titlebar") =>
|
||||||
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__moz_windows_accent_color_applies as *mut _) } };
|
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__moz_windows_accent_color_in_titlebar as *mut _) } };
|
||||||
("-moz-windows-default-theme") =>
|
("-moz-windows-default-theme") =>
|
||||||
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__moz_windows_default_theme as *mut _) } };
|
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms__moz_windows_default_theme as *mut _) } };
|
||||||
("-moz-mac-graphite-theme") =>
|
("-moz-mac-graphite-theme") =>
|
||||||
|
|
|
@ -25,6 +25,7 @@ use gecko_bindings::structs::RawGeckoCSSPropertyIDList;
|
||||||
use gecko_bindings::structs::RawGeckoDocument;
|
use gecko_bindings::structs::RawGeckoDocument;
|
||||||
use gecko_bindings::structs::RawGeckoElement;
|
use gecko_bindings::structs::RawGeckoElement;
|
||||||
use gecko_bindings::structs::RawGeckoKeyframeList;
|
use gecko_bindings::structs::RawGeckoKeyframeList;
|
||||||
|
use gecko_bindings::structs::RawGeckoPropertyValuePairList;
|
||||||
use gecko_bindings::structs::RawGeckoComputedKeyframeValuesList;
|
use gecko_bindings::structs::RawGeckoComputedKeyframeValuesList;
|
||||||
use gecko_bindings::structs::RawGeckoFontFaceRuleList;
|
use gecko_bindings::structs::RawGeckoFontFaceRuleList;
|
||||||
use gecko_bindings::structs::RawGeckoNode;
|
use gecko_bindings::structs::RawGeckoNode;
|
||||||
|
@ -54,6 +55,7 @@ use gecko_bindings::structs::FontSizePrefs;
|
||||||
use gecko_bindings::structs::GeckoFontMetrics;
|
use gecko_bindings::structs::GeckoFontMetrics;
|
||||||
use gecko_bindings::structs::IterationCompositeOperation;
|
use gecko_bindings::structs::IterationCompositeOperation;
|
||||||
use gecko_bindings::structs::Keyframe;
|
use gecko_bindings::structs::Keyframe;
|
||||||
|
use gecko_bindings::structs::PropertyValuePair;
|
||||||
use gecko_bindings::structs::ServoBundledURI;
|
use gecko_bindings::structs::ServoBundledURI;
|
||||||
use gecko_bindings::structs::ServoElementSnapshot;
|
use gecko_bindings::structs::ServoElementSnapshot;
|
||||||
use gecko_bindings::structs::ServoElementSnapshotTable;
|
use gecko_bindings::structs::ServoElementSnapshotTable;
|
||||||
|
@ -297,6 +299,10 @@ pub type RawGeckoKeyframeListBorrowed<'a> = &'a RawGeckoKeyframeList;
|
||||||
pub type RawGeckoKeyframeListBorrowedOrNull<'a> = Option<&'a RawGeckoKeyframeList>;
|
pub type RawGeckoKeyframeListBorrowedOrNull<'a> = Option<&'a RawGeckoKeyframeList>;
|
||||||
pub type RawGeckoKeyframeListBorrowedMut<'a> = &'a mut RawGeckoKeyframeList;
|
pub type RawGeckoKeyframeListBorrowedMut<'a> = &'a mut RawGeckoKeyframeList;
|
||||||
pub type RawGeckoKeyframeListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoKeyframeList>;
|
pub type RawGeckoKeyframeListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoKeyframeList>;
|
||||||
|
pub type RawGeckoPropertyValuePairListBorrowed<'a> = &'a RawGeckoPropertyValuePairList;
|
||||||
|
pub type RawGeckoPropertyValuePairListBorrowedOrNull<'a> = Option<&'a RawGeckoPropertyValuePairList>;
|
||||||
|
pub type RawGeckoPropertyValuePairListBorrowedMut<'a> = &'a mut RawGeckoPropertyValuePairList;
|
||||||
|
pub type RawGeckoPropertyValuePairListBorrowedMutOrNull<'a> = Option<&'a mut RawGeckoPropertyValuePairList>;
|
||||||
pub type RawGeckoComputedKeyframeValuesListBorrowed<'a> = &'a RawGeckoComputedKeyframeValuesList;
|
pub type RawGeckoComputedKeyframeValuesListBorrowed<'a> = &'a RawGeckoComputedKeyframeValuesList;
|
||||||
pub type RawGeckoComputedKeyframeValuesListBorrowedOrNull<'a> = Option<&'a RawGeckoComputedKeyframeValuesList>;
|
pub type RawGeckoComputedKeyframeValuesListBorrowedOrNull<'a> = Option<&'a RawGeckoComputedKeyframeValuesList>;
|
||||||
pub type RawGeckoComputedKeyframeValuesListBorrowedMut<'a> = &'a mut RawGeckoComputedKeyframeValuesList;
|
pub type RawGeckoComputedKeyframeValuesListBorrowedMut<'a> = &'a mut RawGeckoComputedKeyframeValuesList;
|
||||||
|
@ -1164,6 +1170,12 @@ extern "C" {
|
||||||
*const nsTimingFunction)
|
*const nsTimingFunction)
|
||||||
-> *mut Keyframe;
|
-> *mut Keyframe;
|
||||||
}
|
}
|
||||||
|
extern "C" {
|
||||||
|
pub fn Gecko_AppendPropertyValuePair(aProperties:
|
||||||
|
RawGeckoPropertyValuePairListBorrowedMut,
|
||||||
|
aProperty: nsCSSPropertyID)
|
||||||
|
-> *mut PropertyValuePair;
|
||||||
|
}
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Gecko_ResetStyleCoord(unit: *mut nsStyleUnit,
|
pub fn Gecko_ResetStyleCoord(unit: *mut nsStyleUnit,
|
||||||
value: *mut nsStyleUnion);
|
value: *mut nsStyleUnion);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -45,6 +45,7 @@ use style::gecko_bindings::bindings::{RawServoSupportsRule, RawServoSupportsRule
|
||||||
use style::gecko_bindings::bindings::{ServoCssRulesBorrowed, ServoCssRulesStrong};
|
use style::gecko_bindings::bindings::{ServoCssRulesBorrowed, ServoCssRulesStrong};
|
||||||
use style::gecko_bindings::bindings::{nsACString, nsAString, nsCSSPropertyIDSetBorrowedMut};
|
use style::gecko_bindings::bindings::{nsACString, nsAString, nsCSSPropertyIDSetBorrowedMut};
|
||||||
use style::gecko_bindings::bindings::Gecko_AddPropertyToSet;
|
use style::gecko_bindings::bindings::Gecko_AddPropertyToSet;
|
||||||
|
use style::gecko_bindings::bindings::Gecko_AppendPropertyValuePair;
|
||||||
use style::gecko_bindings::bindings::Gecko_GetOrCreateFinalKeyframe;
|
use style::gecko_bindings::bindings::Gecko_GetOrCreateFinalKeyframe;
|
||||||
use style::gecko_bindings::bindings::Gecko_GetOrCreateInitialKeyframe;
|
use style::gecko_bindings::bindings::Gecko_GetOrCreateInitialKeyframe;
|
||||||
use style::gecko_bindings::bindings::Gecko_GetOrCreateKeyframeAtStart;
|
use style::gecko_bindings::bindings::Gecko_GetOrCreateKeyframeAtStart;
|
||||||
|
@ -3077,16 +3078,6 @@ pub extern "C" fn Servo_AssertTreeIsClean(root: RawGeckoElementBorrowed) {
|
||||||
assert_subtree_is_clean(root);
|
assert_subtree_is_clean(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn append_computed_property_value(keyframe: *mut structs::Keyframe,
|
|
||||||
property: &AnimatableLonghand) {
|
|
||||||
unsafe {
|
|
||||||
let index = (*keyframe).mPropertyValues.len();
|
|
||||||
(*keyframe).mPropertyValues.set_len((index + 1) as u32);
|
|
||||||
(*keyframe).mPropertyValues[index].mProperty = property.into();
|
|
||||||
(*keyframe).mPropertyValues[index].mServoDeclarationBlock.mRawPtr = ptr::null_mut();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
enum Offset {
|
enum Offset {
|
||||||
Zero,
|
Zero,
|
||||||
One
|
One
|
||||||
|
@ -3118,7 +3109,8 @@ fn fill_in_missing_keyframe_values(all_properties: &[AnimatableLonghand],
|
||||||
// Append properties that have not been set at this offset.
|
// Append properties that have not been set at this offset.
|
||||||
for ref property in all_properties.iter() {
|
for ref property in all_properties.iter() {
|
||||||
if !properties_set_at_offset.has_animatable_longhand_bit(property) {
|
if !properties_set_at_offset.has_animatable_longhand_bit(property) {
|
||||||
append_computed_property_value(keyframe, property);
|
unsafe { Gecko_AppendPropertyValuePair(&mut (*keyframe).mPropertyValues,
|
||||||
|
(*property).into()); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3181,7 +3173,10 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName(raw_data: RawServoStyleSetB
|
||||||
// animation should be set to the underlying computed value for
|
// animation should be set to the underlying computed value for
|
||||||
// that keyframe.
|
// that keyframe.
|
||||||
for property in animation.properties_changed.iter() {
|
for property in animation.properties_changed.iter() {
|
||||||
append_computed_property_value(keyframe, property);
|
unsafe {
|
||||||
|
Gecko_AppendPropertyValuePair(&mut (*keyframe).mPropertyValues,
|
||||||
|
property.into());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if current_offset == 0.0 {
|
if current_offset == 0.0 {
|
||||||
has_complete_initial_keyframe = true;
|
has_complete_initial_keyframe = true;
|
||||||
|
@ -3199,7 +3194,6 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName(raw_data: RawServoStyleSetB
|
||||||
declaration.is_animatable()
|
declaration.is_animatable()
|
||||||
});
|
});
|
||||||
|
|
||||||
let mut index = unsafe { (*keyframe).mPropertyValues.len() };
|
|
||||||
for &(ref declaration, _) in animatable {
|
for &(ref declaration, _) in animatable {
|
||||||
let property = AnimatableLonghand::from_declaration(declaration).unwrap();
|
let property = AnimatableLonghand::from_declaration(declaration).unwrap();
|
||||||
// Skip the 'display' property because although it is animatable from SMIL,
|
// Skip the 'display' property because although it is animatable from SMIL,
|
||||||
|
@ -3213,17 +3207,17 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName(raw_data: RawServoStyleSetB
|
||||||
properties_set_at_end.set_animatable_longhand_bit(&property);
|
properties_set_at_end.set_animatable_longhand_bit(&property);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let property = AnimatableLonghand::from_declaration(declaration).unwrap();
|
||||||
unsafe {
|
unsafe {
|
||||||
let property = AnimatableLonghand::from_declaration(declaration).unwrap();
|
let pair =
|
||||||
(*keyframe).mPropertyValues.set_len((index + 1) as u32);
|
Gecko_AppendPropertyValuePair(&mut (*keyframe).mPropertyValues,
|
||||||
(*keyframe).mPropertyValues[index].mProperty = (&property).into();
|
(&property).into());
|
||||||
(*keyframe).mPropertyValues[index].mServoDeclarationBlock.set_arc_leaky(
|
(*pair).mServoDeclarationBlock.set_arc_leaky(
|
||||||
Arc::new(global_style_data.shared_lock.wrap(
|
Arc::new(global_style_data.shared_lock.wrap(
|
||||||
PropertyDeclarationBlock::with_one(
|
PropertyDeclarationBlock::with_one(
|
||||||
declaration.clone(), Importance::Normal
|
declaration.clone(), Importance::Normal
|
||||||
))));
|
))));
|
||||||
}
|
}
|
||||||
index += 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue