Commit Graph

1031 Commits

Author SHA1 Message Date
Bobby Holley
128ad9c81f servo: Merge #12803 - stylo: regenerate bindings (from bholley:regen_bindings); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: 0f1a9f109deedfa9c059da1ee7413f0894503fba
2016-08-10 16:17:12 -05:00
Glenn Watson
3939d0ef6c servo: Merge #12782 - WR2 does not require the stencil buffer, so remove it from window pro… (from glennw:wr-stencil); r=pcwalton,emilio
<!-- 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: -->
- [ ] `./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
- [ ] 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. -->

…perties.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2d54a2c30a5f7cb8a32eac561747582f47214e14
2016-08-10 02:55:49 -05:00
Simon Sapin
e12aef3aeb servo: Merge #12571 - Update to selectors 0.8.2 (generic over atoms) (from servo:selectors-generic-atom_); r=bholley
This removes the `[replace]` override in geckolib and therefore unblocks https://github.com/servo/servo/pull/12391.

This includes the `gecko_string_cache` redesign discussed in https://github.com/servo/servo/pull/12548.

r? @bholley

---
<!-- 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 #12548 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require new tests because refactor

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 5e83b3f83bfcf48d0096442bdf5c9bf753623970
2016-08-09 12:02:55 -05:00
Ravi Shankar
c069acc623 servo: Merge #12783 - Prefer length and percentage for word spacing (from Wafflespeanut:word_spacing); r=Manishearth
<!-- Please describe your changes on the following line: -->
The goal is to make use of `LengthOrPercentage` for word spacing in `ShapingOptions`, but since it makes use of `f32` which doesn't implement `Hash`, we're going for `NotNan<f32>` from [ordered-float](https://github.com/reem/rust-ordered-float/), which supports hashing. Instead of implementing `Hash` for `LengthOrPercentage` and thereby the inner types like `CSSFloat`, `CalcLengthOrPercentage`, etc., we convert it to `(Au, NotNan<f32>)`.

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

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 3b676bc85dc66ed0e80756204f347bf1842b01a0
2016-08-09 10:13:30 -05:00
Glenn Watson
32a8bd6f7d servo: Merge #12779 - Remove some unused WR1 shaders, copy new shaders, update WR hash (from glennw:wr-shaders-tidy); r=pcwalton
<!-- 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: -->
- [ ] `./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
- [ ] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 1f4dd8765fe06784f052765f63f3e4869faf8164
2016-08-08 16:39:08 -05:00
Aneesh Agrawal
b707711b20 servo: Merge #12736 - Add more shell script lints (from aneeshusa:prohibit-backticks-in-shell-scripts); r=Wafflespeanut
<!-- Please describe your changes on the following line: -->

The "$(some_command arg1 arg2)" form is preferred to the
`some_command arg1 arg2` form because it nests unambiguously.
Add a lint for this to tidy.

---
<!-- 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: -->
- [x] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: aa900b91aa9417b6aa032b4eff878f2916c480f0
2016-08-06 21:57:31 -05:00
Mason Chang
8e0fce21e2 servo: Merge #12741 - update servo to use webrender shaders (from changm:shader); r=ConnorGBrewster
<!-- Please describe your changes on the following line: -->
Pulls shaders from webrender and update the webrender commit.
---
<!-- 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: -->
- [X ] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: fc4fc773b4c62fb1b63f7f9aabea9fa44283e6ad
2016-08-05 10:33:08 -05:00
Paul Rouget
a190eca398 servo: Merge #12731 - Browserhtml update (from paulrouget:bhtmlupdate); r=nox
We also changed the branch name.

Fix #12012

Source-Repo: https://github.com/servo/servo
Source-Revision: 41cb4f4c77e8873a291218284db41118da43f708
2016-08-04 05:33:40 -05:00
Mason Chang
5b34111238 servo: Merge #12723 - Update cargo webrender dependencies to include fixed border colors (from changm:cargo); r=glennw
<!-- Please describe your changes on the following line: -->
Updates cargo webrender dependency to include fixed border colors.
---
<!-- 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: -->
- [ X] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 70f20a1f66370ff0417bc1a4ffebe33e3aeaeb96
2016-08-03 23:19:57 -05:00
Bobby Holley
0eaf43e608 servo: Merge #12725 - stylo: fix leaks, and accept null in Servo_InheritComputedValues (from bholley:fix_leaks); r=emilio
This corresponds to changes in:

https://bugzilla.mozilla.org/show_bug.cgi?id=1291885
and
https://bugzilla.mozilla.org/show_bug.cgi?id=1291891

Source-Repo: https://github.com/servo/servo
Source-Revision: 939e0a5f89d675de4a347e413ab4eda3ac163862
2016-08-03 20:20:21 -05:00
Emilio Cobos Álvarez
923c16c719 servo: Merge #12645 - stylo: Allow computing change hints during the traversal (from emilio:stylo); r=bholley
<!-- 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 :-(

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

r? @bholley
cc @heycam

Source-Repo: https://github.com/servo/servo
Source-Revision: cbf71a2cf39e792f75309e68f7cabe862d4a70eb
2016-08-03 19:02:26 -05:00
Glenn Watson
3afe10503e servo: Merge #12716 - Update WR to fix extra printlns (from glennw:update-wr); r=larsbergstrom
<!-- 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: -->
- [ ] `./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
- [ ] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: ef0f728f1eacb77d4ed82e35891bd77f0c882ff7
2016-08-03 12:42:47 -05:00
Glenn Watson
8181f16ecc servo: Merge #12711 - Update webrender, copy new shaders, pin ipc-channel (from servo:wr-wr-next); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: e2d4ff5b62aff7fc6f40460270af44e1ab5283d4

--HG--
rename : servo/components/script/dom/validation.rs => servo/resources/shaders/ps_blend.glsl
rename : servo/resources/shaders/box_shadow.fs.glsl => servo/resources/shaders/ps_box_shadow.fs.glsl
rename : servo/resources/shaders/debug_color.fs.glsl => servo/resources/shaders/ps_clear.fs.glsl
rename : servo/components/script/dom/validation.rs => servo/resources/shaders/ps_clear.glsl
rename : servo/resources/shaders/mask.fs.glsl => servo/resources/shaders/ps_image_transform.glsl
rename : servo/resources/shaders/debug_color.fs.glsl => servo/resources/shaders/ps_rectangle.fs.glsl
rename : servo/components/script/dom/validation.rs => servo/resources/shaders/ps_rectangle.glsl
rename : servo/ports/geckolib/gecko_bindings/sugar/mod.rs => servo/resources/shaders/ps_rectangle_transform.glsl
rename : servo/components/script/dom/validation.rs => servo/resources/shaders/ps_text.glsl
2016-08-03 07:50:06 -05:00
Cameron McCormack
517b17ce6d servo: Merge #12691 - Parse style sheets with a real base URL in geckolib (from heycam:style-sheet-base); r=bholley
<!-- Please describe your changes on the following line: -->

Corresponding Gecko change is [bug 1291207](https://bugzilla.mozilla.org/show_bug.cgi?id=1291207).

r? @bholley

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

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 7807895d5839ddd8e042b7e741961a75b70c37d8
2016-08-02 12:56:11 -05:00
Guillaume Gomez
e276d2b72d servo: Merge #12683 - Update video-metadata crate version (pkg-config support) (from GuillaumeGomez:up_crate); r=larsbergstrom
Source-Repo: https://github.com/servo/servo
Source-Revision: 4fc4232489930063eff20b5585aad1ea25aace77
2016-08-01 16:11:47 -05:00
Ms2ger
7ff8491bdb servo: Merge #12678 - Update png (from servo:always-be-updating); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 7f79261d4d1a0bdabf0cb6145b4cf0f26307016f
2016-08-01 11:52:09 -05:00
Guillaume Gomez
e9909eaf64 servo: Merge #12186 - Implement video-metadata check (from GuillaumeGomez:video-metadata); r=larsbergstrom,jdm,KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: d053fb16f6519726c14ac4580301df4883e4af23
2016-07-29 17:46:42 -05:00
Manish Goregaokar
bacd75b9f3 servo: Merge #12631 - stylo: Use unsafe accessors for coord data (from Manishearth:stylo-unsafe-coord); r=bholley
depends on https://bugzilla.mozilla.org/show_bug.cgi?id=1290061

r? @bholley

Source-Repo: https://github.com/servo/servo
Source-Revision: 7e39efa2dfb37a87745c1548e313527806891777
2016-07-29 03:38:14 -05:00
Bobby Holley
c710d7db26 servo: Merge #12643 - Flush stylist before manually querying style via Geckolib (from bholley:flush_stylist); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: 93eb35d358cc0e6c215a5d93e588a7921a5edb04
2016-07-28 21:56:20 -05:00
Ms2ger
43fbda2530 servo: Merge #12255 - Update SpiderMonkey to m-c bcf4ff0c3eef (from servo:smup); r=jdm
This currently breaks Servo on Android, because there are a number of interdependent changes that cannot easily land serially in a way that keeps it working throughout. We expect to fix this in the near future.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5ae1fcd6fe35f942f1cb29fd0efdc9c2de393ee6
2016-07-28 06:58:59 -05:00
Emilio Cobos Álvarez
e6192bfc52 servo: Merge #12563 - stylo: Improve restyling performance (from emilio:stylo); r=bholley,jdm,pcwalton
This commit adds hooks to the Servo style traversal to avoid traversing all the
DOM for every restyle. Additionally it changes the behavior of the dirty flag to
be propagated top down, to prevent extra overhead when an element is dirtied.

This commit doesn't aim to change the behavior on Servo just yet, since Servo does extra job when dirtying the node related with DOM revision counters that might be necessary.

CC @asajeffrey for the DOM revision counters stuff. When a node is dirty, do all its descendants really need to increment the revision counter, or is this an unintended effect? My intuition is that this is hurting performance quite a lot for servo.

r? @bholley

<!-- 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 no geckolib tests yet.

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 944d371b8f0e72f6aa5465be38c0c8daeab66127
2016-07-27 17:56:26 -05:00
Bobby Holley
e475fe7114 servo: Merge #12608 - Update anonymous box list (from bholley:sync_anon_box); r=emilio
These have drifted since we introduced them. Adding a few other misc commits while I'm at it.

Source-Repo: https://github.com/servo/servo
Source-Revision: c1409af5438213d5a697aa83e983f8100c660b74
2016-07-26 23:58:23 -05:00
Eduard Burtescu
67ca178f91 servo: Merge #12586 - Update Rust to 1.12.0-nightly (9316ae515 2016-07-24) (from servo:rustup); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 0be8e6857f4f767129dd694bf1e7e86060d307a4
2016-07-26 17:18:41 -05:00
Manish Goregaokar
0d7b7a23ad servo: Merge #12599 - Resync stylo bindings (from Manishearth:sync); r=heycam
Now at gecko-dev 13b9d03a21091cfcd797ab89decec2dde9114781

Source-Repo: https://github.com/servo/servo
Source-Revision: d6266c7cee0a8abb1d0f98ac183f744bcc925697
2016-07-26 10:07:15 -05:00
UK992
7aae8ab4c9 servo: Merge #12588 - Support tinyfiledialogs on Windows (from UK992:tinyfiledialogs); r=jdm
<!-- 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 only add support for Windows

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 2de3b119a961942943280fa280c50a7a814de583
2016-07-25 08:14:09 -05:00
Emilio Cobos Álvarez
634c096b10 servo: Merge #12469 - style: Rewrite the restyle hints code to allow different kinds of element snapshots (from emilio:stylo); r=bholley
<!-- 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 refactoring.

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

This is a rewrite for how style interfaces with its consumers in order to allow
different representations for an element snapshot.

This also changes the requirements of an element snapshot, requiring them to
only implement MatchAttr, instead of MatchAttrGeneric. This is important for
stylo since implementing MatchAttrGeneric is way more difficult for us given the
atom limitations. This also allows for more performant implementations in the
Gecko side of things.

I don't want to get this merged just yet, mainly because the stylo part is not
implemented, but I'd like early feedback from @bholley and/or @heycam: How do
you see this approach? I don't think we'll have much problem to implement
MatchAttr for our element snapshots, but... worth checking.

r? @heycam

Source-Repo: https://github.com/servo/servo
Source-Revision: 1e0321f7dde5f33f7d26bbd4f088622fa3660477
2016-07-21 16:54:34 -05:00
Josh Matthews
1ab2d6612c servo: Merge #12545 - Update ipc-channel (from jdm:ipcchannelbump); r=metajack
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12303
- [X] These changes do not require tests because we don't run automated tests on the platforms this affects

Source-Repo: https://github.com/servo/servo
Source-Revision: f8eab2b1658e687de03d58beb5b87fd0719509ef
2016-07-21 15:28:04 -05:00
Alan Jeffrey
528ece6c24 servo: Merge #12468 - Removed panic channel, replaced by integrated logging and issue reporting (from asajeffrey:constellation-remove-panic-channel); r=emilio
<!-- Please describe your changes on the following line: -->

Remove the previous ad hoc panic channel, replace it by an integrated logging and panicking mechanism, including crash reporting. All thread panics are now reported, not just content threads.

---
<!-- 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 #11838
- [X] These changes do not require tests because we don't test error reporting

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

Source-Repo: https://github.com/servo/servo
Source-Revision: df1b00d43db615244e8e4bcf8296ed51b64249ea
2016-07-21 11:20:37 -05:00
Manish Goregaokar
1aea46318e servo: Merge #12535 - Use Result instead of panicking when the resource dir can't be found (from Manishearth:try-resource); r=KiChjang
<!-- 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 #12520 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a refactoring

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

Source-Repo: https://github.com/servo/servo
Source-Revision: a39bd7db5ba26fa3c95e4bbbb5f1a358bc01965f
2016-07-21 04:08:49 -05:00
Manish Goregaokar
5eb45ceefb servo: Merge #12521 - Introduce safer layer of sugar for nsStyleUnion (from Manishearth:safer-coord); r=bholley
This routes (almost) all access to nsStyleUnion through a largely safe interface, CoordData.

It also introduces a corresponding Rust enum, CoordDataValue, which can be used when interacting with CoordData

LLVM should optimize the costs away in release mode. eddyb tested this a bit, and LLVM has no trouble threading matches together with inlining -- so all of the matches using enums here will have the same generated code as the old matches on the units.

Some unresolved questions:

Should I provide convenience methods like `set_coord`, `set_auto`, etc on CoordData? `.set_enum(CoordDataValue::Something)` should optimize down to the same thing, but the convenience methods look cleaner and won't load the optimizer as much.

Also, we're converting immutable references to mutable ones, which can be used to cause unsafety using some acrobatics. Perhaps a trait-based approach is better?
The issue is that in some places we only have a `&CoordData` (eg copy_from), but CoordData internally is `*mut`. It would be nice if CoordData could parametrize over its mutability, but Rust doesn't let us do that.

The alternate approach is to make CoordData a trait (also CoordDataMut). The trait requires you to implement `get_union()` and `get_unit()`, and gives you the rest of the functions for free. `nsStyleCoord` would directly implement both traits. `nsStyleSides` would have `data_at(idx)` and `data_at_mut(idx)` methods which return a struct `SidesData` containing a reference to the Sides and the index, which itself implements the `CoordData` and `CoordDataMut` trait (we need two traits here because there will have to be two `SidesData` structs).

I decided not to implement the traits approach first since it's pretty trivial to change this code to use traits, and the current design is more straightforward.

Thoughts?

r? @bholley

cc @emilio @heycam

Source-Repo: https://github.com/servo/servo
Source-Revision: 4a77cbdbb2fc1a4f163171356a7f5340e1237317
2016-07-21 03:05:56 -05:00
Emilio Cobos Álvarez
4853fe4b89 servo: Merge #12392 - style: Add support to test animations programatically (from emilio:test-animations); r=SimonSapin
<!-- 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 #12120

<!-- Either: -->
- [x] There are tests for these changes OR

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

r? @SimonSapin for the style changes, @Ms2ger or @jdm for the dom and test changes

Source-Repo: https://github.com/servo/servo
Source-Revision: 14aeccc33ab44d706df86fbce67339218efe710c
2016-07-20 13:38:31 -05:00
Lars Bergstrom
d380c84980 servo: Merge #12507 - Remove clipboard crate to due disallowed usage of GPL code (from larsbergstrom:remove_clipboard); r=metajack
<!-- Please describe your changes on the following line: -->
Fixes #7578, removing usage of rust-clipboard, which contains a disallowed dependency on GPL code.

r? @metajack

---
<!-- 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's a dependency removal

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 46db988b906fbec0286fa07387bb34e76a5b3a94
2016-07-20 11:53:04 -05:00
Manish Goregaokar
5be1dfb192 servo: Merge #12517 - Resync bindings (from Manishearth:sync); r=heycam
Corresponds to the tmp-stylo-rebase branch on servo/gecko-dev

Still testing locally

Source-Repo: https://github.com/servo/servo
Source-Revision: 5832008c26d0858e0cc9e47f2abd43966ca05a54
2016-07-20 08:21:18 -05:00
Simon Sapin
c710b104be servo: Merge #12515 - Make the style crate more concrete (from servo:concrete-style); r=bholley
Background:

The changes to Servo code to support Stylo began in the `selectors` crate with making pseudo-elements generic, defined be the user, so that different users (such as Servo and Gecko/Stylo) could have a different set of pseudo-elements supported and parsed. Adding a trait makes sense there since `selectors` is in its own repository and has others users (or at least [one](https://github.com/SimonSapin/kuchiki)).

Then we kind of kept going with the same pattern and added a bunch of traits in the `style` crate to make everything generic, allowing Servo and Gecko/Stylo to do things differently. But we’ve also added a `gecko` Cargo feature to do conditional compilation, at first to enable or disable some CSS properties and values in the Mako templates. Since we’re doing conditional compilation anyway, it’s often easier and simpler to do it more (with `#[cfg(feature = "gecko")]` and `#[cfg(feature = "servo")]`) that to keep adding traits and making everything generic. When a type is generic, any method that we want to call on it needs to be part of some trait.

----

The first several commits move some code around, mostly from `geckolib` to `style` (with `#[cfg(feature = "gecko")]`) but otherwise don’t change much.

The following commits remove some traits and many type parameters through the `style` crate, replacing them with pairs of conditionally-compiled API-compatible items (types, methods, …).

Simplifying code is nice to make it more maintainable, but this is motivated by another change described in https://github.com/servo/servo/pull/12391#issuecomment-232183942. (Porting Servo for that change proved difficult because some code in the `style` crate was becoming generic over `String` vs `Atom`, and this PR will help make that concrete. That change, in turn, is motivated by removing geckolib’s `[replace]` override for string-cache, in order to enable using a single Cargo "workspace" in this repository.)

r? @bholley

---
<!-- 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 #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require new tests because refactoring

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 2d01d41a506bcbc7f26a2284b9f42390d6ef96ab

--HG--
rename : servo/ports/geckolib/selector_impl.rs => servo/components/style/gecko_selector_impl.rs
rename : servo/ports/geckolib/values.rs => servo/components/style/gecko_values.rs
rename : servo/ports/geckolib/properties.mako.rs => servo/components/style/properties/gecko.mako.rs
2016-07-20 02:58:34 -05:00
Manish Goregaokar
a5176ec4b1 servo: Merge #12465 - Add bindings for calc() (from Manishearth:stylo-calc); r=heycam
This adds bindings for dealing with refcounted calc() values.

So far we can get/set them, but we don't yet have the ability to copy them around. I'll work on that next.

Corresponding gecko bindings at https://github.com/servo/gecko-dev/compare/stylo...Manishearth:stylo-calc?expand=1

f? @emilio @heycam

Source-Repo: https://github.com/servo/servo
Source-Revision: 37604401d027b991d9daf0b1df24408da36d5230
2016-07-19 20:57:10 -05:00
Ms2ger
3ae357217f servo: Merge #12506 - Rewrite a line in geckolib's properties.mako.rs to fix the build on windows (from servo:geckolib-win); r=larsbergstrom
Fixes #12505.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3a9fca619d10c62be804f12b05de1df4afe556c9
2016-07-19 19:41:07 -05:00
Manish Goregaokar
79eb85ccb0 servo: Merge #12499 - Sync stylo bindings (from Manishearth:sync); r=emilio
Source-Repo: https://github.com/servo/servo
Source-Revision: 701e678d8eac3ebab7309759988832932f89af56
2016-07-18 23:37:27 -07:00
Xidorn Quan
ab54f9a291 servo: Merge #12498 - Support generating bindings for MSVC (from upsuper:msvc-bindgen); r=emilio
<!-- 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

Source-Repo: https://github.com/servo/servo
Source-Revision: 2ce85f1cddb05689c231b1a17dfd2d374ad48377
2016-07-18 22:34:18 -07:00
Cameron McCormack
b4e35e0e34 servo: Merge #12487 - Add FFI glue for Gecko to implement 1-arg CSS.supports() with stylo (from heycam:supports-ffi); r=emilio
<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: f88ecda3628ec2af3a4e4c7fdebeda47b4008d6f
2016-07-18 21:25:31 -07:00
Glenn Watson
9d9fa28d20 servo: Merge #12497 - Update WR to get fix for texture atlas assert (from glennw:wr-update); r=emilio
<!-- 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: -->
- [ ] `./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
- [ ] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 877e480c47fabf400cfa2275aada9d6d9c678b9a
2016-07-18 18:46:14 -07:00
Cameron McCormack
fee8ba1d3d servo: Merge #12488 - geckolib: Support parsing style="" attributes longer than 255 characters (from heycam:style-len); r=SimonSapin
<!-- Please describe your changes on the following line: -->

This just fixes the bindings for a typo in `ServoBindings.h` in Gecko.  Corresponding Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1287383

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
- [ ] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: b36a3b2fee3e70c11af2bc24832e65510acb71ec
2016-07-18 08:48:30 -07:00
Shing Lyu
5e39e67d61 servo: Merge #11890 - Bug 10104 - Only restyle nodes that uses viewport percentage units on viewport size change (from shinglyu:viewport-percent-recalc); r=mbrubeck
<!-- Please describe your changes on the following line: -->
Bug 10104 - Only restyle nodes that uses viewport percentage units on viewport size change
---
<!-- 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 #10104 (github issue number if applicable).

<!-- Either: -->
- [X] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: d87ea67bf2efec45368d3e48634c6c16de7486ff
2016-07-17 20:46:24 -07:00
Alan Jeffrey
ca82078f35 servo: Merge #11841 - Send log messages to the constellation (from asajeffrey:constellation-logging); r=Manishearth
<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: a5cd4b95183da4ae9b754d9d4824bd23f4ad7eb8
2016-07-15 12:22:26 -07:00
Aravind Gollakota
78fcf243f3 servo: Merge #12441 - Implement referrer policy delivery by header (from aravind-pg:referrer-pol-header); r=jdm
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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: b382cc2103180f7dfd8df9c34970a95ed57a2d88
2016-07-15 11:25:43 -07:00
Andrew Mackenzie
624cea87a0 servo: Merge #12461 - Add a keyboard shortcut (Command + Q on Mac or Control + Q on other O… (from andrewdavidmackenzie:enable-quit-keyboard-shortcut); r=ConnorGBrewster
<!-- Please describe your changes on the following line: -->
Added code in window.rs to enqueue the Window::Quit event when the Command/Control + Q keyboard shortcut is detected IF keyboard shortcuts are enabled.
---
<!-- 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 #12422 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because there are no tests able to test keyboard shortcuts at the moment

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

Source-Repo: https://github.com/servo/servo
Source-Revision: 6640115c9775e7177f79b1d6aa5fddceeeeb22e2
2016-07-15 09:33:06 -07:00
Shing Lyu
c913f7db5e servo: Merge #12442 - Implemented page-break-before/after for Stylo (from shinglyu:stylo-page-break); r=emilio
<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 6bb5d0e8468797e057ce0f38f09338042823dd88
2016-07-14 22:47:31 -07:00
Alan Jeffrey
3502f92cc3 servo: Merge #12447 - All our Cargo.toml files should contain an MPL-2.0 license field (from asajeffrey:license-mpl-2.0); r=frewsxcv
<!-- Please describe your changes on the following line: -->

Added a `license = "MPL-2.0"` field to all our `Cargo.toml` files, and added a check to `test-tidy` that the license is present.

---
<!-- 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 #12434
- [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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 650d1d1185eecdc4c8b605bb0290ece7de839015
2016-07-14 09:33:18 -07:00
Manish Goregaokar
a3f6b93f58 servo: Merge #11851 - Add support for gecko-only array values; use for stylo (from Manishearth:stylo-autoarray); r=emilio
Doesn't yet work, because I can't grow nsTArrays from Rust. If anyone knows how to add bindings for that, let me know!

Thoughts on the design so far? Once this PR lands, all of the array-accepting background- properties can just use gecko_autoarray_longhand and some iterators in the geckolib implementation without changing much other code to work with arrays.

cc @emilio @bholley

Source-Repo: https://github.com/servo/servo
Source-Revision: ed985f75ecbb4f0df6231c58b2bfae1e82b255b6
2016-07-14 02:32:49 -07:00
Emilio Cobos Álvarez
77d1e7f00d servo: Merge #12339 - stylo: Implement dirtyness tracking for stylo (from emilio:stylo-node-dirtying); r=heycam
<!-- 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

Source-Repo: https://github.com/servo/servo
Source-Revision: 4a5a0a417bb55971fe70e7066c8d8c9a0ab36b3b
2016-07-13 19:48:54 -07:00
Josh Matthews
f1d49799db servo: Merge #12438 - Enable more DOM bindings inlining opportunities (from jdm:jsinline); r=metajack
- [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

Source-Repo: https://github.com/servo/servo
Source-Revision: 6e8eec21bf4ea5eaebd5a72ce24c6171c6032794
2016-07-13 12:04:24 -07:00