Commit graph

29657 commits

Author SHA1 Message Date
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
bors-servo
715fc9cea6 Auto merge of #18786 - nnethercote:bug-1400460, r=froydnj
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.

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

This is the Servo-side PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1400460.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because testing is on the Gecko side.

<!-- 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/18786)
<!-- Reviewable:end -->
2017-10-08 19:10:40 -05: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
bors-servo
47efcd5e52 Auto merge of #18781 - emilio:custom-props-bench, r=heycam
style: Add a simple custom properties benchmark.

This is going to help the work in bug 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/18781)
<!-- Reviewable:end -->
2017-10-08 06:04:28 -05:00
Emilio Cobos Álvarez
99d241d517
style: Add a simple custom properties benchmark. 2017-10-08 13:03:38 +02: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
Stuart Nelson
c886e3ee75 Update manifest and move files 2017-10-08 11:29:49 +02:00
bors-servo
3f4afbafab Auto merge of #18779 - bholley:canary_and_journal, r=Manishearth
DiagnosticHashMap

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

<!-- 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/18779)
<!-- Reviewable:end -->
2017-10-07 14:55:03 -05: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
Mateusz Naściszewski
35b7527db6
Improved headless Servo performance
Now the main thread doesn't waste 100% CPU
2017-10-07 15:44:26 +02: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
bors-servo
72834c3482 Auto merge of #18774 - emilio:ua-sheets-mq, r=xidorn
stylo: Add a mechanism to restrict media-features to UA and chrome sheets
2017-10-07 06:16:45 -05: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
Stuart Nelson
aff8b0a4e9 add help link and regen manifest 2017-10-07 11:34:00 +02:00
bors-servo
8dece5e74e Auto merge of #18772 - upsuper:backout-unshipping, r=backout
Backout #18759

<!-- 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/18772)
<!-- Reviewable:end -->
2017-10-06 20:31:52 -05: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
7188b34858 Auto merge of #18766 - glennw:update-wr-drv-op-clip-rad, r=pcwalton
Update WR.

* Support border radii clips on radial gradients.
* Optimizations to DL building time.
* Remove deprecated nested DL APIs.
* Another mac driver bug workaround.

<!-- 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/18766)
<!-- Reviewable:end -->
2017-10-06 07:40:59 -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
bors-servo
2de0e5f99e Auto merge of #18760 - servo:rustup, r=nox
Upgrade to rustc 1.22.0-nightly (d7e73e4b1 2017-10-04)

This version fixes large regressions in incremental compilation performance.

<!-- 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/18760)
<!-- Reviewable:end -->
2017-10-05 23:51:48 -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
Glenn Watson
1a7c146a8b Update WR (radial gradient + clip, glyph cache opts, remove nested APIs). 2017-10-06 12:22:25 +10: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
bors-servo
90d0afc614 Auto merge of #18759 - emilio:keep-unshipping-dont-stop, r=upsuper
stylo: Keep unshipping stuff.

From bug 1396066

<!-- 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/18759)
<!-- Reviewable:end -->
2017-10-05 17:54:57 -05:00
bors-servo
0444d76c6b Auto merge of #18742 - servo:media-metadata, r=jdm
Some low-key media improvements

This just makes our code fail more gracefully.

<!-- 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/18742)
<!-- Reviewable:end -->
2017-10-05 15:41:22 -05:00
Emilio Cobos Álvarez
3916257db7
style: Update bindings. 2017-10-05 20:51:42 +02:00
Emilio Cobos Álvarez
43636e676d
stylo: Restrict system-metric media features to UA and chrome sheets only. r=xidorn
Reviewed-by: xidorn
Bug: 1396066
MozReview-Commit-ID: 38jRV6mPbE3
2017-10-05 20:51:21 +02:00
Emilio Cobos Álvarez
8ec805874d
stylo: Restrict :-moz-system-metric to chrome and ua sheets. r=xidorn
Bug: 1396066
Reviewed-by: xidorn
MozReview-Commit-ID: AyHWP3QgGlA
2017-10-05 20:51:20 +02:00
Stuart Nelson
1977352bff Simplify and move ref test 2017-10-05 20:51:03 +02:00
Stuart Nelson
3b4deb4388 Add support for dynamic bgcolor change 2017-10-05 20:51:02 +02:00
Emilio Cobos Álvarez
e513aefa8c
stylo: Make :-moz-styleeditor-transitioning only valid in UA sheets.
Bug: 1396099
Reviewed-by: xidorn
2017-10-05 20:40:46 +02:00
Brad Werth
61b9b68278 Change MediaExpressionValue::from_css_value to only accept one type of unit (pixels).
MozReview-Commit-ID: Hn3twVa8xLo
2017-10-05 11:12:56 -07:00
bors-servo
f2879a568d Auto merge of #18753 - upsuper:binding-structs, r=emilio
Only generate structs file for the current build

This PR changes build_gecko.rs to only generate the `structs.rs` for the current build (rather than both), depending on whether `gecko_debug` feature is set.

The in-tree files are switched to use the previous release one, because that's what we currently use for stylo test and it is in general what we really care about. For this change, `gecko_debug` mode is removed from Servo CI (in `build-geckolib`) with the assumption that people general do that build locally for stylo development, so it is less likely to be broken than release.

<!-- 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/18753)
<!-- Reviewable:end -->
2017-10-05 11:24:22 -05:00
bors-servo
00a2f55e5f Auto merge of #18761 - emilio:custom-props-iter, r=SimonSapin
style: Iterate in the expected order in the custom_properties module.

In #18745, I replaced a few manual iterations over `index` with the iterator,
and it changed the behavior of `layout/style/test/test_variables_order.html`,
since it turns out that the iterator iterates right to left.

I think this is just an accident that happened due to inconsistencies in how we
were iterating over it, and that our behavior was inconsistent (since we
iterated rtl in some cases, but ltr in others seems like it'd be inconsistent
depending on the depth of the tree and different stuff).

This brings back the expected behavior again, and ensures we iterate over a
consistent order every time.

<!-- 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/18761)
<!-- Reviewable:end -->
2017-10-05 09:22:24 -05:00
bors-servo
139055fca3 Auto merge of #18756 - servo:wptup, r=jgraham
Update web-platform-tests

This updates web-platform-tests to a46616a5b18e. It also removes our local copy of wptrunner in favour of the upstream one that we can modify and sync more easily. Carried from #17416.

<!-- 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/18756)
<!-- Reviewable:end -->
2017-10-05 07:38:38 -05:00