Commit graph

88 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
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
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
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
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
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
006bef5eb5 layout: set building information for media fragment 2018-10-08 16:12:01 +02: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
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
Pyfisch
349047b096 Rustfmt layout crate 2018-09-01 13:24:57 +02:00
Pyfisch
1c438ed82c Do not emit DL items for zero images
Fixes wpt test failure.
2018-08-16 12:41:37 +02:00
Pyfisch
9e971f9d8f 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.
2018-08-06 19:47:00 +02:00
Bastien Orivel
9e446971a8 Update euclid to 0.18 2018-07-18 09:27:24 +02:00
Glenn Watson
1881a06c40 Updates for WR gradient API change. 2018-07-16 10:57:10 +10:00
Emilio Cobos Álvarez
719209316c
Fix servo build. 2018-07-01 00:54:30 +02:00
bors-servo
e2fca1b228
Auto merge of #20892 - gw3583:update-wr, r=mbrubeck
Update WR (transaction API change)

<!-- 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/20892)
<!-- Reviewable:end -->
2018-06-26 17:27:31 -04:00
Martin Robinson
7d672555be Give stacking contexts the right reference frame id
Stacking contexts that create reference frames should be created with
the positioning node set to the reference frames that surround them.
2018-06-25 07:35:26 +10:00
Martin Robinson
253117ece6 New reference frames should create containing blocks
Transforms should always create containing blocks. This bug already
existed in Servo, but was covered up by the reference frame id
replacement feature in WebRender. Now that we create reference frames
manually we need to fix it.
2018-06-25 07:35:19 +10:00
Martin Robinson
d41c512e98 Allow inline elements to create reference frames
This is important so that transforms applied to elements actually apply
to the display items created for those elements.
2018-06-25 07:35:10 +10:00
Emilio Cobos Álvarez
895946bb18
layout: script: Fix build. 2018-06-23 20:34:10 +02:00
Martin Robinson
01c0e2aba0 Changes for separate reference frame PR (#2756) 2018-06-20 09:43:51 +10:00
Glenn Watson
823f3e2eb1 Update WR (transaction API change) 2018-06-20 09:15:31 +10:00
Emilio Cobos Álvarez
083857a4b0
Fix Servo build. 2018-06-18 20:01:48 +02:00
Martin Robinson
32f00ef821 Use reference frames explicitly for fixed positioning
Now that WebRender gives us reference frame ClipIds, we can use those to
implement fixed positioning in Servo. This will allow us to remove the
feature from WebRender entirely.
2018-06-04 13:52:08 +02:00
Emilio Cobos Álvarez
bbb59614fa
Fix Servo build. 2018-05-28 16:02:31 +02:00
bors-servo
ea214e9bc3
Auto merge of #20752 - pyfisch:backgrounds42, r=emilio
Fix crash in DL building

Fix one crash and some style changes.

This HTML crashed servo before. Key parts are `background-clip: content-box` and `direction: rtl`

```html
<!DOCTYPE html>
<html>
    <style>
        #span1 {
            background-clip: content-box;
        }
        #span2
        {
            direction: rtl;
        }
    </style>
    <span id="span1">Filler Text <span id="span2">txeT relliF</span></span>
</html>
```
Should I add this as a test? And where do I put this "does-it-crash?" test?

I find always passing rectangles by value a lot easier as it avoids many references and dereferences and I assume that the compiler will always use the faster one either way. If you don't like the change feel free to only merge the first 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/20752)
<!-- Reviewable:end -->
2018-05-19 11:02:01 -04:00
Emilio Cobos Álvarez
2a5007926d
Fix Servo build. 2018-05-19 10:15:17 +02:00
Pyfisch
ee38fd6f0a Rustfmt components/layout/display_list/ 2018-05-05 22:19:03 +02:00
Pyfisch
4b3ccc7c8c Pass Rect<Au> by value and not by reference
Style change in display_list/builder.rs to reduce
the number of & and * found in the code.
Rect<Au> are basically 4 integers so there is no
need to pass by reference.
2018-05-05 22:16:23 +02:00
Pyfisch
596b53d5f8 Fix crash in background building
Always use border_padding and writing_mode from the same fragment.
Mixing them will trigger a debug assertion if the writing modes are different.

Cleanup and use compute_background_clip
2018-05-05 21:38:51 +02:00
Anthony Ramine
0f91712800 Update to gleam 0.5 2018-05-05 13:08:36 +02:00
Pyfisch
46283af211 Correct edge case for background color clip
Use the color clip corresponding to the last background-image instead
of the last background-clip. (There may be more clips than images and
clips are repeated if there are less clips than images.)

Add a test.
2018-05-03 11:34:04 +02:00
Pyfisch
7eff53e250 Implement border-image-outset
Add an automatic test for border-image-outset with a gradient.
Convert two tests from UTF-8 LE with CRLF line endings to
UTF-8 with LF endings as the old files could not be viewed with servo.

Closes #16638
2018-05-02 22:11:38 +02:00
bors-servo
0ff6f32d7d
Auto merge of #20420 - pyfisch:corner-clipping, r=emilio
Move DL items from gfx to layout and implement corner clipping

Implement corner clipping.
Remove PixelFormat from WebrenderImageInfo.
Use WebRender text shadow.
Remove MallocSizeOf and Deserialize for DL items.

Closes #19649, closes #19680, closes #19802

<!-- 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 #__ (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/20420)
<!-- Reviewable:end -->
2018-04-29 02:30:16 -04:00
Emilio Cobos Álvarez
292f899631
style: Fix tidy issues and Servo build. 2018-04-29 05:09:43 +02:00
Anthony Ramine
6156d9aacb Update Webrender to last version 2018-04-26 16:50:24 +02:00
Pyfisch
aada975dea Place item clipping_and_scrolling inside closure
A utility function assures that if the clipping and scrolling are changed
for a display item the old value is later restored.
2018-04-25 13:19:46 +02:00