Commit graph

32161 commits

Author SHA1 Message Date
bors-servo
aa8fb3a204
Auto merge of #20252 - NeverHappened:extract_text_emphasis_style, r=upsuper
Extract text emphasis style

<!-- Please describe your changes on the following line: -->
Extracted the text-emphasis-style property out of the inherited_text.mako.rs.
This is a part of #19015

---
<!-- 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] `./mach cargo-geckolib check` does not report any errors
- [X] These changes fix #19940 (github issue number if applicable).

<!-- Either: -->
- [X] These changes do not require tests because it's a refactoring

<!-- 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/20252)
<!-- Reviewable:end -->
2018-03-09 19:20:10 -05:00
bors-servo
95f9e14e67
Auto merge of #20262 - emilio:webgl-fallible, r=jdm
constellation: Make setting up the WebGL state fallible.

This fixes a regression caused by the glutin update.

We now are creating EGL contexts in Linux Wayland, instead of X context, so the
GLContextFactory assumption of one GL back-end per platform is broken.

This just works around it, for now, but in general I think not relying on
available WebGL state is a good thing, and we do that already for WebVR anyway.

<!-- 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/20262)
<!-- Reviewable:end -->
2018-03-09 18:24:56 -05:00
bors-servo
909ebff184
Auto merge of #20258 - servo:derive-all-the-things, r=emilio
Continue to improve style_derive

<!-- 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/20258)
<!-- Reviewable:end -->
2018-03-09 17:29:05 -05:00
Emilio Cobos Álvarez
21df4014db
constellation: Make setting up the WebGL state fallible.
This fixes a regression caused by the glutin update.

We now are creating EGL contexts in Linux Wayland, instead of X context, so the
GLContextFactory assumption of one GL back-end per platform is broken.

This just works around it, for now, but in general I think not relying on
available WebGL state is a good thing, and we do that already for WebVR anyway.
2018-03-09 23:27:29 +01:00
Dmitry
a1dd888c23 Rename entities that belong to text-emphasis-style value. Fix order of imports 2018-03-09 20:55:26 +03:00
Anthony Ramine
68be1aae8c Kill fmap_output_type 2018-03-09 18:55:26 +01:00
Anthony Ramine
4d0bf2ddf9 Opt into field bounds for #[derive(ToComputedValue)] 2018-03-09 18:54:59 +01:00
bors-servo
7ccc58e3ae
Auto merge of #20255 - emilio:place-items, r=xidorn
style: Fix serialization of place-items.

If the justify-items / align-items value has the `legacy` bit or anything like
that we shouldn't serialize it, just as we don't parse it.

Bug: 1339656
Reviewed-by: xidorn
MozReview-Commit-ID: JsM4NrePEU6

<!-- 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/20255)
<!-- Reviewable:end -->
2018-03-09 09:49:57 -05:00
Anthony Ramine
2efd06c12d Remove #[compute(clone)] 2018-03-09 15:45:34 +01:00
Anthony Ramine
92068ca540 Simplify the derived bounds for ToAnimatedValue 2018-03-09 15:11:45 +01:00
Emilio Cobos Álvarez
3fc5bf87d3
style: Fix serialization of place-items.
If the justify-items / align-items value has the `legacy` bit or anything like
that we shouldn't serialize it, just as we don't parse it.

Bug: 1339656
Reviewed-by: xidorn
MozReview-Commit-ID: JsM4NrePEU6
2018-03-09 14:48:43 +01:00
bors-servo
63ab4f73f1
Auto merge of #20253 - servo-wpt-sync:wpt_update_08-03-2018, r=jdm
Sync WPT with upstream (08-03-2018)

Automated downstream sync of changes from upstream as of 08-03-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/20253)
<!-- Reviewable:end -->
2018-03-09 08:48:17 -05:00
WPT Sync Bot
f3533538ea Update web-platform-tests to revision 9817f7f027fe1e92cc2fce31d6002c4d669918e8 2018-03-09 08:47:07 -05:00
bors-servo
664efab4a3
Auto merge of #20254 - servo:derive-all-the-things, r=emilio
Some random improvements to derived style code

<!-- 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/20254)
<!-- Reviewable:end -->
2018-03-09 05:58:22 -05:00
Anthony Ramine
afaa00a344 Remove some uses of trivial_to_computed_value 2018-03-09 11:57:22 +01:00
Anthony Ramine
491a79ee4e Don't bound on Copy to implement Animate for Size2D and Point2D 2018-03-09 11:57:21 +01:00
Anthony Ramine
9f631fd886 Don't derive Animate for Transform<T>
There is a custom implementation already in animated_properties.
2018-03-09 11:57:21 +01:00
Anthony Ramine
c2e4a609a0 Don't generate fancy Clone + PartialEq bounds for #[animation(constant)] 2018-03-09 11:57:20 +01:00
Anthony Ramine
e82d0c20a6 Don't use #[animation(constant)] in ShapeBox
We can just rely on the implementation for the involved fields to return an error
if the values are different.
2018-03-09 11:56:49 +01:00
Anthony Ramine
539c60389e Move some code to its own function in #[derive(Animate)] 2018-03-09 10:12:57 +01:00
Anthony Ramine
02b0f71d45 Simplify some code in #[derive(ToCss)] 2018-03-09 10:12:29 +01:00
bors-servo
324e22db03
Auto merge of #20251 - jdm:memchart, r=ajeffrey
Chart memory reports over time

This is a tool that can take the output of Servo when run with `-m N` and generate an HTML file that charts the behaviour of the various labels over time.

Run with `./mach run http://url >/tmp/log; python etc/memory_reports_over_time.py /tmp/log`.

---
- [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/20251)
<!-- Reviewable:end -->
2018-03-08 22:47:49 -05:00
Josh Matthews
dd1b43b890 Add tool to chart memory usage from reports. 2018-03-08 22:46:42 -05:00
bors-servo
c9f60c5a67
Auto merge of #19895 - paulrouget:unfork, r=paulrouget
unfork glutin

I'm taking over #19120.

Fix #18918.

Beside the change in the API, I had to rewrite main loop.

At this point, we should have a very similar behavior as servo-glutin.

<!-- 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/19895)
<!-- Reviewable:end -->
2018-03-08 21:00:13 -05:00
Paul Rouget
4ae9f3917a Do not loop when animating and suspended 2018-03-09 09:29:36 +08:00
Paul Rouget
09ae72da05 do not run after we get a Suspend event 2018-03-09 09:29:35 +08:00
Paul Rouget
16b770b5c3 winit and glutin versions bump (android fixes) 2018-03-09 09:29:35 +08:00
Paul Rouget
88bf133d2a Send window size even when there is not top level browsing context yet 2018-03-09 09:29:13 +08:00
Paul Rouget
74249b6322 Store inner_size
In Winit, the Resize event has multiple purposes (actual resize,
screen change, workspace change, …). So we might get a Resize
event even if the window size hasn't changed yet. For example,
on MacOS, when going fullscreen.

Servo assume a resize and request a sync paint, which will freeze the
app. See:

0fa3248723/components/compositing/compositor.rs (L1485)
2018-03-09 09:29:13 +08:00
Paul Rouget
8149767f73 Resize buffer on window resize 2018-03-09 09:29:13 +08:00
Paul Rouget
4f72fb8e99 do not use events_loop during run_forever 2018-03-09 09:29:13 +08:00
Paul Rouget
f9a56e5915 unfork glutin 2018-03-09 09:29:13 +08:00
bors-servo
8e52f8a523
Auto merge of #20248 - emilio:invalidation-selectors-faster, r=bholley
style: Change the order we match selectors on invalidation to match normal order.

This changes the order to match the normal selector-matching order, which is
usually faster.

That is, when matching div:nth-child(2), for example, before this patch we'd
first try to match :nth-child(2), and only then div.

This patch makes us walk until the end or the next combinator, and only then
match backwards, matching first div, then :nth-child.

Bug: 1443814
Reviewed-by: bholley

<!-- 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/20248)
<!-- Reviewable:end -->
2018-03-08 18:44:29 -05:00
Emilio Cobos Álvarez
01e8a9bd35
style: Change the order we match selectors on invalidation to match normal order.
This changes the order to match the normal selector-matching order, which is
usually faster.

That is, when matching div:nth-child(2), for example, before this patch we'd
first try to match :nth-child(2), and only then div.

This patch makes us walk until the end or the next combinator, and only then
match backwards, matching first div, then :nth-child.

Bug: 1443814
Reviewed-by: bholley
2018-03-09 00:10:16 +01:00
bors-servo
6a2ec87b4a
Auto merge of #20249 - veeg:dev-dependency-fedora, r=jdm
Add mesa-libGLU-devel dependency to README.md

Installing all listed dependencies on fedora results in
a compilation error, due to missing mesa-libGLU-devel dependency.
This dependency is part of some of the other distributions,
with other names of course.

<!-- Please describe your changes on the following line: -->
Compiling Servo on my Fedora 26 machine after installing the developer dependencies, resulted in a failed compilation of `servo-skia-0.30000013.0` due to missing devel library.
```
/home/veeg/.cargo/registry/src/github.com-1ecc6299db9ec823/servo-skia-0.30000013.0/src/gpu/gl/unix/SkNativeGLContext_unix.cpp:10:10: fatal error: GL/glu.h: No such file or directory
 #include <GL/glu.h>
          ^~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/skia.dir/build.make:7383: CMakeFiles/skia.dir/src/gpu/gl/unix/SkNativeGLContext_unix.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/skia.dir/all] Error 2
gmake: *** [Makefile:130: all] Error 2
thread 'main' panicked at '
command did not execute successfully, got: exit code: 2

build script failed, must exit now', /home/veeg/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.29/src/lib.rs:632:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
```

```
$ dnf provides -q /usr/include/GL/glu.h
mesa-libGLU-devel-9.0.0-11.fc26.i686 : Development files for mesa-libGLU
Repo        : fedora
Matched from:
Filename    : /usr/include/GL/glu.h

mesa-libGLU-devel-9.0.0-11.fc26.x86_64 : Development files for mesa-libGLU
Repo        : fedora
Matched from:
Filename    : /usr/include/GL/glu.h
```

Installing `mesa-libGLU-devel` solved the issue.

---
<!-- 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 # (not applicable)

<!-- Either: -->
- [X] These changes do not require tests because only README.md is affected

<!-- 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/20249)
<!-- Reviewable:end -->
2018-03-08 17:42:43 -05:00
Dmitry
acdb4df53b Fix test-tidy formatting errors 2018-03-09 01:39:31 +03:00
bors-servo
21290276c2
Auto merge of #20250 - emilio:style-sharing-checks-order, r=xidorn
style: Reorder style sharing checks so that cheaper and broader ones are earlier.

This was reviewed by Xidorn in #20223, but that needs to wait for a few days so let's land this separately.

<!-- 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/20250)
<!-- Reviewable:end -->
2018-03-08 16:52:43 -05:00
Emilio Cobos Álvarez
a37bb8e6aa
style: Reorder style sharing checks so that cheaper and broader ones are earlier. 2018-03-08 22:50:34 +01:00
Vegard Sandengen
407522c417 Add mesa-libGLU-devel dependency to README.md
Installing all listed dependencies on fedora results in
a compilation error, due to missing mesa-libGLU-devel dependency.
This dependency is part of some of the other distributions,
with other names of course.
2018-03-08 22:37:13 +01:00
Dmitry
4739775877 Remove duplicate derive for text emphasis style enum 2018-03-09 00:27:09 +03:00
Dmitry
6febdf3751 Add docs for text-emphasis-property values 2018-03-09 00:04:32 +03:00
Dmitry
73113e28dd Move text-emphasis-style variables out of mako templates 2018-03-09 00:04:32 +03:00
bors-servo
4c797dfb52
Auto merge of #20247 - bholley:fix_stat_collection, r=Manishearth
Stop unconditionally collecting traversal statistics in nightly builds

The current code also makes us panic when DUMP_STYLE_STATISTICS=1 is
set. :-(

<!-- 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/20247)
<!-- Reviewable:end -->
2018-03-08 15:53:11 -05:00
bors-servo
f1338d3df8
Auto merge of #20244 - servo:jdm-patch-10, r=SimonSapin
Ensure readonly files can be removed on Windows.

This is based off of https://bugs.python.org/issue19643. At worst, it makes our deletion function more robust and doesn't help with the ongoing windows CI problems.

<!-- 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/20244)
<!-- Reviewable:end -->
2018-03-08 15:01:36 -05:00
Bobby Holley
4a2e1be874 Stop unconditionally collecting traversal statistics in nightly builds.
The current code also makes us panic when DUMP_STYLE_STATISTICS=1 is
set. :-(

MozReview-Commit-ID: JWGMojOnGFK
2018-03-08 11:32:21 -08:00
Josh Matthews
991bb42b4c Show actual exception when deletion fails. 2018-03-08 14:21:36 -05:00
bors-servo
46dfc35364
Auto merge of #20245 - mbrubeck:logging, r=emilio
Disable logging in bindgen to reduce code size

This disables bindgen's `logging` feature, which builds `env_logger`
with default features, including regex support.  Disabling it allows
Gecko to build `env_logger` without the `regex` crate, reducing code
size.

Part of https://bugzilla.mozilla.org/show_bug.cgi?id=1444097

---

- [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 only change unused build config

<!-- 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/20245)
<!-- Reviewable:end -->
2018-03-08 13:36:04 -05:00
bors-servo
b6de0563fb
Auto merge of #20237 - servo:derive-all-the-things, r=emilio
Opt into field bounds when deriving ToCss, instead of opting out

<!-- 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/20237)
<!-- Reviewable:end -->
2018-03-08 12:25:20 -05:00
bors-servo
9b540d199e
Auto merge of #20241 - emilio:xbl-faster, r=bholley
style: Make getting the XBL binding faster.

<!-- 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/20241)
<!-- Reviewable:end -->
2018-03-08 11:31:35 -05:00
Josh Matthews
71e2e84ce8 Ensure readonly files can be removed on Windows. 2018-03-08 11:13:06 -05:00