Commit graph

2975 commits

Author SHA1 Message Date
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
Simon Sapin
d1733aa502 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-08 00:09:56 +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
Paul Rouget
0d9161dd7b WR update 2018-08-06 07:22:24 +02:00
Fernando Jiménez Moreno
1649b6a528 Fix build errors after rebase 2018-07-30 14:23:45 +02:00
Bastien Orivel
ba9cbd87fb Update parking_lot to 0.6 2018-07-20 00:44:08 +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
bors-servo
3961e8d1eb
Auto merge of #19184 - bobthekingofegypt:fix/18706-abs-image-with-padding, r=mbrubeck
fix block size for absolute replaced element

Absolutely replaced elements with padding were incorrectly setting their
block size to include twice the padding values.  This attempts to stop
that extra padding for replaced elements but leave the working flow for
non replaced elements

<!-- 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 #18706 (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/19184)
<!-- Reviewable:end -->
2018-07-13 20:18:27 -04: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
Matt Brubeck
f6404f0ec2 Update dependencies to use new_debug_unrechable
Because reem/rust-debug-unreachable#6 makes `debug_unreachable` enable debug checks even in release builds since Rust 1.0.
2018-06-06 08:54:51 -07: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
bors-servo
7cc4165dda
Auto merge of #20868 - tigercosmos:gg1, r=emilio
fix logic in overflow_direction, also add a FIXME

<!-- Please describe your changes on the following line: -->
This PR fix #19477, which the logic is obviously wrong.

However, it is impossible to add a test for this.

Due to #20867, the ` overflow_direction` is a hard code now. It never go to other conditions.
I add a FIXME there, and also add a SPEC link.

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

<!-- Either: -->
- [ ] 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/20868)
<!-- Reviewable:end -->
2018-05-28 18:50:18 -04:00
Emilio Cobos Álvarez
bbb59614fa
Fix Servo build. 2018-05-28 16:02:31 +02:00
tigercosmos
423d417dd7 fix logic in overflow_direction, also add a FIXME 2018-05-26 10:31:26 -07: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
bors-servo
77dcc678fe
Auto merge of #20506 - jonleighton:font-fallback, r=emilio,mbrubeck
Font fallback

This implements more complete support for font fallback, see #17267.

r? @glennw @mbrubeck

<!-- 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/20506)
<!-- Reviewable:end -->
2018-05-19 09:53:29 -04:00
Emilio Cobos Álvarez
2a5007926d
Fix Servo build. 2018-05-19 10:15:17 +02:00
Jon Leighton
4403bcddfe Don't perform font matching for control characters
We can encounter control characters here, for example when processing a
<pre> element which contains newlines. Control characters are inherently
non-printing, therefore if we try to call find_by_codepoint for these
characters we will end up triggering an unnecessary font fallback
search.
2018-05-19 14:33:38 +10: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
Emilio Cobos Álvarez
33b593d32e
style: Fix servo build. 2018-05-05 17:19:06 +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
Emilio Cobos Álvarez
54b444992d
Fix servo build. 2018-04-28 10:26:47 +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
Bastien Orivel
8bd2e91cdc Update Webrender
Fixes #20609
2018-04-25 10:25:21 +02:00
Pyfisch
c0be925bed Move DL items from gfx to layout
Implement corner clipping.
Remove PixelFormat from WebrenderImageInfo.
Use WebRender text shadow.
Remove MallocSizeOf and Deserialize for DL items.

Closes #19649, #19680, #19802
2018-04-22 13:13:45 +02:00
Ramshell
d588590ed2 Add support for percentages in column-gap. 2018-04-05 21:04:29 -03:00
bors-servo
d744e35d38
Auto merge of #20482 - brainlessdeveloper:list-style-image-computed, r=emilio
Implement a URL-generic type for ListStyleImage

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

This should fix the following two "expected to fail" tests described in https://github.com/servo/servo/issues/18015:

- getComputedStyle(elem) for url() listStyleImage uses the resolved URL
  and elem.style uses the original URL

- getComputedStyle(elem) for url() listStyle uses the resolved URL
  and elem.style uses the original URL

I updated the test failure expectations by removing the corresponding `.ini` file.

---
<!-- 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 #18015 (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/20482)
<!-- Reviewable:end -->
2018-04-03 18:12:13 -04:00
Fausto Núñez Alberro
cc838f54e5
Implement a URL-generic type for list-style-image
This should fix the following two "expected to fail" tests:

- getComputedStyle(elem) for url() listStyleImage uses the resolved URL
  and elem.style uses the original URL

- getComputedStyle(elem) for url() listStyle uses the resolved URL
  and elem.style uses the original URL
2018-04-03 22:01:26 +02:00
bors-servo
9cd60c8e78
Auto merge of #20447 - Brody-Eastwood:master, r=jdm
NCSU Canvas Rendering Project Initial Steps

<!-- Please describe your changes on the following line: -->
Implements the initial steps from:

https://github.com/servo/servo/wiki/Canvas-rendering-project

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

<!-- 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/20447)
<!-- Reviewable:end -->
2018-04-02 22:24:34 -04:00
Brody Eastwood
8a1590efc6 Add unique canvas IDs to all canvas operations. 2018-04-02 22:02:22 -04:00
Emilio Cobos Álvarez
744809a8b2
style: Add support for 'flex-basis:content' in the style system.
Bug: 1105111
Reviewed-by: xidorn
MozReview-Commit-ID: 5WhgHJJ0mDB
2018-04-02 03:17:56 +02:00