Commit graph

19254 commits

Author SHA1 Message Date
Hiroyuki Ikezoe
fd2ccee84d Update bindings. 2017-10-10 18:33:49 +09:00
Anthony Ramine
b7452f37d9 Properly abort any ongoing resource selection on loading a new media 2017-10-10 10:10:39 +02:00
Hiroyuki Ikezoe
e0ef378b20 Use atom for animation-name property 2017-10-10 17:10:02 +09:00
Anthony Ramine
8754155a11 Update HTMLMediaElement.webidl according to spec 2017-10-10 09:50:51 +02:00
bors-servo
27cb13314e Auto merge of #18798 - emilio:faster-custom-props, r=SimonSapin
style: Optimize custom properties cycle removal.

After #18791, this is the major custom_properties perf bottleneck in the
testcase from bug 1405411.

I'm looking into how to efficiently merge this into `substitute_all`, but
meanwhile this is worth landing, and makes most of the overhead go away.

<!-- 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/18798)
<!-- Reviewable:end -->
2017-10-10 02:47:29 -05:00
bors-servo
2cd9dcebee Auto merge of #18800 - hiikezoe:fix-mismatched-arguments-for-servo-selector-list, r=emilio
Fix mismatched arguments for servo selector list

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

This needs to be fixed to update binding files.

---
<!-- 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/18800)
<!-- Reviewable:end -->
2017-10-10 01:20:38 -05:00
bors-servo
bbb2a3cde9 Auto merge of #18790 - upsuper:scope, r=emilio
Support :scope pseudo-class

This fixes [bug 1406817](https://bugzilla.mozilla.org/show_bug.cgi?id=1406817).

<!-- 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/18790)
<!-- Reviewable:end -->
2017-10-09 23:04:15 -05:00
Hiroyuki Ikezoe
1e5ee9d2d4 Update bindings. 2017-10-10 06:35:49 +09:00
Hiroyuki Ikezoe
175b88afcf Fix mismatched arguments for Servo_SelectorXXX. 2017-10-10 06:35:16 +09:00
Emilio Cobos Álvarez
1d2e9e3ef7
style: Optimize custom properties cycle removal.
After #18791, this is the major custom_properties perf bottleneck in the
testcase from bug 1405411.

I'm looking into how to efficiently merge this into `substitute_all`, but
meanwhile this is worth landing, and makes most of the overhead go away.

MozReview-Commit-ID: LMUGc8kPhhE
2017-10-09 21:47:20 +02:00
bors-servo
80df3fb56a Auto merge of #18792 - tigercosmos:img, r=jdm
fix #18472:outdated png crate: various panics

<!-- Please describe your changes on the following line: -->
fix #18472:outdated png crate: various panics

---
- [X] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [X] These changes fix #18472

<!-- 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/18792)
<!-- Reviewable:end -->
2017-10-09 14:05:14 -05:00
bors-servo
e3624e62a4 Auto merge of #18747 - jdm:serializing-childrenonly, r=jdm
Serializing childrenonly

Rebased from #17896.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #14975 (github issue number if applicable).
- [x] There are tests for these changes

<!-- 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/18747)
<!-- Reviewable:end -->
2017-10-09 11:12:53 -05:00
bors-servo
8c314ff5d0 Auto merge of #18791 - emilio:faster-custom-props, r=heycam
style: Optimize custom property cascading.

This should help a bunch with https://bugzilla.mozilla.org/show_bug.cgi?id=1405411

<!-- 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/18791)
<!-- Reviewable:end -->
2017-10-09 09:29:18 -05:00
bors-servo
64aadee62c Auto merge of #18788 - BorisChiou:style/animation_value/debug, r=emilio
Use defualt Debug trait for AnimationValue

We use AnimationValue for animation backend to do interpolation,
accumulation, or computing distance. While debugging it, dumping the
property name is not enough. We need to dump the detailed value contained
in it.

For example:
if we animate ```translate(100px)``` to ```translate(200px)```,
and want to dump ```{:?} => {:?}```, the result is ```transform => transform```.
I think what we want is something like:
```Transform([Translate(100px, 0px, 0px)]) => Transform([Translate(200px, 0px, 0px)])```.

Using default Debug trait is not perfect because there are some redundant type strings,
but it is still better than nothing.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [x] These changes are related to PR #18415.
- [X] These changes do not require tests because this is debug only.

<!-- 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/18788)
<!-- Reviewable:end -->
2017-10-09 06:51:47 -05:00
tigercosmos
2fc765f254 fix #18472:outdated png crate: various panics 2017-10-09 19:42:00 +08:00
Xidorn Quan
0564a1e47b Support :scope pseudo-class in Element::{matches,closest} in Servo 2017-10-09 22:13:00 +11:00
Xidorn Quan
ab46a0bbe0 Add support for :scope pseudo-class 2017-10-09 22:04:08 +11:00
Emilio Cobos Álvarez
a6eaa0812a
style: Share custom property declarations if they don't contain variable references. 2017-10-09 12:29:50 +02:00
bors-servo
604cc4e311 Auto merge of #18794 - emilio:xbl-quirks-mode, r=heycam
style: use the XBL styleset quirks mode to match XBL rules.

This fixes bug 1405543.

MozReview-Commit-ID: Dv3mt3Fb8Yp

<!-- 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/18794)
<!-- Reviewable:end -->
2017-10-09 05:04:15 -05:00
Emilio Cobos Álvarez
100dd18307
style: use the XBL styleset quirks mode to match XBL rules.
This fixes bug 1405543.

MozReview-Commit-ID: Dv3mt3Fb8Yp
2017-10-09 11:30:37 +02:00
Emilio Cobos Álvarez
7e143372bd
style: Don't go through remove_cycles if there are no references in the specified values. 2017-10-09 09:22:28 +02:00
Emilio Cobos Álvarez
c354f224ff
style: Refactor the custom properties map to have less temporary hashmap entries. 2017-10-09 09:22:28 +02:00
Emilio Cobos Álvarez
1ecd942384
style: Rename CustomPropertiesBuilder::custom_properties to something more descriptive. 2017-10-09 09:22:27 +02:00
Emilio Cobos Álvarez
4914351f2b
style: Hoist cascade() to CustomPropertyBuilder. 2017-10-09 09:22:27 +02:00
Boris Chiou
df07ebde99 Use default Debug trait for AnimationValue.
We use AnimationValue for animation backend to do interpolation,
accumulation, or computing distance. While debugging it, dumping the
property name is not enough. We need to dump the detailed value contained
in it.
2017-10-09 14:06:06 +08:00
Bobby Holley
e5023a3eb4 Assert more things in hashtables.
MozReview-Commit-ID: H8jKywUewcZ
2017-10-08 22:40:34 -07:00
Nicholas Nethercote
7628c1236a Rename nsIAtom as nsAtom.
Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than
nsIAtom.
2017-10-09 09:27:11 +11:00
bors-servo
55a37930b2 Auto merge of #18783 - emilio:custom-props-builder, r=SimonSapin
style: Introduce CustomPropertiesBuilder.

I'm about to introduce more state here to implement optimizations for custom
property cascading, so this abstraction is useful to encapsulate that state.

<!-- 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/18783)
<!-- Reviewable:end -->
2017-10-08 09:50:04 -05:00
Emilio Cobos Álvarez
d0f080d5dd
style: Introduce CustomPropertiesBuilder.
I'm about to introduce more state here to implement optimizations for custom
property cascading, so this abstraction is useful to encapsulate that state.
2017-10-08 15:01:21 +02:00
bors-servo
712d32e899 Auto merge of #18758 - stuartnelson3:stn/dynamic-body-bgcolor, r=emilio
Add support for dynamic bgcolor change

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- 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/18758)
<!-- Reviewable:end -->
2017-10-08 07:47:50 -05:00
Emilio Cobos Álvarez
851b3e32bd
style: allow re-initializing thread_state as long as it's with the same value.
This unbusts running multiple rule-tree benchmarks at the same time.
2017-10-08 12:56:24 +02:00
Emilio Cobos Álvarez
8ea275a376
style: Avoid unused context argument.
In custom_properties::SpecifiedValue::parse.

It's not a big deal now, but it's useful to simplify testing this stuff, since
it avoids forcing us to mock it.
2017-10-08 12:56:24 +02:00
Bobby Holley
58322d0021 Add canary and journaling.
MozReview-Commit-ID: 582ZiTmcvgs
2017-10-07 12:54:17 -07:00
Bobby Holley
f5c5be00a7 Diagnostic map semantics.
MozReview-Commit-ID: C0a5g6xMPY0
2017-10-07 12:54:15 -07:00
bors-servo
438b9df00c Auto merge of #18773 - emilio:mc-cleanup, r=nox
style: Cleanup MatchingContext construction.

<!-- 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/18773)
<!-- Reviewable:end -->
2017-10-07 08:31:44 -05:00
Jyotsna Prakash
6c0f87a1d6 ChildrenOnly -> ChildrenOnly(Option<QualName>)
use this updated type from html5ever
2017-10-07 08:05:11 -04:00
Emilio Cobos Álvarez
b0706d5cf0
stylo: Add a mechanism to restrict media-features to UA and chrome sheets.
Reviewed-by: xidorn
Bug: 1396066
MozReview-Commit-ID: 38jRV6mPbE3
2017-10-07 13:13:36 +02:00
Emilio Cobos Álvarez
04b7386070
style: Update bindings. 2017-10-07 13:13:34 +02:00
Emilio Cobos Álvarez
36223fc16d
style: Cleanup MatchingContext construction. 2017-10-07 13:02:32 +02:00
Xidorn Quan
8fc24bc5fa Backout #18759 2017-10-07 12:27:04 +11:00
bors-servo
04f787dbf9 Auto merge of #18763 - emilio:transition-longhand-id, r=hiro,birtles
style: Check transitions per longhand to know which transitions to keep.

This fixes bug https://bugzilla.mozilla.org/show_bug.cgi?id=1406111

This fixes the fishy TransitionProperty mapping which I complained about in my
previous refactor.

Turns out that those properties could only be longhands, and thus the expansion
we did before that (and which I removed) was correct.

This fixes the bug by moving back to the previous correct behavior but using the
correct types.

The optimization to avoid creating a HashSet if we're transitioning all
properties or had no existing transition is removed since now we're creating a
LonghandIdSet, which is cheap, and that was only a performance optimization.

<!-- 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/18763)
<!-- Reviewable:end -->
2017-10-06 12:56:27 -05:00
bors-servo
cfca26a7e0 Auto merge of #18737 - paulrouget:rm_errno_location, r=emilio
remove android specific workaround

https://github.com/lfairy/rust-errno/pull/5 has landed.

I tested on Android. It runs.

<!-- 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/18737)
<!-- Reviewable:end -->
2017-10-06 10:09:40 -05:00
bors-servo
a468d05fff Auto merge of #18765 - emilio:unship-moz-se-transitioning, r=upsuper
stylo: Make :-moz-styleeditor-transitioning only valid in UA sheets.

Bug: 1396099
Reviewed-by: xidorn

<!-- 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/18765)
<!-- Reviewable:end -->
2017-10-06 05:28:28 -05:00
bors-servo
6421332fb3 Auto merge of #18764 - bradwerth:onlyDPPX, r=heycam
Change MediaExpressionValue::from_css_value to only accept pixels

MozReview-Commit-ID: Hn3twVa8xLo

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

---
<!-- 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
- [X] These changes do not require tests because existing tests provide coverage.

<!-- 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/18764)
<!-- Reviewable:end -->
2017-10-06 03:39:42 -05:00
Emilio Cobos Álvarez
4d8110c844
style: Simplify it even more. 2017-10-06 10:06:46 +02:00
Emilio Cobos Álvarez
c60b8288bc
style: Check transitions per longhand to know which transitions to keep.
This fixes the fishy TransitionProperty mapping which I complained about in my
previous refactor.

Turns out that those properties could only be longhands, and thus the expansion
we did before that (and which I removed) was correct.

This fixes the bug by moving back to the previous correct behavior but using the
correct types.

The optimization to avoid creating a HashSet if we're transitioning all
properties or had no existing transition is removed since now we're creating a
LonghandIdSet, which is cheap, and that was only a performance optimization.
2017-10-06 10:02:06 +02:00
bors-servo
117dbfaac2 Auto merge of #18767 - bzbarsky:fix-inputs-no-rules, r=heycam
Don't assume that inputs to compute_style_with_inputs have any rules.

It could be a text style, which never has any rules attached to it.

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

<!-- 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
- [X] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1406222

<!-- 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/18767)
<!-- Reviewable:end -->
2017-10-06 01:53:12 -05:00
Boris Zbarsky
b488b321ed Don't assume that inputs to compute_style_with_inputs have any rules.
It could be a text style, which never has any rules attached to it.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1406222
2017-10-05 23:16:14 -04:00
bors-servo
8338df1c70 Auto merge of #18754 - mbrubeck:unsafe-flow, r=nox
Use raw pointers instead of transmute for UnsafeFlow

This makes the code depend a bit less on rustc implementation details.

r? pcwalton

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they are refactoring only

<!-- 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/18754)
<!-- Reviewable:end -->
2017-10-05 21:24:24 -05:00
bors-servo
f3191db2b1 Auto merge of #18743 - Eijebong:base64, r=jdm
Bump base64 to 0.6

This allows us to update hyper to 0.10.13 (closer to 0.11)

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they're just a version bump

<!-- 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/18743)
<!-- Reviewable:end -->
2017-10-05 19:37:30 -05:00