Commit graph

33063 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
92b856b70a
style: Reuse computed rotate animation.
I have the feeling this fixes a bug, but...

Bug: 1464615
Reviewed-by: hiro
MozReview-Commit-ID: Aj478qCbMV9
2018-05-28 16:02:31 +02:00
Emilio Cobos Álvarez
2e500d70ef
style: Match rotate ops.
Per bug 1322189 we really should. I've copied the setup we have already for
translate / scale, but we should really clean this up a bit more I'd think.

In any case, probably skew should be matched as well...

Bug: 1464615
Reviewed-by: hiro
MozReview-Commit-ID: Jky5k8HVfuH
2018-05-28 16:02:31 +02:00
Emilio Cobos Álvarez
01f805af9f
style: Make the general setup for computed style bits nicer.
This patch:

 * Makes StyleStructID an enum class, and moves it to the mozilla namespaces.

 * Introduces StyleStructConstants with some constants scattered through the
   codebase.

 * Makes the computed style bits an enum class, and splits mPseudoType and mBits
   into their own members, since we were using a uint64_t when we have only a
   couple flags and CSSPseudoElementType is a byte. We statically assert that
   the number of style structs is less or equal to 32.

 * Makes mPseudoTag, mPseudoType and mBits const, since we don't want them to be
   mutated from C++, and we still need a few more refactorings (mostly getting
   rid of FinishStyle) to avoid mutating ComputedStyle instead.

Bug: 1464060
Reviewed-by: xidorn
MozReview-Commit-ID: 7qsTtASGcYB
2018-05-28 16:02:31 +02:00
Emilio Cobos Álvarez
6b19318cc8
style: Remove a bunch of unused style bits.
Bug: 1464060
MozReview-Commit-ID: FLACqfSHfSO
2018-05-28 15:39:28 +02:00
Emilio Cobos Álvarez
2c1ec89943
style: Cleanup single transform functions that can't really error.
Also call them "resolve" since it's the general term for computing something
more specific than what you have.

Though I don't feel strongly about that, feel free to push back.

Bug: 1464595
Reviewed-by: hiro
MozReview-Commit-ID: KtqjzlppZLp
2018-05-28 15:39:13 +02:00
Emilio Cobos Álvarez
8ad595666f
style: Use a static atom instead of a dynamic one.
MozReview-Commit-ID: CUTwfsCrovQ
2018-05-28 15:39:06 +02:00
Emilio Cobos Álvarez
a360dbf98d
style: Remove dead and unsafe code.
MozReview-Commit-ID: 9seuLNCJAqz
2018-05-28 15:38:56 +02:00
Xidorn Quan
8f367be650
style: Don't generate catch-all branch if a image layer keyword value is exhaustive.
Bug: 1463978
Reviewed-by: emilio
MozReview-Commit-ID: H8T9Low6kqY
2018-05-28 15:38:40 +02:00
Xidorn Quan
6306cc7e2d
style: Ensure modified_reset is set when {mutate,take}_reset_struct is called.
Bug: 1463603
Reviewed-by: heycam
MozReview-Commit-ID: 8mqVb7kl0ok
2018-05-28 15:38:22 +02:00
Emilio Cobos Álvarez
5fc6b47d74
followup: Add a comment regarding why a type is generic.
Bug: 1462829
Rubber-stamped-by: xidorn
MozReview-Commit-ID: 5DE8W2n1NP
2018-05-28 15:38:04 +02:00
Olli Pettay
f82bf81f8e
style: Make mBindingParent strong.
Bug: 1463116
Reviewed-by: bz
2018-05-28 15:37:47 +02:00
Emilio Cobos Álvarez
32c6d5b7c6
style: Refactor vector types.
This fixes clamping of mask-size and moves it out of mako while at it.

Bug: 1462829
Reviewed-by: hiro,xidorn
MozReview-Commit-ID: 9hiTe63odna
2018-05-28 15:37:28 +02:00
Xidorn Quan
3016a7f552
style: Add scrollbar-{face,track}-color properties.
Bug: 1460456
Reviewed-by: heycam
MozReview-Commit-ID: ImNfHHfzRdM
2018-05-28 15:37:12 +02:00
Xidorn Quan
1b236bf620
style: Rename CaretColor to ColorOrAuto for reusing.
Bug: 1460456
Reviewed-by: heycam
MozReview-Commit-ID: LD6PlNI60GC
2018-05-28 15:36:55 +02:00
tigercosmos
423d417dd7 fix logic in overflow_direction, also add a FIXME 2018-05-26 10:31:26 -07:00
bors-servo
4e6b100c7e
Auto merge of #20864 - tigercosmos:aa1, r=emilio
remove misleading spec url

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

`pub fn scroll_area(&self)` in `node.rs` is only called by `fn ScrollHeight(&self)` and `fn ScrollWidth(&self)` in `element.rs`.

`scrolltop` and `scrollleft` are actually implemented in `element.rs`.

The misleading spec urls should be 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/20864)
<!-- Reviewable:end -->
2018-05-26 09:29:25 -04:00
tigercosmos
393aa06e5b remove misleading url 2018-05-26 06:17:56 -07:00
bors-servo
ab39f6dbc7
Auto merge of #20858 - tigercosmos:yy1, r=jdm
move test `dom-element-scroll.html` from mozilla to wpt

<!-- Please describe your changes on the following line: -->
The test `dom-element-scroll.html` was originally landed on #19127.
It was designed for testing `scrollLeft` and `scrollTop`.
It is not only for servo. I thought I put a wrong place at that time. It should not be under `mozilla`. It's better placed under `wpt`.

<!-- 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/20858)
<!-- Reviewable:end -->
2018-05-25 08:21:14 -04:00
bors-servo
91a27ea277
Auto merge of #20857 - servo:simd, r=nox
Use std::simd instead of the simd 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/20857)
<!-- Reviewable:end -->
2018-05-25 04:15:07 -04:00
bors-servo
c35379c683
Auto merge of #20861 - servo-wpt-sync:wpt_update_24-05-2018, r=jdm
Sync WPT with upstream (24-05-2018)

Automated downstream sync of changes from upstream as of 24-05-2018.
[no-wpt-sync]

<!-- 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/20861)
<!-- Reviewable:end -->
2018-05-25 02:29:38 -04:00
tigercosmos
0069cdb0a4 move to wpt 2018-05-25 14:12:16 +08:00
bors-servo
31f91ec3e1
Auto merge of #20854 - servo:webgl, r=emilio
Drive-by fixes in WebGL

<!-- 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/20854)
<!-- Reviewable:end -->
2018-05-25 00:45:33 -04:00
bors-servo
f63284efc0
Auto merge of #20841 - aneeshusa:increase-taskcluster-runtime, r=jdm
Increase taskcluster runtime

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

Based on the Taskcluster log for
(https://taskcluster-artifacts.net/HkxDh1oKQceXH1fL9RSGow/0/public/logs/live_backing.log),
it looks like the job is running successfully but hitting the max time limit.

Our builds + tests shouldn't take this long to run normally,
but we'll need to set up sccache with cache uploading/downloading
in order to improve most build times.

For now, bump the max run time to 2 hours;
since we complete one build + som tests within an hour,
2 hours should be enough for the second build to finish as well.

Also, add `set -x` for easier debugging.

---
<!-- 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 are trying to fix the testing infra

<!-- 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/20841)
<!-- Reviewable:end -->
2018-05-24 23:31:44 -04:00
WPT Sync Bot
7ddb44a302 Update web-platform-tests to revision a89693b62066da0e4808c0bc76c581188398e73d 2018-05-24 23:21:05 -04:00
bors-servo
7637d2daa1
Auto merge of #20860 - jdm:revertcssparser, r=jdm
Revert "Dedupe syn, quote and unicode-xid"

This reverts commit e1fe47a7fc. The intermittent build failure struck again after it merged.

<!-- 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/20860)
<!-- Reviewable:end -->
2018-05-24 22:01:47 -04:00
Josh Matthews
1ace97030a Revert "Dedupe syn, quote and unicode-xid"
This reverts commit e1fe47a7fc.
2018-05-24 19:11:33 -04:00
bors-servo
6ad085be59
Auto merge of #20749 - mbrubeck:pinch, r=glennw
Basic pinch zoom handling

r? glennw

Basic fix for #20387 and #20109.  Note: Without calling `generate_frame`
when updating Webrender's pinch zoom level, rendering doesn't happen
reliably during/after a pinch zoom gesture.  I'm not sure whether this
is the correct way to fix that or not.

<!-- 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/20749)
<!-- Reviewable:end -->
2018-05-24 19:07:51 -04:00
Matt Brubeck
baf7dbf064 Basic pinch zoom handling 2018-05-24 14:42:46 -07:00
bors-servo
1e79f27cd4
Auto merge of #20853 - servo-wpt-sync:wpt_update_23-05-2018, r=nox
Sync WPT with upstream (23-05-2018)

⚠️ Do not merge this PR without verifying that it is not overwriting local changes to web-platform-tests. ⚠️

Automated downstream sync of changes from upstream as of 23-05-2018.
[no-wpt-sync]

<!-- 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/20853)
<!-- Reviewable:end -->
2018-05-24 16:44:16 -04:00
Simon Sapin
266cb29788 Use std::simd instead of the simd crate 2018-05-24 17:39:38 +02:00
bors-servo
f6762d54e2
Auto merge of #20707 - gterzian:embedder_handling_of_prompts_and_alerts_2, r=payl
Embedder handling of prompts and alerts

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

Allow embedder to allow alerts and prompts, but via constellation forwarding messages from script.

---
<!-- 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 build-geckolib` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #19992  (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/20707)
<!-- Reviewable:end -->
2018-05-24 10:34:48 -04:00
bors-servo
62c37e00ab
Auto merge of #20649 - Eijebong:taskcluster_ruined_all_the_fun, r=SimonSapin
Dedupe syn, quote and unicode-xid

Dupe num-traits instead...

Fixes #20609
Fixes #20497
Fixes #19786
Closes #20564

<!-- 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/20649)
<!-- Reviewable:end -->
2018-05-24 09:19:27 -04:00
Gregory Terzian
a5dc1b6764 fix url input for android 2018-05-24 21:01:54 +08:00
Bastien Orivel
e1fe47a7fc Dedupe syn, quote and unicode-xid
Fixes #20609
Fixes #20497
Fixes #19786
Closes #20564
2018-05-24 13:01:14 +02:00
bors-servo
d6c4c743fb
Auto merge of #20771 - servo:webgl, r=emilio
Implement most of the unsupported parameters in gl.getParameter()

Fixes #20536.
Fixes #20537.
Fixes #20538.
Fixes #20544.
Fixes #20545.
Fixes #20546.
Fixes #20548.
Fixes #20549.
Fixes #20551.

<!-- 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/20771)
<!-- Reviewable:end -->
2018-05-24 06:32:40 -04:00
Anthony Ramine
3e510ec008 Implement most of the unsupported parameters in gl.getParameter()
Fixes #20536.
Fixes #20537.
Fixes #20538.
Fixes #20544.
Fixes #20545.
Fixes #20546.
Fixes #20548.
Fixes #20549.
Fixes #20551.
2018-05-24 12:32:15 +02:00
Anthony Ramine
b523267349 Move WebGLVertexArrayObjectOES to script::dom
It's not a WebGL extension itself, it's just used by one.
2018-05-24 12:12:23 +02:00
Anthony Ramine
54f88b5eaf Add OESElementIndexUint to WebGLExtensions::register_all_extensions 2018-05-24 12:09:58 +02:00
WPT Sync Bot
6b4094e2a4 Update web-platform-tests to revision 314de955a5102650136404f6439f22f8d838e0f4 2018-05-23 22:49:09 -04:00
bors-servo
0cad37718d
Auto merge of #20840 - fabricedesre:save-localstorage, r=Manishearth
Save local storage at every change and not just on shutdown

<!-- Please describe your changes on the following line: -->
Currently local storage is saved to `local_data.json` only at shutdown when the storage thread receives the `StorageThreadMsg::Exit` message. This is not reliable enough in any case, and especially problematic for a young engine like Servo. Data loss ensues...

I kept the exit message in the storage thread even if we are not doing work anymore. I can remove it if needed but it should be useful once we move to a better storage backend than a json file.

---
<!-- 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 we don't have tests for that persistence layer.

<!-- 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/20840)
<!-- Reviewable:end -->
2018-05-23 15:40:30 -04:00
bors-servo
521748c01e
Auto merge of #20472 - jdm:android-x86-2, r=mbrubeck
Support i686-linux-android target for android-x86 emulator

The first commit allows `./mach build --target=i686-linux-android` to build successfully. The second commit is temporary as I attempt to find the cause of the mysterious crash that takes down the browser.

<!-- 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/20472)
<!-- Reviewable:end -->
2018-05-23 11:53:39 -04:00
Josh Matthews
d6b8aaf576 Support i686-linux-android target. 2018-05-23 11:06:19 -04:00
Gregory Terzian
2812b3cf4a send message to embedder in prompt_to_unload 2018-05-23 21:46:05 +08:00
Gregory Terzian
4234b1252a move top_level_browsing_context_id out of embedder msg 2018-05-23 21:46:05 +08:00
Gregory Terzian
d438240772 move msg to embedder_traits, use in script, handle send error in embedder 2018-05-23 21:45:57 +08:00
bors-servo
687459a726
Auto merge of #20851 - servo-wpt-sync:wpt_update_22-05-2018, r=jdm
Sync WPT with upstream (22-05-2018)

Automated downstream sync of changes from upstream as of 22-05-2018.
[no-wpt-sync]

<!-- 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/20851)
<!-- Reviewable:end -->
2018-05-23 09:09:27 -04:00
WPT Sync Bot
9d36d960d0 Update web-platform-tests to revision 347a7974c93326910109cd0f3386cc427add4ec5 2018-05-22 23:18:56 -04:00
Gregory Terzian
57c0d82944 prevent overwriting of salvageable state in later prompt/unload steps 2018-05-22 18:11:45 +08:00
bors-servo
d4df55b417
Auto merge of #20845 - servo-wpt-sync:wpt_update_21-05-2018, r=jdm
Sync WPT with upstream (21-05-2018)

Automated downstream sync of changes from upstream as of 21-05-2018.
[no-wpt-sync]

<!-- 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/20845)
<!-- Reviewable:end -->
2018-05-22 01:02:14 -04:00
bors-servo
f8a96ad5d6
Auto merge of #20729 - jdm:cleanmanifest, r=kichjang
Don't suppress the result of checking the WPT manifest.

This was a mistake I introduced in 8b378120a4.

<!-- 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/20729)
<!-- Reviewable:end -->
2018-05-21 23:35:07 -04:00