Commit graph

16831 commits

Author SHA1 Message Date
bors-servo
4d95e2cd46 Auto merge of #18692 - emilio:cleanups, r=nox
style: multiple cleanups.

<!-- 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/18692)
<!-- Reviewable:end -->
2017-10-01 13:30:18 -05:00
Simon Sapin
b6bfdc982d Upgrade to rustc 1.22.0-nightly (c6884b12d 2017-09-30)
A new `AddAssign` impl in the standard library made inference ambiguous.
2017-10-01 14:54:59 +02:00
Emilio Cobos Álvarez
9305fadc9f
style: Remove unused ComputedValues::has_visited_style. 2017-10-01 13:27:17 +02:00
Emilio Cobos Álvarez
ab8dcf0a18
style: Rename get_visited_style to just visited_style. 2017-10-01 13:27:16 +02:00
Emilio Cobos Álvarez
d2dab24748
style: Remove boilerplate code in the properties module. 2017-10-01 13:27:16 +02:00
Emilio Cobos Álvarez
4933a54803
style: deduplicate some code in the ComputedValues code. 2017-10-01 13:27:15 +02:00
Emilio Cobos Álvarez
2adfd84636
style: Avoid being so Arc-happy in the custom properties code. 2017-10-01 13:27:15 +02:00
bors-servo
65d9b345bb Auto merge of #18684 - mrobinson:reflow-goal, r=emilio
Combine ReflowGoal and ReflowQueryType

This simplifies the logic in the layout_thread and makes it clearer
which types of reflows generate display lists and cause display updates.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they shouldn't change behavior.

<!-- 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/18684)
<!-- Reviewable:end -->
2017-09-30 14:15:41 -05:00
bors-servo
2567c40829 Auto merge of #18680 - MortimerGoro:android_flavors, r=larsbergstrom
Implement Gradle flavors for Android VR compilations

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

This PR adds support to easily generate Android VR builds. Rust/Java VR dependencies are not added by default.

Default build (No VR support)
```
./mach build --release --android
./mach package --release --android
./mach install --release --android
```

GoogleVR builds (e.g. Daydream)
```
./mach build --release --android --features googlevr
./mach package --release --android --flavor googlevr
./mach install --release --android
```

OculusVR builds (e.g. Gear VR)
```
./mach build --release --android --features oculusvr
./mach package --release --android --flavor oculusvr
./mach install --release --android
```

---
<!-- 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: -->
- [x] 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/18680)
<!-- Reviewable:end -->
2017-09-30 12:17:37 -05:00
Martin Robinson
0380431157 Combine ReflowGoal and ReflowQueryType
This simplifies the logic in the layout_thread and makes it clearer
which types of reflows generate display lists and cause display updates.
2017-09-30 16:06:48 +02:00
Emilio Cobos Álvarez
b7b22b76a8
style: Use PrecomputedHasher for custom properties. 2017-09-30 14:35:38 +02:00
Imanol Fernandez
e93130026a Implement Gradle flavors 2017-09-30 14:31:22 +02:00
Emilio Cobos Álvarez
497897ffc9
style: Update precomputed-hash. 2017-09-30 14:28:35 +02:00
bors-servo
81044e0019 Auto merge of #18612 - servo:event-listener-options, r=asajeffrey
Implement EventListenerOptions for EventTarget

<!-- 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/18612)
<!-- Reviewable:end -->
2017-09-29 19:13:36 -05:00
Guillaume Gomez
3d0b7fbc41 Implement EventListenerOptions for EventTarget
For now, only "capture" is supported.
2017-09-30 02:12:35 +02:00
Emilio Cobos Álvarez
3215e36b5b
style: Cleanup the animated value setup.
We have three different enums to represent slightly different things. Reuse them
properly, and kill some code in the animated_properties module while at it.

MozReview-Commit-ID: 5ZAly8f4lWy
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-29 13:20:50 +02:00
bors-servo
c6f4ced45c Auto merge of #18667 - Manishearth:bindingsup, r=emilio
Update debug bindings for removal of mFrameRefCnt

r=emilio from https://bugzilla.mozilla.org/show_bug.cgi?id=1403808

<!-- 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/18667)
<!-- Reviewable:end -->
2017-09-28 20:15:51 -05:00
bors-servo
5d2ac4aa2e Auto merge of #18668 - bholley:mprotect_diagnostics, r=Manishearth
Add mprotect diagnostics for HashMap crash

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/18668)
<!-- Reviewable:end -->
2017-09-28 19:10:46 -05:00
bors-servo
9bf588e76a Auto merge of #18664 - canaltinova:gradient-default-direction, r=emilio
stylo: Don't serialize default position on -moz- prefixed linear gradient

Normally, we should not serialize if the line direction points downwards. Unprefixed and
-webkit- prefixed syntaxes use only Keyword enum for line direction and we check them already.
But -moz- prefixed linear gradients can store position too. Therefore it's stored inside
`LineDirection::MozPosition` and we should check that for consistency between other gradients.

---
<!-- 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 [Bug 1396102](https://bugzilla.mozilla.org/show_bug.cgi?id=1396102)

<!-- 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/18664)
<!-- Reviewable:end -->
2017-09-28 17:07:18 -05:00
Bobby Holley
abd408433f Add a testing API.
This will allow us to verify the entire detection pipeline in real nightly
builds, which will give us confidence that real heap corruption will be
detected and reported properly.

MozReview-Commit-ID: 43Fp2HT8RYy
2017-09-28 15:06:50 -07:00
Bobby Holley
039fe176b9 Protect the hashmaps outside of rebuilds.
MozReview-Commit-ID: KACmfw4pZY2
2017-09-28 15:06:49 -07:00
Bobby Holley
ef042899d2 Round hashglobe allocations up to the nearest page size.
MozReview-Commit-ID: 34KFtcwCkBB
2017-09-28 15:06:48 -07:00
Bobby Holley
98f370130d Semantics for ProtectedHashMap.
MozReview-Commit-ID: K0m65uZi7iw
2017-09-28 14:13:01 -07:00
Bobby Holley
e2c0ca5110 Update bindings.
MozReview-Commit-ID: 8hyaJxfSi9L
2017-09-28 14:12:56 -07:00
Nazım Can Altınova
dfd12d78c6 stylo: Don't serialize default position on -moz- prefixed linear gradient
Normally, we should not serialize if the line direction points downwards. Unprefixed and
-webkit- prefixed syntaxes use only Keyword enum for line direction and we check them already.
But -moz- prefixed linear gradients can store position too. Therefore it's stored inside
`LineDirection::MozPosition` and we should check that for consistency between other gradients.
2017-09-29 00:06:18 +03:00
Manish Goregaokar
b19b9b78db Update debug bindings for removal of mFrameRefCnt 2017-09-28 13:19:51 -07:00
bors-servo
ffa03380ca Auto merge of #18580 - MortimerGoro:webgl_active_texture, r=jdm
Associate WebGL textures with texture units

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

Currently `bound_texture_2d` and `bound_texture_cube_map` fields are used to restore texture states and to get the current bindings in GetParams(...). But as soon as active texture is changed all the values can become dirty, leading to broken textures in some demos or invalid getParam(...) call results.

This PR implements the texture binding association with the texture units.

---
<!-- 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: -->
- [x] 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/18580)
<!-- Reviewable:end -->
2017-09-28 14:12:06 -05:00
Imanol Fernandez
b9710a59b5 Associate bound WebGLTextures with texture units. 2017-09-28 18:52:29 +02:00
bors-servo
056c085119 Auto merge of #18663 - servo:ROOT-ALL-THE-THINGS, r=jdm
Make DomRoot<T> a type alias of a more general Root<T> type

<!-- 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/18663)
<!-- Reviewable:end -->
2017-09-28 10:45:11 -05:00
bors-servo
2c73736f7d Auto merge of #18660 - upsuper:var-sub-inherit, r=emilio
Don't use inherited custom properties for substitution

<!-- Please describe your changes on the following line: -->
Custom properties from parent node has been considered in early stage of cascading them (in [`custom_properties::cascade`](01adcf69d7/components/style/custom_properties.rs (L461-L469))), and there is nothing in the spec stating that substitution should take inherited values into consideration when the value is invalid in the current node. Actually, there is a web-platform test explicitly checks that inherited value is not taken when the value is computed to invalid.

This would fix [bug 1402217](https://bugzilla.mozilla.org/show_bug.cgi?id=1402217).

---
<!-- 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/18660)
<!-- Reviewable:end -->
2017-09-28 09:06:48 -05:00
Anthony Ramine
dee38475b8 Make DomRoot<T> a type alias of a more general Root<T> type
This Root<T> relies on the concept of a stable trace object, which doesn't
move for the whole lifetime of the T value. For safety reasons, T must be 'static.

The only implementor of StableTraceObject for now is Dom<T>.
2017-09-28 15:42:43 +02:00
Xidorn Quan
dba19f53f5 Don't use inherited custom properties for substitution 2017-09-28 19:46:53 +10:00
Emilio Cobos Álvarez
f6a350b725
style: update bindings. 2017-09-28 10:03:58 +02:00
Emilio Cobos Álvarez
0ead078aa0
style: Simplify and remove some more code.
Bug: 1396073
Reviewed-by: xidorn
MozReview-Commit-ID: Ec9pfQw7U6W
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-28 09:58:45 +02:00
Emilio Cobos Álvarez
87dc00d54f
style: Remove :-moz-empty-except-children-with-local-name.
<applet> is not a thing anymore, and that selector in our UA sheet will never
match anyway, since an <applet> element will never have the BROKEN state.

Bug: 1396073
Reviewed-by: xidorn
MozReview-Commit-ID: 7UOMKOv55uJ
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-28 09:58:19 +02:00
Emilio Cobos Álvarez
abcd92ba9e
style: Hide :-moz-devtools-highlighted from anywhere but UA sheets.
It's always used from a UA sheet already.

Bug: 1396073
Reviewed-by: xidorn
MozReview-Commit-ID: J3poQuTD1C7
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-28 09:57:55 +02:00
Nazım Can Altınova
6ac5e9c3fa stylo: Handle quirks mode on font base sizes 2017-09-28 00:54:30 +03:00
Michael Layzell
47df1375c5 Stop allocating in fmt::Write for nsA[C]String 2017-09-27 13:51:02 -04:00
bors-servo
bad77b6a20 Auto merge of #18652 - emilio:xbl-stuff, r=TYLin
style: Fix various issues with XBL rule matching

See the commit details.

<!-- 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/18652)
<!-- Reviewable:end -->
2017-09-27 09:15:16 -05:00
Emilio Cobos Álvarez
19d34b96e5
style: Fix various issues with XBL rule matching.
We were using the wrong MatchingMode and flags setter just because we didn't
bother threading them down.

This patch fixes the issue seen with the video controls.

MozReview-Commit-ID: Il1WOzRDxI1
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-27 15:29:04 +02:00
bors-servo
807275d8ac Auto merge of #18653 - servo:ROOT-ALL-THE-THINGS, r=jdm
Move root-related things around so that the abstractions make more sense

<!-- 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/18653)
<!-- Reviewable:end -->
2017-09-27 08:09:57 -05:00
Anthony Ramine
b441f8a0f7 Kill RootCollectionPtr 2017-09-27 14:24:37 +02:00
Anthony Ramine
378babfd4c Move STACK_ROOTS to dom::bindings::root 2017-09-27 14:16:05 +02:00
bors-servo
aff99ef30b Auto merge of #18581 - GuillaumeGomez:update-mp3, r=KiChjang
Update mp3-metatada and thus audio-video-metadata

<!-- 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/18581)
<!-- Reviewable:end -->
2017-09-27 07:06:07 -05:00
Anthony Ramine
8d566fbc3c Move script_runtime::StackRootTLS to root::ThreadLocalStackRoots 2017-09-27 13:58:59 +02:00
Anthony Ramine
a6d01c92d9 Reorder things in dom::bindings::root
The type DomRoot<T> is now the first one defined in it.
2017-09-27 13:44:07 +02:00
Emilio Cobos Álvarez
d82e6926fc
style: Do not optimize out lazy pseudo rules if the main stylist doesn't have rules for it.
This could prevent an XBL binding to use some pseudo-elements fairly randomly.

MozReview-Commit-ID: b44DO8qcfD
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-27 13:29:36 +02:00
Hiroyuki Ikezoe
08574b8c4d Update bindings. 2017-09-27 18:27:58 +09:00
Hiroyuki Ikezoe
5481d8ed6f Compute css variables with custom properties in keyframes for getKeyframes() 2017-09-27 18:27:57 +09:00
Hiroyuki Ikezoe
1b39041a8c Factor custom properties in keyframes into compute values in each keyframe 2017-09-27 18:27:55 +09:00