diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-08-07 11:05:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-07 11:05:17 -0500 |
commit | 016ea11cbaf7586db144be122581c5b110649aee (patch) | |
tree | 8d8f687fd8d2f2071b3a59d932c2fef8f74ebf06 /components/style/servo | |
parent | f8abce8b72bf3fb09d39d6c7d708a79d1b89c9db (diff) | |
parent | 8651acd94cd068d5c2f340ab447926550a3238d0 (diff) | |
download | servo-016ea11cbaf7586db144be122581c5b110649aee.tar.gz servo-016ea11cbaf7586db144be122581c5b110649aee.zip |
Auto merge of #17783 - BorisChiou:stylo/animation/restrictions, r=nox
stylo: Bug 1374233 - Clamp interpolated values for properties which need to be restricted
Some properties only accept non-negative values, or values greater than or equal to one. It is possible to produce an negative interpolated values while using negative timing functions, so we have to apply a restriction to these values to avoid getting invalid values.
For example, line-height must be non-negative, but the output progress of some timing functions (e,g. cubic-bezier(0.25, -2, 0.75, 1)) may be a negative value, so the interpolated result of line-height is also negative.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix Bug 1374233.
- [X] These changes do not require tests because we have tests in Gecko side already.
<!-- 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/17783)
<!-- Reviewable:end -->
Diffstat (limited to 'components/style/servo')
-rw-r--r-- | components/style/servo/media_queries.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/style/servo/media_queries.rs b/components/style/servo/media_queries.rs index 6904051af18..9b47d231c97 100644 --- a/components/style/servo/media_queries.rs +++ b/components/style/servo/media_queries.rs @@ -60,7 +60,8 @@ impl Device { media_type: media_type, viewport_size: viewport_size, device_pixel_ratio: device_pixel_ratio, - root_font_size: AtomicIsize::new(font_size::get_initial_value().0 as isize), // FIXME(bz): Seems dubious? + // FIXME(bz): Seems dubious? + root_font_size: AtomicIsize::new(font_size::get_initial_value().value() as isize), used_root_font_size: AtomicBool::new(false), } } |