mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
servo: Merge #19331 - Resolve base style for pseudo (from hiikezoe:resolve-base-style-for-pseudo); r=emilio
<!-- Please describe your changes on the following line: --> This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1418867 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors Source-Repo: https://github.com/servo/servo Source-Revision: a6ce817045b293b2898aca4d393c6b744955e730 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 5409294d683e06e8de99f05d93c5e7b1047e9dec
This commit is contained in:
parent
34af56766c
commit
70cac6f846
@ -1410,6 +1410,8 @@ cfg_if! {
|
||||
pub static nsGkAtoms_multicol: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms8multipleE"]
|
||||
pub static nsGkAtoms_multiple: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms4muteE"]
|
||||
pub static nsGkAtoms_mute: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms5mutedE"]
|
||||
pub static nsGkAtoms_muted: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms4nameE"]
|
||||
@ -1850,6 +1852,8 @@ cfg_if! {
|
||||
pub static nsGkAtoms_onmapsendmessagereq: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms21onmapmessageupdatereqE"]
|
||||
pub static nsGkAtoms_onmapmessageupdatereq: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms6onmuteE"]
|
||||
pub static nsGkAtoms_onmute: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms13onnewrdsgroupE"]
|
||||
pub static nsGkAtoms_onnewrdsgroup: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms19onnotificationclickE"]
|
||||
@ -2032,6 +2036,8 @@ cfg_if! {
|
||||
pub static nsGkAtoms_onunderflow: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms8onunloadE"]
|
||||
pub static nsGkAtoms_onunload: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms8onunmuteE"]
|
||||
pub static nsGkAtoms_onunmute: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms13onupdatefoundE"]
|
||||
pub static nsGkAtoms_onupdatefound: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms13onupdatereadyE"]
|
||||
@ -2734,6 +2740,8 @@ cfg_if! {
|
||||
pub static nsGkAtoms_undetermined: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms6unloadE"]
|
||||
pub static nsGkAtoms_unload: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms6unmuteE"]
|
||||
pub static nsGkAtoms_unmute: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms17unparsedEntityUriE"]
|
||||
pub static nsGkAtoms_unparsedEntityUri: *mut nsStaticAtom;
|
||||
#[link_name = "_ZN9nsGkAtoms10upperAlphaE"]
|
||||
@ -6587,6 +6595,8 @@ cfg_if! {
|
||||
pub static nsGkAtoms_multicol: *mut nsStaticAtom;
|
||||
#[link_name = "?multiple@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
pub static nsGkAtoms_multiple: *mut nsStaticAtom;
|
||||
#[link_name = "?mute@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
pub static nsGkAtoms_mute: *mut nsStaticAtom;
|
||||
#[link_name = "?muted@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
pub static nsGkAtoms_muted: *mut nsStaticAtom;
|
||||
#[link_name = "?name@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
@ -7027,6 +7037,8 @@ cfg_if! {
|
||||
pub static nsGkAtoms_onmapsendmessagereq: *mut nsStaticAtom;
|
||||
#[link_name = "?onmapmessageupdatereq@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
pub static nsGkAtoms_onmapmessageupdatereq: *mut nsStaticAtom;
|
||||
#[link_name = "?onmute@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
pub static nsGkAtoms_onmute: *mut nsStaticAtom;
|
||||
#[link_name = "?onnewrdsgroup@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
pub static nsGkAtoms_onnewrdsgroup: *mut nsStaticAtom;
|
||||
#[link_name = "?onnotificationclick@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
@ -7209,6 +7221,8 @@ cfg_if! {
|
||||
pub static nsGkAtoms_onunderflow: *mut nsStaticAtom;
|
||||
#[link_name = "?onunload@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
pub static nsGkAtoms_onunload: *mut nsStaticAtom;
|
||||
#[link_name = "?onunmute@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
pub static nsGkAtoms_onunmute: *mut nsStaticAtom;
|
||||
#[link_name = "?onupdatefound@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
pub static nsGkAtoms_onupdatefound: *mut nsStaticAtom;
|
||||
#[link_name = "?onupdateready@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
@ -7911,6 +7925,8 @@ cfg_if! {
|
||||
pub static nsGkAtoms_undetermined: *mut nsStaticAtom;
|
||||
#[link_name = "?unload@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
pub static nsGkAtoms_unload: *mut nsStaticAtom;
|
||||
#[link_name = "?unmute@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
pub static nsGkAtoms_unmute: *mut nsStaticAtom;
|
||||
#[link_name = "?unparsedEntityUri@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
pub static nsGkAtoms_unparsedEntityUri: *mut nsStaticAtom;
|
||||
#[link_name = "?upperAlpha@nsGkAtoms@@2PEAVnsStaticAtom@@EA"]
|
||||
@ -11764,6 +11780,8 @@ cfg_if! {
|
||||
pub static nsGkAtoms_multicol: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?multiple@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
pub static nsGkAtoms_multiple: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?mute@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
pub static nsGkAtoms_mute: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?muted@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
pub static nsGkAtoms_muted: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?name@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
@ -12204,6 +12222,8 @@ cfg_if! {
|
||||
pub static nsGkAtoms_onmapsendmessagereq: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?onmapmessageupdatereq@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
pub static nsGkAtoms_onmapmessageupdatereq: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?onmute@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
pub static nsGkAtoms_onmute: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?onnewrdsgroup@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
pub static nsGkAtoms_onnewrdsgroup: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?onnotificationclick@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
@ -12386,6 +12406,8 @@ cfg_if! {
|
||||
pub static nsGkAtoms_onunderflow: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?onunload@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
pub static nsGkAtoms_onunload: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?onunmute@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
pub static nsGkAtoms_onunmute: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?onupdatefound@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
pub static nsGkAtoms_onupdatefound: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?onupdateready@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
@ -13088,6 +13110,8 @@ cfg_if! {
|
||||
pub static nsGkAtoms_undetermined: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?unload@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
pub static nsGkAtoms_unload: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?unmute@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
pub static nsGkAtoms_unmute: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?unparsedEntityUri@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
pub static nsGkAtoms_unparsedEntityUri: *mut nsStaticAtom;
|
||||
#[link_name = "\x01?upperAlpha@nsGkAtoms@@2PAVnsStaticAtom@@A"]
|
||||
@ -16944,6 +16968,8 @@ macro_rules! atom {
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_multicol as *mut _) } }};
|
||||
("multiple") =>
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_multiple as *mut _) } }};
|
||||
("mute") =>
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_mute as *mut _) } }};
|
||||
("muted") =>
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_muted as *mut _) } }};
|
||||
("name") =>
|
||||
@ -17384,6 +17410,8 @@ macro_rules! atom {
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onmapsendmessagereq as *mut _) } }};
|
||||
("onmapmessageupdatereq") =>
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onmapmessageupdatereq as *mut _) } }};
|
||||
("onmute") =>
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onmute as *mut _) } }};
|
||||
("onnewrdsgroup") =>
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onnewrdsgroup as *mut _) } }};
|
||||
("onnotificationclick") =>
|
||||
@ -17566,6 +17594,8 @@ macro_rules! atom {
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onunderflow as *mut _) } }};
|
||||
("onunload") =>
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onunload as *mut _) } }};
|
||||
("onunmute") =>
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onunmute as *mut _) } }};
|
||||
("onupdatefound") =>
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_onupdatefound as *mut _) } }};
|
||||
("onupdateready") =>
|
||||
@ -18268,6 +18298,8 @@ macro_rules! atom {
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_undetermined as *mut _) } }};
|
||||
("unload") =>
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_unload as *mut _) } }};
|
||||
("unmute") =>
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_unmute as *mut _) } }};
|
||||
("unparsed-entity-uri") =>
|
||||
{{ #[allow(unsafe_code)] #[allow(unused_unsafe)]unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_unparsedEntityUri as *mut _) } }};
|
||||
("upper-alpha") =>
|
||||
|
@ -1550,7 +1550,7 @@ extern "C" {
|
||||
} extern "C" {
|
||||
pub fn Servo_MaybeGCRuleTree ( set : RawServoStyleSetBorrowed , ) ;
|
||||
} extern "C" {
|
||||
pub fn Servo_StyleSet_GetBaseComputedValuesForElement ( set : RawServoStyleSetBorrowed , element : RawGeckoElementBorrowed , existing_style : ServoStyleContextBorrowed , snapshots : * const ServoElementSnapshotTable , pseudo_type : CSSPseudoElementType , ) -> ServoStyleContextStrong ;
|
||||
pub fn Servo_StyleSet_GetBaseComputedValuesForElement ( set : RawServoStyleSetBorrowed , element : RawGeckoElementBorrowed , existing_style : ServoStyleContextBorrowed , snapshots : * const ServoElementSnapshotTable , ) -> ServoStyleContextStrong ;
|
||||
} extern "C" {
|
||||
pub fn Servo_StyleSet_GetComputedValuesByAddingAnimation ( set : RawServoStyleSetBorrowed , element : RawGeckoElementBorrowed , existing_style : ServoStyleContextBorrowed , snapshots : * const ServoElementSnapshotTable , animation : RawServoAnimationValueBorrowed , ) -> ServoStyleContextStrong ;
|
||||
} extern "C" {
|
||||
|
File diff suppressed because one or more lines are too long
@ -789,7 +789,6 @@ pub extern "C" fn Servo_StyleSet_GetBaseComputedValuesForElement(
|
||||
element: RawGeckoElementBorrowed,
|
||||
computed_values: ServoStyleContextBorrowed,
|
||||
snapshots: *const ServoElementSnapshotTable,
|
||||
pseudo_type: CSSPseudoElementType
|
||||
) -> ServoStyleContextStrong {
|
||||
debug_assert!(!snapshots.is_null());
|
||||
let computed_values = unsafe { ArcBorrow::from_ref(computed_values) };
|
||||
@ -807,21 +806,6 @@ pub extern "C" fn Servo_StyleSet_GetBaseComputedValuesForElement(
|
||||
|
||||
let element = GeckoElement(element);
|
||||
|
||||
let element_data = match element.borrow_data() {
|
||||
Some(data) => data,
|
||||
None => return computed_values.clone_arc().into(),
|
||||
};
|
||||
|
||||
if let Some(pseudo) = PseudoElement::from_pseudo_type(pseudo_type) {
|
||||
let styles = &element_data.styles;
|
||||
// This style already doesn't have animations.
|
||||
return styles
|
||||
.pseudos
|
||||
.get(&pseudo)
|
||||
.expect("GetBaseComputedValuesForElement for an unexisting pseudo?")
|
||||
.clone().into();
|
||||
}
|
||||
|
||||
let global_style_data = &*GLOBAL_STYLE_DATA;
|
||||
let guard = global_style_data.shared_lock.read();
|
||||
let shared = create_shared_context(&global_style_data,
|
||||
|
Loading…
Reference in New Issue
Block a user