mirror of
https://github.com/servo/servo.git
synced 2025-09-04 03:58:23 +01:00
Auto merge of #17839 - heycam:opacity-smil, r=hiro
style: allow out-of-range opacity values for SMIL animations From https://bugzilla.mozilla.org/show_bug.cgi?id=1371150. <!-- 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/17839) <!-- Reviewable:end -->
This commit is contained in:
commit
bf16b146e8
8 changed files with 45 additions and 4 deletions
|
@ -2907,6 +2907,7 @@ fn create_context<'a>(
|
|||
style: &'a ComputedValues,
|
||||
parent_style: Option<&'a ComputedValues>,
|
||||
pseudo: Option<&'a PseudoElement>,
|
||||
for_smil_animation: bool,
|
||||
) -> Context<'a> {
|
||||
Context {
|
||||
is_root_element: false,
|
||||
|
@ -2920,6 +2921,7 @@ fn create_context<'a>(
|
|||
cached_system_font: None,
|
||||
in_media_query: false,
|
||||
quirks_mode: per_doc_data.stylist.quirks_mode(),
|
||||
for_smil_animation,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2989,7 +2991,14 @@ pub extern "C" fn Servo_GetComputedKeyframeValues(keyframes: RawGeckoKeyframeLis
|
|||
let parent_style = parent_data.as_ref().map(|d| d.styles.primary()).map(|x| &**x);
|
||||
|
||||
let pseudo = style.pseudo();
|
||||
let mut context = create_context(&data, &metrics, &style, parent_style, pseudo.as_ref());
|
||||
let mut context = create_context(
|
||||
&data,
|
||||
&metrics,
|
||||
&style,
|
||||
parent_style,
|
||||
pseudo.as_ref(),
|
||||
/* for_smil_animation = */ false,
|
||||
);
|
||||
|
||||
let global_style_data = &*GLOBAL_STYLE_DATA;
|
||||
let guard = global_style_data.shared_lock.read();
|
||||
|
@ -3069,7 +3078,14 @@ pub extern "C" fn Servo_GetAnimationValues(declarations: RawServoDeclarationBloc
|
|||
let parent_style = parent_data.as_ref().map(|d| d.styles.primary()).map(|x| &**x);
|
||||
|
||||
let pseudo = style.pseudo();
|
||||
let mut context = create_context(&data, &metrics, &style, parent_style, pseudo.as_ref());
|
||||
let mut context = create_context(
|
||||
&data,
|
||||
&metrics,
|
||||
&style,
|
||||
parent_style,
|
||||
pseudo.as_ref(),
|
||||
/* for_smil_animation = */ true
|
||||
);
|
||||
|
||||
let default_values = data.default_computed_values();
|
||||
let global_style_data = &*GLOBAL_STYLE_DATA;
|
||||
|
@ -3098,7 +3114,14 @@ pub extern "C" fn Servo_AnimationValue_Compute(element: RawGeckoElementBorrowed,
|
|||
let parent_style = parent_data.as_ref().map(|d| d.styles.primary()).map(|x| &**x);
|
||||
|
||||
let pseudo = style.pseudo();
|
||||
let mut context = create_context(&data, &metrics, style, parent_style, pseudo.as_ref());
|
||||
let mut context = create_context(
|
||||
&data,
|
||||
&metrics,
|
||||
style,
|
||||
parent_style,
|
||||
pseudo.as_ref(),
|
||||
/* for_smil_animation = */ false
|
||||
);
|
||||
|
||||
let default_values = data.default_computed_values();
|
||||
let global_style_data = &*GLOBAL_STYLE_DATA;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue