Commit graph

2821 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
c6dfe53483 Fix servo build. 2018-12-02 14:17:29 -05:00
Manish Goregaokar
5413328be2 Update webrender 2018-11-27 17:33:13 -08:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Bastien Orivel
9a7eeb349a Update crossbeam-channel to 0.3 2018-11-18 19:33:19 +01:00
bors-servo
19b4f35de1
Auto merge of #22167 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

See each individual commit for details.

<!-- 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/22167)
<!-- Reviewable:end -->
2018-11-10 15:43:20 -05:00
Emilio Cobos Álvarez
48ce20b6fe
layout: Fix servo build.
TextAlign now implements FromPrimitive instead of an ad-hoc method.
2018-11-10 21:11:47 +01:00
Pyfisch
0e4c4971be Use GradientBuilder::into_stops
Avoid cloning gradient stops.
2018-11-10 12:43:18 +01:00
Josh Matthews
1eee3c73eb Add a transparent hit-testing rectangle for scrollable block content. 2018-11-09 14:08:46 -05:00
Emilio Cobos Álvarez
2ea4af1171
Fix Servo build. 2018-11-08 15:22:30 +01:00
Simon Sapin
9f977c5287 Remove useless use crate_name; imports.
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +01:00
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
bors-servo
da2d9b2228
Auto merge of #22126 - pyfisch:autoformat, r=jdm
Enforce rustfmt on CI

<!-- 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/22126)
<!-- Reviewable:end -->
2018-11-07 08:47:57 -05:00
bors-servo
618a790050
Auto merge of #22074 - jdm:wrup, r=nox
Update webrender.

Fixes #22114.

<!-- 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/22074)
<!-- Reviewable:end -->
2018-11-07 00:40:42 -05:00
Josh Matthews
1c5e4b3067 Update webrender to 790b76f1547453615262c3037e1fb04bda22fbc8. 2018-11-06 16:51:58 -05:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Pyfisch
cb07debcb6 Format remaining files 2018-11-06 22:30:31 +01:00
Simon Sapin
9f9bf8f6bc Switch most crates to the 2018 edition 2018-11-06 16:12:04 +01:00
Simon Sapin
76e59a46d3 Sort use statements 2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Pyfisch
93abe795c6 Directly build WebRender LineDisplayItem
Remove unused SimpleMatrixDetection.
2018-10-28 22:23:36 +01:00
Pyfisch
d9b1950d74 Layout: Remove redundant deny unsafe and format
Add license to two files.

Bypass DisplayListBuilder for some items.
2018-10-22 16:15:48 +02:00
Pyfisch
2ff330a5c9 Split layout/background.rs file
Have background, border and gradient modules
for calculation functions.
Use shorter names for functions that are qualified
by the module name like `border::radii`.

Use push_item and push_iter to add items to WebRender.
2018-10-22 16:15:46 +02:00
Emilio Cobos Álvarez
856886c40d
Fix Servo build. 2018-10-19 01:01:27 +02:00
Emilio Cobos Álvarez
561e9c81f1
style: More useful logging for transition-related stuff.
Transitions are still broken, but I found these messages more helpful than the
previous ones when diagnosing problems.
2018-10-15 14:50:13 +02:00
Emilio Cobos Álvarez
1ba57cbaad
style: Remove unused expired boolean in Animation::Transition.
The last caller who used was #14418, which did fix a problem but introduced
multiple. In particular, now transitions don't get expired ever, until they
finish running of course.

That is not ok, given you can have something that the user can trigger to change
the style (hi, :hover, for example), and right now that triggers new
transitions, getting this into a really funny state.

I should give fixing this a shot, but it's non-trivial at all.
2018-10-15 04:52:50 +02:00
bors-servo
e4657c1496
Auto merge of #21931 - jdm:reload-images, r=emilio
Make layout use available image data before querying the image cache.

These changes make layout more efficient for any page which contains images that have already loaded, since it does not require synchronously querying the image cache thread for each image present. It also makes reloading a page actually display the images that are already in the image cache.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21919
- [x] There are tests for these changes

<!-- 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/21931)
<!-- Reviewable:end -->
2018-10-13 07:56:11 -04:00
Josh Matthews
49d2ea4f74 Make layout use available image data before querying the image cache. 2018-10-12 21:55:09 -04:00
Josh Matthews
171469c27c Update webrender to 923ee495bd9b0fda8a4a94c5a6cf42e2f0548731. 2018-10-09 18:23:19 -04:00
Pyfisch
d13172845c Update Webrender
New version is
9156a4465f6ad715a0206cdd9a7e9a6f0385fbd6
2018-10-09 18:23:18 -04:00
Fernando Jiménez Moreno
50582f1548 Rustfmt and make tidy happy 2018-10-08 16:12:03 +02:00
Fernando Jiménez Moreno
3fbeb398d4 Revert import style format 2018-10-08 16:12:02 +02:00
Fernando Jiménez Moreno
8c40ef459b Do not share entire FrameRenderer with layout, only current frame 2018-10-08 16:12:01 +02:00
Víctor Manuel Jáquez Leal
2d709a283b layout: instantiate SpecificFragmentInfo from node's media data 2018-10-08 16:12:01 +02:00
Víctor Manuel Jáquez Leal
006bef5eb5 layout: set building information for media fragment 2018-10-08 16:12:01 +02:00
Víctor Manuel Jáquez Leal
bdd3e2c835 layout: handle MediaFragmentInfo 2018-10-08 16:12:01 +02:00
bors-servo
97e3c5f3a9
Auto merge of #21608 - pyfisch:border-gradients, r=emilio
Improve border images

Respect CSS border-image-width.
Properly support gradients as a border-image-source.

Add a new test and mark two more as passing.

<!-- 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/21608)
<!-- Reviewable:end -->
2018-09-28 16:36:53 -04:00
Pyfisch
60d0c8cd76 Layout: stylistic changes
Additionally if an image border can't be displayed show solid border.
Introduce build_display_list_for_border_image to display border images.
2018-09-28 22:33:02 +02:00
Andre Bogus
34b5d8fbe8 This updates the smallvec crate and enables the union feature
We had a mix of 0.6.2 and 0.6.5 (which is the current release),
this unifies to the latest version. It also enables the union
feature which removes the discriminant, reducing memory usage.
2018-09-19 07:16:30 +02:00
Pyfisch
fabb70f874 Improve border images
Respect CSS border-image-width.
Properly support gradients as a border-image-source.
Only emit a border item if the border-width is non-zero
for simple borders but still emit one if the item is
an image as paint worklet that are not drawn cause servo
to hang and fail tests.

Add a new test and mark 4 more as passing.
2018-09-15 09:48:03 +02:00
bors-servo
b0de9c5315
Auto merge of #21628 - paavininanda:Current-pixel-density, r=jdm
Current pixel density

<!-- 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 a subset of #11416.

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

<!-- 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/21628)
<!-- Reviewable:end -->
2018-09-13 00:16:46 -04:00
paavininanda
25027e476c Current-pixel-density tests passing 2018-09-13 00:23:09 +05:30
Simon Sapin
2a996fbc8f Replace mpsc with crossbeam/servo channel, update ipc-channel
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
2018-09-12 13:33:32 +08:00
Matt Brubeck
a77d05538b Switch from new-ordered-float back to ordered-float
The `new-ordered-float` fork has been merged back into the original
`ordered-float` crate.
2018-09-11 09:59:01 -07:00
Pyfisch
349047b096 Rustfmt layout crate 2018-09-01 13:24:57 +02:00
Simon Sapin
1333b6ee45 Fix the build for NLL
Test with `RUSTFLAGS="-Zborrowck=mir -Ztwo-phase-borrows" cargo build`

https://internals.rust-lang.org/t/help-us-get-non-lexical-lifetimes-nll-over-the-finish-line/7807/7
2018-08-24 17:49:58 +02:00
bors-servo
54b387ab59
Auto merge of #21348 - pyfisch:only-webrender-items, r=jdm
Replace Servo DL items with WR ones

The Servo internal display list items are already pretty much
equivalent to the WebRender ones. Except that Servo items contain
base information and associated glyphs and gradient stops which are
stored implicitly in WebRender. Remove the display items for
rectangles, text, images, border, gradients and box shadow and
replace them with their WebRender counter parts.

Some more internal items like line, text shadow and iframe can definitively be replaced with WebRender equivalents but I think the PR is already quite huge. If WebRender would expose a quite minimal API which allowed servo to directly push items onto the display list most of webrender_helpers boilerplate code could go away. As WebRender performs normalization of gradients this would need to be called by servo explicitly in this case.

It should be noted that gradient borders don't actually work neither with the old version nor with this PR as the measurements are all set to zero.

Part of #19676

<!-- 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/21348)
<!-- Reviewable:end -->
2018-08-23 19:37:41 -04:00
Pyfisch
1c438ed82c Do not emit DL items for zero images
Fixes wpt test failure.
2018-08-16 12:41:37 +02:00
bors-servo
ea86eb64be
Auto merge of #21357 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central.

See each individual commit.

<!-- 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/21357)
<!-- Reviewable:end -->
2018-08-07 20:27:24 -04:00
Josh Matthews
7c32ad7c3d Revert "Fix the build for NLL"
This reverts commit d1733aa502.
2018-08-07 20:24:55 -04:00
Emilio Cobos Álvarez
689293e4fb
Fix Servo build. 2018-08-08 01:34:35 +02:00