Commit graph

6718 commits

Author SHA1 Message Date
Hiroyuki Ikezoe
03c5462cf5 Make vertical-align animatable between percentage and percentage or length. 2017-08-15 09:58:48 +09:00
Xidorn Quan
d3baa4fb3c Check pref when parsing :fullscreen pseudo-class 2017-08-15 10:48:35 +10:00
Xidorn Quan
89ba3553dc Apply line break suppression to text when in any ruby 2017-08-15 09:32:39 +10:00
bors-servo
4d22af6136 Auto merge of #18072 - servo:we-are-leaving-babylon, r=emilio
Move some code out of animated_properties

<!-- 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/18072)
<!-- Reviewable:end -->
2017-08-14 07:51:34 -05:00
bors-servo
1573309b86 Auto merge of #18070 - emilio:orig-medium, r=heycam
stylo: only clear relevant origins when medium features change

Bug: 1389871
Reviewed-by: heycam

<!-- 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/18070)
<!-- Reviewable:end -->
2017-08-14 06:42:44 -05:00
Emilio Cobos Álvarez
bd74d7fd1d
style: Update bindings. 2017-08-14 12:46:45 +02:00
Emilio Cobos Álvarez
fd3d38326c
stylo: only clear relevant origins when medium features change.
Bug: 1389871
Reviewed-by: heycam
MozReview-Commit-ID: 6ocZc1u1TbU
2017-08-14 12:46:43 +02:00
Emilio Cobos Álvarez
f7eb46f484
style: Introduce OriginSet. 2017-08-14 12:46:41 +02:00
bors-servo
421a553799 Auto merge of #18069 - hiikezoe:scroll-snap, r=daisuke
Make scroll-snap-{coordinate, destination} discrete animation.

<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1387941

---
<!-- 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

<!-- 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/18069)
<!-- Reviewable:end -->
2017-08-14 05:33:45 -05:00
bors-servo
b0422b8910 Auto merge of #18067 - heycam:fix-cascade, r=xidorn
geckolib: Return @font-face rules to Gecko in the expected cascade order.

From https://bugzilla.mozilla.org/show_bug.cgi?id=1389937.  Reviewed by Xidorn there.  Waiting until try server is back up and running before landing this, though.

<!-- 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/18067)
<!-- Reviewable:end -->
2017-08-14 04:19:34 -05:00
Hiroyuki Ikezoe
aaedf1cb84 Make scroll-snap-{coordinate, destination} discrete animation. 2017-08-14 17:25:42 +09:00
bors-servo
f93c6dfbd5 Auto merge of #18066 - dadaa:make-moz-appearance-animatable, r=hiro
Make -moz-appearance animatable

<!-- Please describe your changes on the following line: -->

---
<!-- 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

<!-- Either: -->
- [X] There are tests for these changes. The test code is patch part 2 in https://bugzilla.mozilla.org/show_bug.cgi?id=1382138

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/18066)
<!-- Reviewable:end -->
2017-08-14 02:24:47 -05:00
Cameron McCormack
f26a7e9372 geckolib: Return @font-face rules to Gecko in the expected cascade order. 2017-08-14 11:38:43 +08:00
Boris Chiou
02277ce4a1 Fix the conversion from Perspective into ComputedMatrix.
We convert a perspective function into a ComputedMatrix, but we apply the
perspective length to a wrong matrix item. We should put it into m34,
instead of m43. m43 is for translate parameter Z.
2017-08-14 11:21:31 +08:00
Daisuke Akatsuka
cdea3d20c4 Make -moz-appearance animatable 2017-08-14 10:41:52 +09:00
Nicholas Nethercote
1a40101d2f Overhaul ComputedValues measurement, and add style structs measurement. 2017-08-14 10:49:48 +10:00
Anthony Ramine
796a2b9632 Move specified and computed percentages to submodules 2017-08-14 02:47:43 +02:00
Anthony Ramine
fb8400d745 Move impl of ToAnimatedZero for BorderCornerRadius where it belongs 2017-08-14 01:46:53 +02:00
Anthony Ramine
49204e2c72 Introduce style::values::animated::color
Starting to remove stuff from style::properties::animated_properties for real.
2017-08-14 01:25:02 +02:00
bors-servo
60c44b072c Auto merge of #18058 - servo:compute-squared-distance, r=emilio
Introduce and derive ComputeSquaredDistance

This new trait merges the former `Animatable` methods `compute_distance` and `compute_squared_distance`.

<!-- 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/18058)
<!-- Reviewable:end -->
2017-08-13 16:23:58 -05:00
Emilio Cobos Álvarez
0ae09aac32
style: Remove a few unneeded transmutes. 2017-08-13 16:49:05 +02:00
Cameron McCormack
d6856c0020 style: Update Gecko bindings. 2017-08-13 19:39:01 +08:00
Anthony Ramine
277351da35 Derive ComputeSquaredDistance 2017-08-13 13:34:04 +02:00
Cameron McCormack
0cf487b0ac style: Make Servo_StyleSet_NoteStyleSheetsChanged take a set of origins to dirty. 2017-08-13 18:51:07 +08:00
Cameron McCormack
d90ff1801a style: Fix origin iteration order. 2017-08-13 18:51:05 +08:00
Cameron McCormack
84451e521b style: Only flush stylesheet invalidations for origins that have changed. 2017-08-13 18:51:04 +08:00
Cameron McCormack
f3a7adfcc7 style: Add ability to clear and rebuild individual origins. 2017-08-13 18:51:03 +08:00
Cameron McCormack
72107eb838 style: Move cleared state into per-origin data. 2017-08-13 18:51:02 +08:00
Cameron McCormack
57ee17d6d9 style: Move rule source order counter into per-origin data. 2017-08-13 18:51:01 +08:00
Cameron McCormack
db6a09f24f style: Move cached media query results into per-origin data. 2017-08-13 18:50:59 +08:00
Cameron McCormack
f9d1a0e2d1 style: Split style sheet invalidations per-origin. 2017-08-13 18:50:58 +08:00
Cameron McCormack
321643ae61 style: Factor out per-origin data storage.
Also add an iter_mut_origins() function.
2017-08-13 18:50:57 +08:00
Cameron McCormack
0635fddbfc style: Move Origin into its own file. 2017-08-13 18:36:58 +08:00
Anthony Ramine
51b740033b Introduce ComputeSquaredDistance
This allows us to merge the former Animatable methods compute_distance and
compute_squared_distance, reducing code size.
2017-08-13 00:51:09 +02:00
Anthony Ramine
b14e68f915 Remove impl_animatable_for_option_tuple 2017-08-13 00:51:08 +02:00
Bobby Holley
657878d8a5 Update bindings. 2017-08-11 19:14:33 -07:00
Hiroyuki Ikezoe
015a249afc Cleanup code that was used for verifying styling results for throttled animation flush in post traversal.
Now that we do process normal traversal even in the case of throttled animation
flush so that we don't need to do special handling for the case.

Note about the comment in has_current_styles():
the remaining animation hints is not caused by either this patch or the
previous patch in this patch series, it's been there in the first place, but
it should be fixed somehow later. See bug 1389675.

MozReview-Commit-ID: JojHufxNCiS
2017-08-11 18:52:36 -07:00
Hiroyuki Ikezoe
c0de5ebd21 Process normal traversal for throttled animation flush as well.
MozReview-Commit-ID: BirD8BDMifp
2017-08-11 18:52:29 -07:00
bors-servo
faad7ffb45 Auto merge of #18053 - bholley:descendants_bit_refactor, r=emilio
Overhaul dirty descendants propagation in preparation for restyle roots

https://bugzilla.mozilla.org/show_bug.cgi?id=1389385

<!-- 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/18053)
<!-- Reviewable:end -->
2017-08-11 19:01:15 -05:00
Bobby Holley
57d8ec95b7 Update bindings. 2017-08-11 17:00:40 -07:00
Bobby Holley
d8cba2959f Rearrange dirty noting to operate on the element rather than the parent.
This will allow us to scope restyle roots more tightly.

MozReview-Commit-ID: 2t2lp5sKBHH
2017-08-11 17:00:38 -07:00
Bobby Holley
24a52b7990 Do all descendant bit propagation from Gecko over FFI.
Deduplicating code is nice, and it will help us when we make the bit
propagation more complicated in upcoming patches.

MozReview-Commit-ID: KIQnNJVayrM
2017-08-11 17:00:37 -07:00
bors-servo
c3bbe9284c Auto merge of #18052 - Manishearth:fixup_generic, r=heycam
stylo: Don't call fixup_generic_font for system or CSS wide specified fonts

r=heycam https://bugzilla.mozilla.org/show_bug.cgi?id=1383869

<!-- 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/18052)
<!-- Reviewable:end -->
2017-08-11 17:51:36 -05:00
Manish Goregaokar
69070c7592 stylo: Don't call fixup_generic_font for system or CSS wide specified fonts 2017-08-11 14:51:45 -07:00
Bobby Holley
2df7ae1354 Update bindings. 2017-08-11 11:24:10 -07:00
Bobby Holley
248a245c95 Make the parallel traversal an explicit flag instead of guessing from Servo.
MozReview-Commit-ID: 83DgB1sZnCb
2017-08-11 10:53:14 -07:00
Bobby Holley
f4ccbf3687 Hoist StyleNew{Children,Subtree} into their own paths.
The buggy animation handling isn't a regression, since currently we pass
UnstyledChildrenOnly in those cases, which blocks the animation traversal
in Servo_TraverseSubtree.

In general I really wanted to handle these two paths together. But there's
enough broken with the NewChildren path that I wanted to scope the buginess
as tightly as possible. And I really need to separate the handling here from
StyleDocument() to make the restyle root stuff work.

MozReview-Commit-ID: 9F0mcQl7AAX
2017-08-11 10:53:08 -07:00
Bobby Holley
32790be78d Tidy up flags handling in recalc_style_at a bit.
MozReview-Commit-ID: 4BK0JfkgjdC
2017-08-11 10:53:03 -07:00
Bobby Holley
18ad382f00 Only clear the descendants bit for which we're traversing.
Doing anything else is non-sensical, since we're not guaranteed to reach all of
the bits from traversal Y when doing traversal X.

MozReview-Commit-ID: FQliRxBan70
2017-08-11 10:52:56 -07:00
Hiroyuki Ikezoe
fb8f31f973 Make -webkit-text-stroke-width animatable. 2017-08-11 21:41:36 +09:00