Commit graph

32232 commits

Author SHA1 Message Date
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
Matt Brubeck
2f2bfb23db 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
2018-03-08 08:06:48 -08:00
Anthony Ramine
2074e8902a Derive ToCss for SVGStrokeDashArray<T> 2018-03-08 16:35:13 +01:00
Anthony Ramine
36db6f9cdd Derive ToCss for FontSettings<T> 2018-03-08 16:35:13 +01:00
Anthony Ramine
91e12563eb Derive ToCss for Transform<T>
Now that #[derive(ToCss)] unconditionally bounds type params, we can derive
the trait for Transform<T>.
2018-03-08 16:35:12 +01:00
Anthony Ramine
859002a81f Opt into field bounds when deriving ToCss, instead of opting out 2018-03-08 16:33:19 +01:00
bors-servo
212c321145
Auto merge of #20240 - emilio:special-color-fix, r=upsuper
style: Fix special color keywords.

They're -moz-activehyperlinktext and -moz-visitedhyperlinktext.

This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1444059.

<!-- 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/20240)
<!-- Reviewable:end -->
2018-03-08 10:06:03 -05:00
bors-servo
8133f788cf
Auto merge of #20236 - emilio:to-css-skip-if, r=nox
Introduce #[css(skip_if)]

This is most of #20224 but without the actual counter() fix since it's waiting on a WPT update.

<!-- 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/20236)
<!-- Reviewable:end -->
2018-03-08 09:16:55 -05:00
Emilio Cobos Álvarez
da97d56d4e
style: Make getting the XBL binding faster.
MozReview-Commit-ID: GPj3uv4xgAv
2018-03-08 14:12:08 +01:00
Emilio Cobos Álvarez
0717047e1e
style: Make weird color parsing marginally faster. 2018-03-08 14:08:54 +01:00
bors-servo
1d122c250c
Auto merge of #20238 - upsuper:url-value, r=emilio
Construct URLValue eagerly and share it between specified value and style structs

This is the Servo side change of [bug 1443046](https://bugzilla.mozilla.org/show_bug.cgi?id=1443046).

<!-- 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/20238)
<!-- Reviewable:end -->
2018-03-08 08:06:35 -05:00
Emilio Cobos Álvarez
2192090ea5
style: Fix special color keywords.
They're -moz-activehyperlinktext and -moz-visitedhyperlinktext.
2018-03-08 14:01:09 +01:00
Xidorn Quan
ecbc55ffcf Construct URLValue eagerly and share it between specified value and style structs. 2018-03-08 23:34:35 +11:00
Xidorn Quan
fa5d76c395 Split CssUrl from SpecifiedUrl for non-value URLs. 2018-03-08 23:34:34 +11:00
Xidorn Quan
0090fbb3c8 Move ComputedUrl into their impl mods. 2018-03-08 23:34:33 +11:00
Xidorn Quan
d001fd9a0a Move Parse impl of SpecifiedUrl into corresponding files. 2018-03-08 23:34:33 +11:00
Xidorn Quan
a99ca543cd Add SpecifiedImageUrl for <url> used as images. 2018-03-08 23:34:32 +11:00
Xidorn Quan
14b708311b Remove some useless clone() call on SpecifiedUrl::image_value. 2018-03-08 21:35:33 +11:00
Emilio Cobos Álvarez
0d7dae1f85
style: Derive ToCss for TimingFunction. 2018-03-08 10:28:11 +01:00
Emilio Cobos Álvarez
951250882b
style: Document #[css(skip_if)] 2018-03-08 10:28:10 +01:00
Emilio Cobos Álvarez
bf08c659a0
style: Switch css(skip_if) to use a Path for consistency. 2018-03-08 10:28:10 +01:00
Emilio Cobos Álvarez
1f4b3556e6
style: reindent list-style-type. 2018-03-08 10:26:40 +01:00
Emilio Cobos Álvarez
6da1b2fff5
style: Introduce css(skip_if) to conditionally skip serialization of a field. 2018-03-08 10:26:25 +01:00
Emilio Cobos Álvarez
ada45f4968
style: Remove useless String::to_string call. 2018-03-08 10:26:25 +01:00
Emilio Cobos Álvarez
989e1c2e68
style: Remove outdated TODO. 2018-03-08 10:26:24 +01:00
bors-servo
72d09202f4
Auto merge of #20232 - servo:up, r=jdm
Update mozjs_sys

Pick up https://github.com/servo/mozjs/pull/132

<!-- 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/20232)
<!-- Reviewable:end -->
2018-03-07 14:12:21 -05:00
Simon Sapin
cca32a1945 Update mozjs_sys 2018-03-07 20:10:17 +01:00
bors-servo
2f4c13d27d
Auto merge of #20230 - servo:derive-all-the-things, r=emilio
Introduce #[css(if_empty = "…", iterable)]

<!-- 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/20230)
<!-- Reviewable:end -->
2018-03-07 11:06:09 -05:00
bors-servo
6272233c50
Auto merge of #20229 - emilio:finally, r=xidorn
style: Separate the XBL and shadow dom styling bits.

Bug: 1441022
Reviewed-by: xidorn
MozReview-Commit-ID: 2W0BmZ8wWXg

<!-- 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/20229)
<!-- Reviewable:end -->
2018-03-07 10:06:05 -05:00
Emilio Cobos Álvarez
ef4ea7cc49
style: Separate the XBL and shadow dom styling bits.
Bug: 1441022
Reviewed-by: xidorn
MozReview-Commit-ID: 2W0BmZ8wWXg
2018-03-07 15:42:28 +01:00