Commit graph

28332 commits

Author SHA1 Message Date
J. Ryan Stinnett
d76abed401 Update Stylo bindings 2017-08-22 11:00:56 -05:00
J. Ryan Stinnett
214c59b25e Fix up Servo_StyleSheet_GetOrigin for Linux 32-bit ABI
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the caller will pass along space for the
struct return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: JHDp0XAmQCG
2017-08-22 11:00:01 -05:00
bors-servo
eb80e8f20a Auto merge of #18187 - ferjm:unused.imports, r=emilio
Remove unused imports from stylist tests

- [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/18187)
<!-- Reviewable:end -->
2017-08-22 08:46:55 -05:00
Fernando Jiménez Moreno
33feb5e3fd Remove unused imports from stylist tests 2017-08-22 14:59:35 +02:00
bors-servo
8ca9542de6 Auto merge of #18134 - servo:we-are-leaving-babylon, r=emilio
Introduce values::animated::Animate

<!-- 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/18134)
<!-- Reviewable:end -->
2017-08-22 07:22:10 -05:00
bors-servo
1059ef4fde Auto merge of #18184 - emilio:inline, r=upsuper
style: Inline a bunch of trivial stuff we're paying function calls for in Geckolib.

Reviewed by Xidorn in https://bugzilla.mozilla.org/show_bug.cgi?id=1392170.

<!-- 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/18184)
<!-- Reviewable:end -->
2017-08-22 05:48:37 -05:00
Emilio Cobos Álvarez
fcd6e79659
style: Inline a bunch of trivial stuff we're paying calls for in Geckolib. 2017-08-22 12:48:14 +02:00
Anthony Ramine
aea0cd7ec7 Introduce values::animated::Animate
This replaces the Animatable trait and merges its three former methods into a single one.
2017-08-22 09:41:01 +02:00
Anthony Ramine
0cceeb9d5c Simplify add_weighted_with_initial_val 2017-08-21 23:48:59 +02:00
Anthony Ramine
54dc3e1670 Clean up filter animations 2017-08-21 23:48:58 +02:00
Anthony Ramine
baf3597477 Clean up transform animations 2017-08-21 23:48:58 +02:00
bors-servo
10779f0251 Auto merge of #18077 - glennw:wr-profiling, r=emilio
Add key bindings for more WR debug / profiler options.

<!-- 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/18077)
<!-- Reviewable:end -->
2017-08-21 16:11:20 -05:00
bors-servo
181f41ed37 Auto merge of #18168 - mantaroh:stroke-distance, r=nox
Add ComputeSquaredDistance trait for SvgLengthOrPercentageOrNumber

<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1387986

This patch will add ComputeSquaredDistance trait for SvgLengthOrPercentageOrNumber in order to calculating distance between LengthOrPercentage and Number.

---
<!-- 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: -->
There are already these tests in dom/smil/tests of gecko, this PR will enable these tests.
For detail, see https://bugzilla.mozilla.org/show_bug.cgi?id=1387986.

<!-- 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/17288)
<!-- Reviewable:end -->
2017-08-21 14:35:09 -05:00
Mantaroh Yoshinaga
d5cfa1395b Add ComputeSquaredDistance trait for SvgLengthOrPercentageOrNumber.
Currently, Servo uses ComputeSquaredDistance derive for
SvgLengthOrPercentageOrNumber, so servo can't calculate between
LengthOrPercentage and Number.
This PR will allow calculating these value.
2017-08-22 04:20:12 +09:00
bors-servo
05f2001914 Auto merge of #18173 - emilio:invalidation-dirty-thingie, r=bholley
style: Keep dirty bit invariants during invalidation.

There's the question of whether should we be recursing into the invalidation
code for elements without data... Probably not, but that's a somewhat more
risky change.

Bug: 1391444

<!-- 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/18173)
<!-- Reviewable:end -->
2017-08-21 13:21:20 -05:00
bors-servo
8809d5fac5 Auto merge of #18174 - emilio:disable-transitions-raf, r=SimonSapin
Disable /_mozilla/css/animations/transition-raf.html.ini

Transitions are just very broken, so this test is flacky.

<!-- 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/18174)
<!-- Reviewable:end -->
2017-08-21 12:11:09 -05:00
Emilio Cobos Álvarez
a79f33c669
Disable /_mozilla/css/animations/transition-raf.html.ini
Transitions are just very broken, so this test is flacky.
2017-08-21 19:07:51 +02:00
bors-servo
e60266a723 Auto merge of #18143 - emilio:stylist-stylesheets, r=<try>
style: Remove Stylist::is_device_dirty.

More progress on unifying how Gecko and Servo track stylist dirtiness.

<!-- 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/18143)
<!-- Reviewable:end -->
2017-08-21 10:59:10 -05:00
Emilio Cobos Álvarez
293274fa5e
style: Make sure to set the initial value of the transition even if we don't start it.
Otherwise we may get to the end of it directly, which is far from what we want.
2017-08-21 17:58:45 +02:00
Emilio Cobos Álvarez
359ef7b7c3
Don't rely on ahem being loaded sync in offset_properties_inline.html 2017-08-21 17:58:44 +02:00
Emilio Cobos Álvarez
85996826ab
style: Remove Stylist::is_device_dirty.
More progress on unifying how Gecko and Servo track stylist dirtiness.
2017-08-21 17:58:43 +02:00
Emilio Cobos Álvarez
aa0c320f4f
style: Keep dirty bit invariants during invalidation.
There's the question of whether should we be recursing into the invalidation
code for elements without data... Probably not, but that's a somewhat more
risky change.

Bug: 1391444
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-21 17:54:12 +02:00
bors-servo
d4e43d9d76 Auto merge of #18169 - upsuper:write-css-fix, r=nox
Add whitespace before line number in grid line

This is a followup fix of #18159 where the space was incorrectly removed.

<!-- 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/18169)
<!-- Reviewable:end -->
2017-08-21 07:49:11 -05:00
Xidorn Quan
afc9323b7c Add whitespace before line number in grid line 2017-08-21 22:21:51 +10:00
bors-servo
430b171f88 Auto merge of #18139 - upsuper:parser-state, r=SimonSapin
Update parser state only after rule is successfully parsed

This is expected to fix several web-platform tests mentioned in [bug 1389187](https://bugzilla.mozilla.org/show_bug.cgi?id=1389187).

<!-- 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/18139)
<!-- Reviewable:end -->
2017-08-21 06:46:11 -05:00
bors-servo
6a1b0d0526 Auto merge of #18159 - upsuper:write-to-css, r=nox
Replace write! with to_css and write_str in some ToCss impls

Some of this is necessary for fixing things like [bug 1370779](https://bugzilla.mozilla.org/show_bug.cgi?id=1370779) because otherwise we would still not be using the new numeric serialization algorithm from cssparser crate.

<!-- 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/18159)
<!-- Reviewable:end -->
2017-08-21 04:14:08 -05:00
bors-servo
a1006a52a7 Auto merge of #18149 - paulrouget:hittest-issue, r=cbrewster
make sure proper frame tree is sent when iframes change

We ran into a hittest issue because the frame tree was not correctly updated after #17425.

The frame tree should be updated on tab change (via send_frame_tree) or when the frame sub tree changes and it's the active one (via update_frame_tree_if_active).

---
<!-- 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
- [x] These changes fix #18101 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/18149)
<!-- Reviewable:end -->
2017-08-21 03:02:21 -05:00
Paul Rouget
4edac8e63c make sure proper frame tree is sent when iframes change 2017-08-21 09:42:15 +02:00
bors-servo
9bb21e6cab Auto merge of #18165 - birtles:expand-variables-in-serialize, r=hiro
Expand var() references in single_value_to_css

These are the Servo-side changes for [Gecko bug 1385139](https://bugzilla.mozilla.org/show_bug.cgi?id=1385139).

This is a temporary step needed to support Gecko's getKeyframes() API until we implement bug 1391537. It only takes effect when a ComputedValues object is supplied and only for longhand declarations.
2017-08-20 23:05:57 -05:00
Brian Birtles
4f53ca2e39 Expand var() references in single_value_to_css
This is a temporary step needed to support Gecko's getKeyframes() API
until we implement bug 1391537. It only takes effect when
a ComputedValues object is supplied and only for longhand declarations.
2017-08-21 12:59:53 +09:00
bors-servo
87206bd68e Auto merge of #18153 - emilio:restyle-damage-cleanup, r=heycam
stylo: Remove a lot of the restyle damage related complexity.

The only reason why we had the `existing_style_for_style_damage` bit is to apply
some optimizations that we don't have anymore.

I still want to reintroduce a few of them, at least for the non-eager
pseudo-element case... But I think I won't need this at all.

This allows us to remove a fair amount of Gecko code too.

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/18153)
<!-- Reviewable:end -->
2017-08-20 07:00:25 -05:00
Emilio Cobos Álvarez
0f37b209cb
stylo: Remove a lot of the restyle damage related complexity.
The only reason why we had the `existing_style_for_style_damage` bit is to apply
some optimizations that we don't have anymore.

I still want to reintroduce a few of them, at least for the non-eager
pseudo-element case... But I think I won't need this at all.

This allows us to remove a fair amount of Gecko code too.
2017-08-20 13:59:46 +02:00
Xidorn Quan
7e92c15e00 Replace write! with to_css and write_str in some ToCss impls 2017-08-20 17:21:08 +10:00
bors-servo
4f3fb904ae Auto merge of #18158 - emilio:pseudo-crash, r=heycam
style: Skip state pseudo-classes when finding a pseudo-element.

Bug: 1391577
Reviewed-by: heycam
MozReview-Commit-ID: 1ICBijtcf2b
2017-08-20 02:14:08 -05:00
Emilio Cobos Álvarez
9e0dd19e7e
style: Skip state pseudo-classes when finding a pseudo-element.
Bug: 1391577
Reviewed-by: heycam
MozReview-Commit-ID: 1ICBijtcf2b
2017-08-20 09:12:57 +02:00
bors-servo
dec996f311 Auto merge of #18156 - BorisChiou:stylo/animation/rotatexy, r=birtles
stylo: Bug 1389429 - The interpolations of rotatex and rotatey are not correct.

These patches fix the potential divided-by-zero issue on non-normalizable
direction vector of rotate3d, and the interpolation between rotatex/rotatey and none.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1389429](https://bugzilla.mozilla.org/show_bug.cgi?id=1389429).
- [X] These changes do not require tests because there are enough tests in Gecko 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/18156)
<!-- Reviewable:end -->
2017-08-19 22:52:50 -05:00
Xidorn Quan
c15ae3b6b4 Update parser state only after rule is successfully parsed 2017-08-20 10:44:32 +10:00
Boris Chiou
4ed1a6be20 Fix the identity transform of rotatex and rotatey.
Let's see the example: "rotatex(360deg)" to "none".

While we do interpolation between "rotatex" and "none", the original code
path is:
1. Build an identity transform for none and always use (0, 0, 1) as the
   direction vector, i.e. Rotate(0, 0, 1, 0deg).
2. Do interpolation between rotatex (i.e. Rotate(1, 0, 0, 360deg)) and
   Rotate(0, 0, 1, 0deg). Because their direction vectors are different,
   so we do matrix decomposition/interpolation/recomposition on both
   functions. The problem is, matrix decomposition makes the 360deg
   disappear, so it looks like "rotatex(0deg)".
3. Obviously, we are trying to interpolate from rotatex(0deg) to none, so
   the interpolated matrix is always an identity matrix.

I think rotatex, rotatey, and rotatez are special cases which should
really rotate according to the angle, so we should build the identity
transform for them according to the normalized direction vector, and so we do
interpolation on the angle, instead of converting them into matrix.

Replacing build_identity_transform_list() with
add_weighted_transform_lists(list, list, 0, 0) might be another solution;
However, I didn't do that because build_identity_transform_list() is
much simpler.
2017-08-20 02:26:18 +08:00
Boris Chiou
03cf0a8cb8 Fix divided by zero problem on non-normalizable direction vector.
While normalizing the direction vector, we have to make sure we don't
divide the components by zero length to avoid any assertion of "NaN".
2017-08-20 02:26:08 +08:00
bors-servo
c1b196b7cb Auto merge of #18148 - tamird:computedvalues-arc-borrow, r=emilio
style: pass a borrow instead of an Arc

https://bugzilla.mozilla.org/show_bug.cgi?id=1380133 has landed,
permitting us to pass a plain borrow into Gecko_CalcStyleDifference;
propagate this through style.

Closes #17795.

- [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/18148)
<!-- Reviewable:end -->
2017-08-19 08:51:16 -05:00
bors-servo
0b45a4f651 Auto merge of #18136 - upsuper:shadow-color, r=emilio
Use Option<RGBA> for color in shadow

This fixes [bug 1390697](https://bugzilla.mozilla.org/show_bug.cgi?id=1390697) by downgrading the support of currentcolor in shadow to what Gecko currently supports.

<!-- 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/18136)
<!-- Reviewable:end -->
2017-08-19 05:45:53 -05:00
Tamir Duberstein
c348d5afb3
style: pass a borrow instead of an Arc
https://bugzilla.mozilla.org/show_bug.cgi?id=1380133 has landed,
permitting us to pass a plain borrow into Gecko_CalcStyleDifference;
propagate this through style.

Closes #17795.
2017-08-19 03:24:46 -07:00
bors-servo
d7b7e7aea8 Auto merge of #14584 - emilio:osmesa-up, r=jdm
Update osmesa.

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

<!-- 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/14584)
<!-- Reviewable:end -->
2017-08-19 02:46:43 -05:00
Josh Matthews
a7815aa9bd
Use homebrew zlib on CI builders. 2017-08-19 09:35:42 +02:00
Emilio Cobos Álvarez
2338151a79
OSMesa up. 2017-08-19 09:35:39 +02:00
bors-servo
9f64630eaa Auto merge of #17521 - KiChjang:update-fetch, r=jdm
Update fetch methods

Includes updates to main fetch, scheme fetch, HTTP fetch, HTTP-redirect fetch, HTTP-network fetch, HTTP-network-or-cache fetch and CORS preflight fetch.

<!-- 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/17521)
<!-- Reviewable:end -->
2017-08-18 18:39:02 -05:00
Keith Yeung
268f78e5c8 Update test expectations 2017-08-18 16:32:30 -07:00
Keith Yeung
f28a6a0b4c Fix unit tests for updated CORS preflight fetch 2017-08-18 16:30:25 -07:00
Keith Yeung
4a4caa8583 Update CORS preflight fetch 2017-08-18 16:30:22 -07:00
Keith Yeung
34178bdd4c Update HTTP-network fetch 2017-08-18 16:30:19 -07:00