Commit graph

25052 commits

Author SHA1 Message Date
oneturkmen
3c0c10454b Make prepare_for_composite return void 2019-06-05 00:35:14 -06:00
bors-servo
4c234de927
Auto merge of #23504 - jdm:win-simpleservo, r=asajeffrey
Build simpleservo on Windows

The mozangle change means that we don't rebuild mozangle (and transitively script) because the requested features are different when building libsimpleservo.

<!-- 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/23504)
<!-- Reviewable:end -->
2019-06-05 01:21:47 -04:00
bors-servo
7903104e6a
Auto merge of #23512 - cpud36:fix_incorrect_relative_path_in_webidl_plugin, r=Manishearth
Fix `#[webidl_must_inherit]` building when cwd is not servo crate root

Manifest dir should be more stable than current dir.

<!-- Please describe your changes on the following line: -->
I was trying to embed servo.

The directory layout of mine was the following:
```
/
*-servo
*-src
*-Cargo.toml
...
```

When I tried to build, cargo reported an error, in `#[webidl_must_inherit]` (Os error: 2).

After some research I have found that it failed to find `.webidl` files, because it used a path relative to `current_dir`.

I replaced current dir with manifest dir to make it more reliable.

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

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

I am unsure if these changes require tests. If they do, how should they be implemented?

<!-- 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/23512)
<!-- Reviewable:end -->
2019-06-04 23:02:34 -04:00
oneturkmen
810f5abae6 Layout_thread: removed all possible opts::get() 2019-06-04 17:36:14 -06:00
bors-servo
2ad3066d7c
Auto merge of #23506 - oneturkmen:constellation-remove-opts-get, r=jdm
Constellation: removed almost all opts::get

<!-- Please describe your changes on the following line: -->
Removed *almost* all (except 1) "opts::get()" from `constellation` component. The one untouched is in `pipeline.rs` which uses "opts::get()" as a [struct field](cd153efb4a/components/constellation/pipeline.rs (L501)) that is set [here](cd153efb4a/components/constellation/pipeline.rs (L296)).

---
<!-- 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 *partially* #22854 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because no feature (or no bug) has been added (refactoring only).

<!-- 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/23506)
<!-- Reviewable:end -->
2019-06-04 17:02:23 -04:00
Katasonov Vladyslav
c0c11394c4 Run rustfmt. 2019-06-04 23:57:26 +03:00
Katasonov Vladyslav
293e6c88e8 Made webidl search path relative to manifest.
Manifest dir should be more stable than current dir.
2019-06-04 23:08:01 +03:00
bors-servo
6924024f0a
Auto merge of #23497 - jdm:windows-resize, r=asajeffrey
Fix behaviour of window resizing on Windows.

This makes Windows builds usable when the window is resized.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23489
- [x] These changes do not require tests because we can't run tests on Windows CI yet.

<!-- 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/23497)
<!-- Reviewable:end -->
2019-06-04 15:10:56 -04:00
bors-servo
fe8aad7227
Auto merge of #23503 - emilio:gecko-sync, r=emilio
style: sync changes from mozilla-central

See each individual commit for details. This also cherry-picks #23463 with a few fixes that were needed in Gecko-only 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/23503)
<!-- Reviewable:end -->
2019-06-04 08:30:39 -04:00
bors-servo
faf3a183f3
Auto merge of #23499 - est31:unused_code_removal_3, r=jdm
Remove unused code (3/N)

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

Third PR in a series of PRs to remove unused/dead code from servo, powered by an (upcoming) tool of mine. Please take a look and tell me if you want to keep something.

* First PR: #23477
* Second PR: #23498

---
<!-- 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 only remove dead code

<!-- 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/23499)
<!-- Reviewable:end -->
2019-06-04 02:27:29 -04:00
Emilio Cobos Álvarez
c155639bc5 style: Fix RuleNode::has_children_for_testing(). 2019-06-04 01:04:05 -04:00
Evgeniy Reizner
6f1df517e0 style: Do not use borrowed types in the selectors::Element trait.
Closes #22972
Closes #23463
2019-06-04 01:04:03 -04:00
Emilio Cobos Álvarez
2e5078e9c5 layout: Fix servo build. 2019-06-04 01:04:02 -04:00
Emilio Cobos Álvarez
aa03bf2e19 style: Fix Servo build. 2019-06-04 01:04:01 -04:00
Emilio Cobos Álvarez
390d03da70 style: Appease tidy. 2019-06-04 01:04:00 -04:00
Emilio Cobos Álvarez
665db79274 style: Rustfmt recent changes. 2019-06-04 01:03:59 -04:00
Emilio Cobos Álvarez
f7240751f5 style: Make nsIContent::GetBindingParent return an element.
Differential Revision: https://phabricator.services.mozilla.com/D33308
2019-06-04 01:03:58 -04:00
Emilio Cobos Álvarez
6722e2ce6c style: Remove nsStyleColor moving the color property to nsStyleText.
I think this is a good change regardless of other discussion in bug 1552587. If
we decide to move `mColor` to the top-level of the struct that can be done
separately.

Differential Revision: https://phabricator.services.mozilla.com/D32726
2019-06-04 01:03:56 -04:00
Emilio Cobos Álvarez
f623a6c045 style: Use a RwLock'd HashMap instead of a lock-free linked list for rule node children.
I need to profile this a bit more, but talos was pretty happy about this, and it
solves the known performance issues here such as the test-case from bug 1483963
for example. This also gets rid of a bunch of unsafe code which is nice.

This still keeps the same GC scheme, removing the key from the hashmap when
needed. I kept those as release assertions, but should probably be turned into
debug-only assertions.

Differential Revision: https://phabricator.services.mozilla.com/D6801
2019-06-04 01:03:55 -04:00
Emilio Cobos Álvarez
3652a0f1e1 style: Rejigger a bit rust features so that rusttests still link.
We cannot compile with just feature(gecko + debug_assertions), since that's how
debug rusttests get compiled and they don't have the refcount logging stuff.

We were getting away with it for the pre-existing usage of the style crate,
because it wasn't used during any test and presumably the linker didn't
complain. But servo_arc is definitely used in tests.

Differential Revision: https://phabricator.services.mozilla.com/D32691
2019-06-04 01:03:54 -04:00
Emilio Cobos Álvarez
9a9a4e12d5 style: Add refcount logging to servo_arc.
Differential Revision: https://phabricator.services.mozilla.com/D32173
2019-06-04 01:03:53 -04:00
Emilio Cobos Álvarez
57868f571f style: Use cbindgen for filters.
Had to implement some OwnedSlice bits that the canvas code used.

Differential Revision: https://phabricator.services.mozilla.com/D31799
2019-06-04 01:03:52 -04:00
Emilio Cobos Álvarez
ccff9b294f style: Use cbindgen for URIs.
This doesn't clean up as much as a whole, but it's a step in the right
direction. In particular, it allows us to start using simple bindings for:

 * Filters
 * Shapes and images, almost. Need to:
   * Get rid of the complex -moz- gradient parsing (let
     layout.css.simple-moz-gradient.enabled get to release).
 * Counters, almost. Need to:
   * Share the Attr representation with Gecko, by not using Option<>.
     * Just another variant should be enough (ContentItem::{Attr,Prefixedattr},
       maybe).

Which in turn allows us to remove a whole lot of bindings in followups to this.

The setup changes a bit. This also removes the double pointer I complained about
while reviewing the shared UA sheet patches. The old setup is:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
 * UrlValueSource
   * Arc<CssUrlData>
   * load id
   * resolved uri
   * CORS mode.
   * ...
```

The new one removes the double reference to the url data via URLValue, and looks
like:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
     * CorsMode
     * LoadData
       * load id
       * resolved URI
```

The LoadData is the only mutable bit that C++ can change, and is not used from
Rust. Ideally, in the future, we could just use rust-url to resolve the URL
after parsing or something, and make it all immutable. Maybe.

I've verified that this approach still works with the UA sheet patches (via the
LoadDataSource::Lazy).

The reordering of mWillChange is to avoid nsStyleDisplay from going over the
size limit. We want to split it up anyway in bug 1552587, but mBinding gains a
tag member, which means that we were having a bit of extra padding.

One thing I want to explore is to see if we can abuse rustc's non-zero
optimizations to predict the layout from C++, but that's something to explore at
some other point in time and with a lot of care and help from Michael (who sits
next to me and works on rustc ;)).

Differential Revision: https://phabricator.services.mozilla.com/D31742
2019-06-04 01:03:50 -04:00
Boris Chiou
8a0cf600d6 style: Animate offset-rotate.
Differential Revision: https://phabricator.services.mozilla.com/D32237
2019-06-04 01:03:50 -04:00
Emilio Cobos Álvarez
b34c27339b style: Hide -moz-gtk-buttonactivetext from content.
This prevents exposing the value to web content.

Differential Revision: https://phabricator.services.mozilla.com/D32611
2019-06-04 01:03:49 -04:00
Emilio Cobos Álvarez
729bf19437 style: Move system colors to values::specified::color.
This should be an idempotent patch. The way to come up with this patch has been:

 * Run the first script attached to the bug and pipe it to xclip, then paste it
   in color.rs
 * Add the relevant #[derive] annotations and remove the color.mako.rs
   definition.
 * Reorder the values to match the ColorID definition, on which some widget
   prefs and caching stuff relies on.
 * Manually port some documentation from nsLookAndFeel.h
 * Run `rg 'eColorID_' | cut -d : -f 1 | sort | uniq >files`
 * Run the second script attached to the bug.
 * Manually fix usage of `LAST_COLOR` (adding the `End` variant), and adding
   casts to integer as needed.
 * Add an static assert so that people remember to update the prefs, rather than
   a comment on the definition :)

Differential Revision: https://phabricator.services.mozilla.com/D32610
2019-06-04 01:03:48 -04:00
oneturkmen
cd153efb4a Constellation: removed almost all opts::get 2019-06-03 19:59:02 -06:00
Josh Matthews
685cf24358 Build libEGL.dll on all Windows targets. 2019-06-03 11:49:17 -04:00
bors-servo
657ed9f1ca
Auto merge of #23451 - pylbrecht:canvas.rendering, r=Manishearth
Use raqote for 2D canvas rendering

<!-- 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 (part of) #23431 and #23466

<!-- Either: -->

<!-- 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/23451)
<!-- Reviewable:end -->
2019-06-03 11:05:56 -04:00
bors-servo
22cbf5fd2a
Auto merge of #23498 - est31:unused_code_removal_2, r=jdm
Remove unused code (2/N)

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

Second PR in a series of PRs to remove unused/dead code from servo, powered by an (upcoming) tool of mine. Please take a look and tell me if you want to keep something.

Link to first PR: #23477

---
<!-- 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 only remove dead code

<!-- 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/23498)
<!-- Reviewable:end -->
2019-06-03 08:31:10 -04:00
bors-servo
2ee155ea3a
Auto merge of #23493 - oneturkmen:remove-get-opts, r=jdm
compositing: removed opts-get

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

Removed all `opts::get()` from `compositing` component.

---
<!-- 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 *partially* #22854 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they are not feature- or bug-related changes.

<!-- 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/23493)
<!-- Reviewable:end -->
2019-06-03 03:46:43 -04:00
Josh Matthews
ce18636aef Make Azure backend build again. 2019-06-03 00:12:01 -04:00
Josh Matthews
3539c029f1 Most basic raqote draw target stubs. 2019-06-03 00:12:01 -04:00
Josh Matthews
db362184fd Fix formatting. 2019-06-03 00:12:01 -04:00
Josh Matthews
3243f1753b Add cargo feature to control canvas backend. 2019-06-03 00:12:01 -04:00
bors-servo
7f7eead3d8
Auto merge of #23372 - sreeise:xhr_resource_url, r=jdm
Change XHRContext and resource timing information to use request URL

<!-- Please describe your changes on the following line: -->
Change resource timing information to return the URL used to create the XHR and store the URL in XHRContext.

---
<!-- 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 #23329 (GitHub issue number if applicable)

<!-- 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/23372)
<!-- Reviewable:end -->
2019-06-02 22:48:25 -04:00
est31
e64de8d90a Remove unused code from a bunch of crates 2019-06-03 04:18:12 +02:00
bors-servo
886c2fad92
Auto merge of #23477 - est31:unused_code_removal, r=jdm
Remove unused code (1/N)

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

First PR in a series of PRs to remove unused/dead code from servo, powered by an (upcoming) tool of mine. Please take a look and tell me if you want to keep something.

---
<!-- 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 only remove dead code

<!-- 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/23477)
<!-- Reviewable:end -->
2019-06-02 19:43:00 -04:00
bors-servo
03f223663f
Auto merge of #23459 - Eijebong:compartments, r=jdm
Add an inCompartments config option for bindings

Fixes #23257

<!-- 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/23459)
<!-- Reviewable:end -->
2019-06-02 14:41:20 -04:00
est31
8b6ed3d182 Remove unused code from script* crates 2019-06-02 07:12:26 +02:00
csmoe
05bef140bf Implement worker origin member of WorkerLocation 2019-06-02 10:20:03 +08:00
est31
fe58aca75d Remove unused code from net and net_traits crates 2019-06-02 02:44:37 +02:00
oneturkmen
1819453ba2 compositing: removed opts-get 2019-06-01 13:54:57 -06:00
Josh Matthews
4c0afcea97 Fix behaviour of window resizing on Windows. 2019-06-01 14:40:07 -04:00
pylbrecht
42bf1984be Make CanvasData use GenericDrawTarget 2019-05-31 15:55:18 -04:00
pylbrecht
7ace517770 Make CanvasPaintState generic 2019-05-31 15:55:18 -04:00
pylbrecht
3182eba73b Implement GenericPathBuilder for azure_hl::PathBuilder 2019-05-31 15:55:18 -04:00
pylbrecht
7c6460443c Implement GenericDrawTarget for azure_hl::DrawTarget 2019-05-31 15:55:17 -04:00
pylbrecht
7ad5149e50 Add GenericDrawTarget trait 2019-05-31 15:55:17 -04:00
pylbrecht
d1397c0b20 Add raqote to canvas' dependencies 2019-05-31 15:55:14 -04:00