Commit graph

4524 commits

Author SHA1 Message Date
Manish Goregaokar
704d7a01c9
Handle Calc refcounting 2016-07-19 11:29:11 +05:30
Manish Goregaokar
8fddc46020
Allow calc() in GeckoStyleCoordConvertible 2016-07-19 11:29:09 +05:30
Manish Goregaokar
67bcb96cea
Add glue for calc values 2016-07-19 11:29:07 +05:30
Manish Goregaokar
b52b78c340
Regen bindings for Calc 2016-07-19 11:29:05 +05:30
bors-servo
2ce85f1cdd Auto merge of #12498 - upsuper:msvc-bindgen, r=emilio
Support generating bindings for MSVC

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

This pull request includes several patches to the binding generating script to make it work with MSVC. The generated files are not updated because they may not be compatible with other platforms which the majority of developers are working on.

Only `regen.py` is modified. The two `.sh` files are not. Those files are very platform-specific and I don't think it's worth to make them work on Windows at all, and my hope is that we can get rid of those files and only use `regen.py`. I imagine the only left steps to get there are:

1. make clang version detectable via `bindgen` so that we get reliable clang version without needing to duplicate the library searching work (which has already been done in `clang-sys`)
2. checkout the git repo inside the python script and run `cargo build` there

BTW, it seems to me nightly Rust is not required to build `bindgen`, and thus we can probably get rid of the `multirust` detection. (Even if we need that, I think we should prefer `rustup` and optionally fallback to `multirust`. I know `rustup` is not yet available on Homebrew, though...)

---
<!-- 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 a change to binding generating script

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @emilio

<!-- 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/12498)
<!-- Reviewable:end -->
2016-07-18 22:34:18 -07:00
Manish Goregaokar
8b76bd7c19
Sync stylo bindings 2016-07-19 11:03:21 +05:30
bors-servo
f88ecda362 Auto merge of #12487 - heycam:supports-ffi, r=emilio
Add FFI glue for Gecko to implement 1-arg CSS.supports() with stylo.

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

This adds an FFI function for Gecko to call to implement the 1-arg version of `CSS.supports()`.  This will be useful for producing an automated analysis of CSS properties we lack support for in geckolib.  Corresponding Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1287382

r? @emilio

---
<!-- 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 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 this is a geckolib-only change, and we don't have testing for that yet :(

<!-- 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/12487)
<!-- Reviewable:end -->
2016-07-18 21:25:31 -07:00
Xidorn Quan
c30f7a3f69 Restore mistakenly removed code 2016-07-19 14:22:26 +10:00
Cameron McCormack
64c47ed720 Add FFI glue for Gecko to implement 1-arg CSS.supports() with stylo. 2016-07-19 11:35:34 +08:00
Xidorn Quan
c3e20eb7f5 Fix target check and use "all" as default target 2016-07-19 12:16:38 +10:00
Xidorn Quan
49f7f54331 Add necessary flags for building MSVC binding
Using C++14 mode is necessary because MSVC's std headers include some
C++14 syntax. "utility" is converted to "/utility" to exclude MSVC's
"xutility" header.
2016-07-19 12:16:38 +10:00
Xidorn Quan
cfc27b3df5 Convert platform dictionary to if-else
Makes it more extendible.
2016-07-19 12:16:38 +10:00
Xidorn Quan
9eea2be09e Use Cargo to run bindgen when possible
Cargo would take care of stuff like library injecting, so that it works
cross platform. This is necessary for Windows because Windows doesn't
have things like LD_LIBRARY_PATH env var.
2016-07-19 12:16:38 +10:00
Xidorn Quan
81ccbac103 Close the temporary file before using it
An instance of NamedTemporaryFile would keep the file open in the
current process, however, on Windows, a opened filed is no accessible
from any other process, and thus the following commands use this file
would fail to execute.

To fix this, this commit ensures that the temporary file has been closed
before it is used anywhere else, and removes the temporary file after
everything gets done.
2016-07-19 12:16:38 +10:00
Glenn Watson
509d779703 Update WR to get fix for texture atlas assert. 2016-07-19 11:43:24 +10:00
Cameron McCormack
0f09a9f357 geckolib: Support parsing style="" attributes longer than 255 characters. 2016-07-18 16:38:37 +08:00
Shing Lyu
f754cacbd5 Only restyle viewport-relative nodes on viewport size change 2016-07-18 11:01:42 +08:00
bors-servo
a5cd4b9518 Auto merge of #11841 - asajeffrey:constellation-logging, r=Manishearth
Send log messages to the constellation

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

Send all warnings and errors to the constellation. Warnings are bufferred up, and included in any subsequent error reports. Errors are reported in the same way as panics.

Note that this can't merge yet, as it needs https://github.com/rust-lang-nursery/log/pull/86 to land.

---
<!-- 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 #11776 (github issue number if applicable).
- [X] These changes do not require tests because we don't test crash reporting.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11841)
<!-- Reviewable:end -->
2016-07-15 12:22:26 -07:00
Alan Jeffrey
44422744ff Sent log messages to the constellation. 2016-07-15 13:44:44 -05:00
bors-servo
b382cc2103 Auto merge of #12441 - aravind-pg:referrer-pol-header, r=jdm
Implement referrer policy delivery by header

Adds a new `Option<ReferrerPolicy>` field to Document and sets it appropriately in `ScriptThread::load` if a Referrer-Policy header is present.

r? @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
- [X] These changes fix #11860
- [X] There are tests for these changes

<!-- 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/12441)
<!-- Reviewable:end -->
2016-07-15 11:25:43 -07:00
Aravind Gollakota
920a43df95 Bump hyper to 0.9.10 2016-07-15 08:09:51 -07:00
Andrew Mackenzie
daeddc4c6f Add a keyboard shortcut (Command + Q on Mac or Control + Q on other OS) to Quit the app directly. Fixes #12422 2016-07-15 14:42:44 +01:00
bors-servo
6bb5d0e846 Auto merge of #12442 - shinglyu:stylo-page-break, r=emilio
Implemented page-break-before/after for Stylo

<!-- 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
- [ ] These changes do not require tests because _____

<!-- 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/12442)
<!-- Reviewable:end -->
2016-07-14 22:47:31 -07:00
Shing Lyu
fd82927830 Implemented page-break-before/after for Stylo 2016-07-15 10:21:03 +08:00
Alan Jeffrey
62e95c5a61 All our Cargo.toml files should contain an MPL-2.0 license field. 2016-07-14 10:26:34 -05:00
Manish Goregaokar
6a378a81da Resync bindings 2016-07-14 14:22:55 +05:30
Manish Goregaokar
209255b20a Address review comments 2016-07-14 12:35:34 +05:30
Manish Goregaokar
5be15e55db Pre-set length to desired value in image setter 2016-07-14 12:34:44 +05:30
Manish Goregaokar
154bfb0b0f Add bindings for growing nsTArray 2016-07-14 12:34:40 +05:30
Manish Goregaokar
38b57c435d Make background-image an array for stylo 2016-07-14 12:34:07 +05:30
Manish Goregaokar
3a5a56807a Add iterators for nsStyleAutoArray 2016-07-14 12:34:05 +05:30
bors-servo
4a5a0a417b Auto merge of #12339 - emilio:stylo-node-dirtying, r=heycam
stylo: Implement dirtyness tracking for stylo.

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

<!-- Either: -->
- [x] These changes do not require tests because geckolib-only changes.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

r? @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/12339)
<!-- Reviewable:end -->
2016-07-13 19:48:54 -07:00
bors-servo
6e8eec21bf Auto merge of #12438 - jdm:jsinline, r=metajack
Enable more DOM bindings inlining opportunities.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix (partially) #12354
- [X] These changes do not require tests because no automated performance tests
2016-07-13 12:04:24 -07:00
Josh Matthews
f95613e320 Enable more DOM bindings inlining opportunities. 2016-07-13 15:01:00 -04:00
Ms2ger
3332680771 Update fnv. 2016-07-13 13:16:23 +02:00
bors-servo
39a0940d2e Auto merge of #12429 - cjkenn:12412, r=Ms2ger
Remove assert statement from window.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because simple removal of assert, no logic added or changed.

<!-- 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/12429)
<!-- Reviewable:end -->
2016-07-13 02:00:35 -07:00
cjkenned
e89eff2093 Remove assert statement from window. 2016-07-12 21:02:36 -06:00
Xidorn Quan
af3833d674 Generate atom bindings for msvc 2016-07-13 11:18:53 +10:00
Manish Goregaokar
3ead9cc67b Improve mach clippy, add plugins to style/util 2016-07-12 19:59:58 +05:30
bors-servo
5f188003ba Auto merge of #12366 - nox:ipc, r=emilio
Bump ipc-channel to 0.4.0

<!-- 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/12366)
<!-- Reviewable:end -->
2016-07-12 01:53:05 -07:00
Anthony Ramine
082120d784 Bump ipc-channel to 0.4.0 2016-07-12 10:32:17 +02:00
Anthony Ramine
5067880488 Bump bincode to 0.5.9 2016-07-12 10:32:09 +02:00
bors-servo
c3a8cbbd38 Auto merge of #12385 - Ms2ger:arc_ptr_eq, r=SimonSapin
Move arc_ptr_eq to style.

<!-- 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/12385)
<!-- Reviewable:end -->
2016-07-11 05:11:48 -07:00
Ms2ger
cbfe77cee1 Move some unit type definitions to style_traits. 2016-07-11 12:14:27 +02:00
Ms2ger
9f13278b77 Move arc_ptr_eq to style. 2016-07-11 12:13:12 +02:00
Josh Matthews
da81464372 Update rust-mozjs for cross-crate inlining fixes. 2016-07-10 10:23:42 -04:00
Simon Sapin
846a951155 Remove the empty stable-rust crate. 2016-07-08 22:28:52 +02:00
Simon Sapin
a39170728d Remove geckolib’s "servo_features" Cargo feature
We’re about to switch to separate CARGO_TARGET_DIR (and different
compiler version) so we won’t be able to share build output with servo’s
"normal" build anyway.
2016-07-08 22:27:19 +02:00
bors-servo
35a23bfef3 Auto merge of #12338 - upsuper:win-geckolib-fix, r=bholley
Fix geckolib build for Windows

It contains several fixes to make `./mach build-geckolib` work on Windows.

<!-- 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/12338)
<!-- Reviewable:end -->
2016-07-08 11:14:48 -07:00
Ms2ger
8dd711d3db Move util::cache to style. 2016-07-08 16:44:47 +02:00