Commit graph

32161 commits

Author SHA1 Message Date
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
bors-servo
4e2f8ec8e1
Auto merge of #20227 - upsuper:in-firefox-build, r=jdm
Fix `mach build` for Servo in Firefox tree

Running `mach build` in servo directory in Firefox tree currently doesn't work due to several errors when importing modules.

First error:
```text
Traceback (most recent call last):
  File "mach", line 93, in <module>
    main(sys.argv)
  File "mach", line 23, in main
    mach = mach_bootstrap.bootstrap(topdir)
  File "servo/python/mach_bootstrap.py", line 280, in bootstrap
    mach.load_commands_from_file(os.path.join(topdir, path))
  File "servo/python/_virtualenv/Lib/site-packages/mach/main.py", line 265, in load_commands_from_file
    imp.load_source(module_name, path)
  File "servo/python/servo/testing_commands.py", line 42, in <module>
    from update import updatecommandline
  File "servo/../testing/web-platform/update/__init__.py", line 17, in <module>
    from wptrunner.update import setup_logging, WPTUpdate
  File "servo/../testing/web-platform/tests/tools/wptrunner/wptrunner/update/__init__.py", line 8, in <module>
    from update import WPTUpdate
  File "servo/../testing/web-platform/tests/tools/wptrunner/wptrunner/update/update.py", line 8, in <module>
    from .. import environment as env
  File "servo/../testing/web-platform/tests/tools/wptrunner/wptrunner/environment.py", line 12, in <module>
    from wptserve.handlers import StringHandler
ImportError: No module named wptserve.handlers
```

Second error:
```text
Traceback (most recent call last):
  File "mach", line 93, in <module>
    main(sys.argv)
  File "mach", line 23, in main
    mach = mach_bootstrap.bootstrap(topdir)
  File "servo/python/mach_bootstrap.py", line 291, in bootstrap
    mach.load_commands_from_file(os.path.join(topdir, path))
  File "servo/python/_virtualenv/Lib/site-packages/mach/main.py", line 265, in load_commands_from_file
    imp.load_source(module_name, path)
  File "servo/python/servo/testing_commands.py", line 43, in <module>
    from servo_tidy import tidy
  File "servo/python/tidy/servo_tidy/tidy.py", line 34, in <module>
    from wptmanifest import parser, node
ImportError: No module named wptmanifest
```

The two commits fix these two errors respectively.

<!-- 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/20227)
<!-- Reviewable:end -->
2018-03-07 09:19:25 -05:00
Anthony Ramine
90b23963b7 Introduce #[css(if_empty = "…", iterable)] 2018-03-07 13:07:13 +01:00
Anthony Ramine
92f116a95c Derive ToCss for TemplateAreas 2018-03-07 12:32:53 +01:00
Xidorn Quan
4c240eb632 Don't import wptmanifest when in firefox tree. 2018-03-07 17:22:12 +11:00
Xidorn Quan
29d9c85c56 Add wptserve into python import paths. 2018-03-07 17:14:25 +11:00
bors-servo
46ad9f2a30
Auto merge of #20226 - glennw:update-wr-nv-clip, r=jdm
Update WR (nVidia/ANGLE workaround, vertex shader optimizations).

<!-- 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/20226)
<!-- Reviewable:end -->
2018-03-07 00:54:10 -05:00
Glenn Watson
a51bad51cd Update WR (nVidia/ANGLE workaround, vertex shader optimizations). 2018-03-07 15:52:59 +10:00
bors-servo
9eb417528b
Auto merge of #19947 - o0Ignition0o:mach_run_nightly, r=jdm
Add a --nightly | -n flag to mach run commands for linux

First tries to download and extract a specific nightly version to run mach commands against.

<!-- Please describe your changes on the following line: -->
I chose to split the Pull requests for each platform to avoid submitting a huge one, and to make sure I get the logic right.
I'm able to download / extract a nightly version, and I keep nightly versions in the target folder.
Windows and Mac OS support will be filed in separate PRs.
This is part of step two for #19505

The mentor on the issue is jdm

---
<!-- 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 it is part of a ./mach command.

<!-- 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/19947)
<!-- Reviewable:end -->
2018-03-06 23:47:08 -05:00
bors-servo
3b96fb2cbe
Auto merge of #20222 - upsuper:chrome-thread-pool, r=bholley
Do not disable thread pool in the parent process

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

<!-- 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/20222)
<!-- Reviewable:end -->
2018-03-06 17:54:34 -05:00
Xidorn Quan
20ec610e68 Do not disable thread pool in the parent process. 2018-03-07 09:40:33 +11:00
o0Ignition0o
10822ce730 Add a --nightly | -n flag to download and extract a specific nightly version to run mach commands against. This currently only work on linux, but windows and mac os support will follow in subsequent PRs. 2018-03-06 23:09:50 +01:00
bors-servo
26d2e77410
Auto merge of #20214 - mrobinson:stop-using-using-localclip-roundedrect, r=glennw
Stop using LocalClip::RoundedRect

We would like to remove this functionality from WebRender, so convert
its use to clip scroll nodes. This change also removes the redundant
BlocBlockStackingContextType in favor of Option<StackingContextType>,
which is just as expressive. This simplifies the code a bit.

<!-- 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 should not 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/20214)
<!-- Reviewable:end -->
2018-03-06 15:53:11 -05:00
Martin Robinson
e100a72122 Stop using LocalClip::RoundedRect
We would like to remove this functionality from WebRender, so convert
its use to clip scroll nodes. This change also removes the redundant
BlocBlockStackingContextType in favor of Option<StackingContextType>,
which is just as expressive. This simplifies the code a bit.
2018-03-06 21:26:22 +01:00
bors-servo
c8eceb90a1
Auto merge of #20213 - nical:tidy-alphabetical-bs, r=jdm
Add the option in servo-tidy to not check for alphabetical ordering.

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

An option to disable checking for alphabetical ordering of use/mod/extern crate statements in servo-tidy.

These checks are still enabled by default but WebRender will turn them off.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it doesn't affect servo.

<!-- 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/20213)
<!-- Reviewable:end -->
2018-03-06 13:39:59 -05:00
bors-servo
96b9000fa2
Auto merge of #20212 - mkollaro:webidlcmake, r=jdm
Regenerate all WebIDLs when one of them changes

WebIDL files have dependencies between each other, but cmake doesn't have any
information about them. This can cause it to not update all the changed bindings
when switching branches.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a minor change in the build dependencies.
Switching between two of my branches was previously failing because a change in WebGL1 bindings didn't re-generate the WebGL2 bindings. I verified that it works with this patch.

<!-- 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/20212)
<!-- Reviewable:end -->
2018-03-06 12:37:58 -05:00
bors-servo
785b7c7775
Auto merge of #20211 - servo:derive-all-the-things, r=emilio
Improve #[derive(ToCss)]

<!-- 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/20211)
<!-- Reviewable:end -->
2018-03-06 11:42:58 -05:00
bors-servo
94a6c2c429
Auto merge of #20181 - fabricedesre:end-load-pageshow, r=jdm
Fire the pageshow event at the end of the page load

<!-- Please describe your changes on the following line: -->
This implements step 8 of https://html.spec.whatwg.org/multipage/parsing.html#the-end

---
<!-- 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 I could not find a wpt test for that, which is strange. I likely missed it :(

<!-- 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/20181)
<!-- Reviewable:end -->
2018-03-06 10:49:51 -05:00
Fabrice Desré
3dd015b2d9 Fire the pageshow event at the end of the page load r=jdm 2018-03-06 07:24:24 -08:00
Nicolas Silva
29a1617e27 Add the option in servo-tidy to not check for alphabetical ordering. 2018-03-06 16:10:30 +01:00
bors-servo
f5037cf621
Auto merge of #20144 - mkollaro:gettexparameter, r=jdm
Add WebGL function glGetTexParameter

<!-- Please describe your changes on the following line: -->
Add WebGL function glGetTexParameter

---
<!-- 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 part of #10209

<!-- 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/20144)
<!-- Reviewable:end -->
2018-03-06 09:48:56 -05:00
Martina Kollarova
288ef50fb7 Add WebGL function glGetTexParameter
Set the expected result of the test `tex-input-validation.html` to CRASH, since
that is caused by unrelated problems. The test was previously not executing
completely, because it stopped when it didn't find the implementation of
getTexParameter.
2018-03-06 15:28:10 +02:00