Commit graph

19254 commits

Author SHA1 Message Date
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
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
Emilio Cobos Álvarez
72497330a9
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.
2017-10-05 14:08:04 +02:00
bors-servo
35e84c5cdf Auto merge of #18752 - emilio:cc-parent, r=bzbarsky
style: Use the flattened tree parent to find the closest non-nac ancestor of an element.

This only matters for document level NAC like canvas custom content, in which
case otherwise we inherit from the document element (which is wrong).

Bug: 1405635

<!-- 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/18752)
<!-- Reviewable:end -->
2017-10-05 05:49:06 -05:00
bors-servo
9bf299bba9 Auto merge of #18745 - emilio:custom-props-less-unwrap, r=nox
style: Custom properties cleanup.

Use less unwrap and custom types in custom properties.

The idea is for this to shed some light in https://bugzilla.mozilla.org/show_bug.cgi?id=1403845.

<!-- 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/18745)
<!-- Reviewable:end -->
2017-10-05 02:18:52 -05:00
bors-servo
2bbc458c5b Auto merge of #18751 - bholley:poison_hashtable, r=Manishearth
Poison hashtable buffers

This gives us extra defense in depth.

<!-- 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/18751)
<!-- Reviewable:end -->
2017-10-04 23:54:56 -05:00
Xidorn Quan
23d9d12430 Only generate structs file for the current build 2017-10-05 15:29:32 +11:00
Matt Brubeck
ae67eb5fe3 Use raw pointers instead of transmute for UnsafeFlow 2017-10-04 20:00:31 -07:00
bors-servo
43686a8738 Auto merge of #18734 - Manishearth:stylo-all, r=upsuper
stylo: `all` shorthand should not apply to internal properties

r=xidorn https://bugzilla.mozilla.org/show_bug.cgi?id=1404057

<!-- 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/18734)
<!-- Reviewable:end -->
2017-10-04 20:57:24 -05:00
Emilio Cobos Álvarez
6f836bed5a
style: Use the flattened tree parent to find the closest non-nac ancestor of an element.
This only matters for document level NAC like canvas custom content, in which
case otherwise we inherit from the document element (which is wrong).

Bug: 1405635
2017-10-05 01:07:05 +02:00
Bobby Holley
c866486b99 Poison hashtable buffers.
MozReview-Commit-ID: 8uLGtFv6X4P
2017-10-04 15:59:04 -07:00
bors-servo
2268546515 Auto merge of #18735 - glennw:update-wr-angle-clips, r=mbrubeck
Update WR (clip masks on angle gradients, fix clips on transformed images).

<!-- 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/18735)
<!-- Reviewable:end -->
2017-10-04 17:09:40 -05:00
Glenn Watson
bcd74053a8 Update WR (clip masks on angle gradients, fix clips on transformed images). 2017-10-05 08:00:03 +10:00
bors-servo
3f07cfec7c Auto merge of #18733 - bradwerth:nativeDPPX, r=heycam
Change resolution queries to compare in unconverted dppx units.

MozReview-Commit-ID: 7wYlixTQTIC

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

---
<!-- 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 the tests are in Gecko

<!-- 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/18733)
<!-- Reviewable:end -->
2017-10-04 15:31:17 -05:00
bors-servo
1a84dd594b Auto merge of #18719 - hiikezoe:use-normal-declaration-iterator, r=emilio
Use NormalDeclarationIterator for AnimationValueIterator

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

<!-- 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/18719)
<!-- Reviewable:end -->
2017-10-04 11:56:42 -05:00
bors-servo
b1c2d7195d Auto merge of #18702 - paulrouget:android_res_path, r=Manishearth
do not force resource_path on android

I want to be able to configure the resource path via `set_resources_path`.

<!-- 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/18702)
<!-- Reviewable:end -->
2017-10-04 10:34:52 -05:00
Emilio Cobos Álvarez
089d5eecb7
style: Reformat the substitute_block function. 2017-10-04 14:55:23 +02:00
Emilio Cobos Álvarez
c4dbbf0656
style: Use map_or instead of map(..) == Some(false). 2017-10-04 14:53:05 +02:00
Emilio Cobos Álvarez
583d89ac08
style: Use the OrderedMap iterator instead of doing our own thing. 2017-10-04 14:51:53 +02:00
Emilio Cobos Álvarez
f072c0bb05
style: Use the hashmap indexed getter in the custom props iterator code.
This will give a nicer error message, plus it's more compact.
2017-10-04 14:51:52 +02:00
Emilio Cobos Álvarez
08fd5ba8c1
style: Use Option<&mut> instead of &mut Option in custom_properties.rs 2017-10-04 14:51:51 +02:00
bors-servo
1f9182507f Auto merge of #18716 - jdm:parseSrcset, r=jdm
Parse srcset attribute values

Squashed version of #18313.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix (partially) #11416
- [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/18716)
<!-- Reviewable:end -->
2017-10-04 07:32:53 -05:00
Bastien Orivel
511a4d65a2 Bump base64 to 0.6
This allows us to update hyper to 0.10.13 (closer to 0.11)
2017-10-04 13:26:12 +02:00
bors-servo
3b7a82b8c7 Auto merge of #18722 - heycam:family-list, r=upsuper
style: Use a SharedFontList object to store font-family values for Gecko

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

---
<!-- 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 #__ (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/18722)
<!-- Reviewable:end -->
2017-10-04 05:01:45 -05:00
Anthony Ramine
eb0c1a53ad Implement MediaError::Message
The spec says that it's ok to put an empty string in it if we don't have more
informations.
2017-10-04 11:41:41 +02:00
Anthony Ramine
b8c55e7da6 Set have_metadata for audio elements too
We don't store video-specific metadata anymore, and we don't ignore audio-specific
metadata anymore. We now just acknowledge that we received some metadata.
2017-10-04 11:28:47 +02:00
bors-servo
f044fa4e9f Auto merge of #18741 - servo:no-step, r=nox
Remove usage the unstable Step trait

<!-- 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/18741)
<!-- Reviewable:end -->
2017-10-04 03:12:33 -05:00
Simon Sapin
b77bdf1818 Remove usage the unstable Step trait 2017-10-04 10:10:04 +02:00
Cameron McCormack
fde77ee693 style: Regenerate Gecko bindings. 2017-10-04 13:38:07 +08:00
Cameron McCormack
4d9dd4b757 style: Use a SharedFontList object to store font-family values for Gecko. 2017-10-04 13:38:07 +08:00
bors-servo
c0f404999c Auto merge of #18736 - nnethercote:bug-1403506, r=erahm,mystor
Remove nsTFixedString<T>.

This is for https://bugzilla.mozilla.org/show_bug.cgi?id=1403506, which is r=erahm,mystor.

<!-- 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=1403506.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they are tested in Gecko.

<!-- 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/18736)
<!-- Reviewable:end -->
2017-10-03 23:21:18 -05:00
Paul Rouget
8f04b71f3b remove workaround 2017-10-04 05:34:06 +02:00
Nicholas Nethercote
365ae0b637 Remove nsTFixedString<T>.
nsTFixedString<T> is only used as a base class for nsTAutoStringN<T, N>, so
this patch merges the former into the latter, cutting some code and simplifying
the string class hierarchy.

Because the "Fixed" name is now gone, the patch also renames
StringDataFlags::FIXED as INLINE and ClassDataFlags::FIXED as INLINE.

The patch also removes nsFixed[C]String and ns_auto_[c]string! from Rust code
because nsAutoString can't be implemented directly in Rust due to its move
semantics. There were only two uses of ns_auto_string! outside of tests so this
seems like a minor loss.
2017-10-04 13:31:09 +11:00
bors-servo
a4f642185e Auto merge of #18728 - emilio:rayonup, r=jdm
style: Update rayon.

It has a couple soundness fixes.

<!-- 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/18728)
<!-- Reviewable:end -->
2017-10-03 20:34:09 -05:00
Manish Goregaokar
aac31a35d7
stylo: all shorthand should not apply to internal properties 2017-10-03 18:01:57 -07:00
Manish Goregaokar
8bce37e6ba stylo: use FnvHashMap everywhere, remove default HashMap construction methods 2017-10-03 14:10:31 -07:00
Brad Werth
b8e78d20bf Change resolution queries to compare in unconverted dppx units.
MozReview-Commit-ID: 7wYlixTQTIC
2017-10-03 13:56:14 -07:00
bors-servo
0b69887387 Auto merge of #18732 - bholley:revert_mprotect_diagnostics, r=bholley
Revert #18668 - Add mprotect diagnostics for HashMap crash (except for round-up-to-page behavior).

These diagnostics have served their purpose, time to remove them.

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

<!-- 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/18732)
<!-- Reviewable:end -->
2017-10-03 14:45:33 -05:00
Bobby Holley
15b866d8de Revert #18668 - Add mprotect diagnostics for HashMap crash 2017-10-03 12:44:26 -07:00
bors-servo
3dc4614991 Auto merge of #18696 - emilio:ua-sheets-reflow, r=jdm
layout_thread: Avoid adding the UA sheets multiple times when there's no root flow.

<!-- 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/18696)
<!-- Reviewable:end -->
2017-10-03 12:46:53 -05:00
bors-servo
eff768679d Auto merge of #18414 - jdm:animdecl-codesize, r=SimonSapin
Reduce the size of AnimationValue code

According to bloaty, these commits shave off 25k from code in the animated_properties module.

---
- [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/18414)
<!-- Reviewable:end -->
2017-10-03 11:25:28 -05:00
bors-servo
e07c6f38a5 Auto merge of #18725 - mrobinson:tick-animation-display-list, r=jdm
TickAnimations should create a display list

This is a regression from the removal of ReflowQueryType.

Fixes #18701.

<!-- 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 #18701  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because this should fix tests currently failing on the build infrastructure, but the failures seem to be very timing dependent.

<!-- 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/18725)
<!-- Reviewable:end -->
2017-10-03 10:21:23 -05:00