Commit graph

5418 commits

Author SHA1 Message Date
bors-servo
1d98e3406a Auto merge of #16177 - emilio:stylo-pseudo-classes, r=heycam,jdm
Bug 1350140: stylo: Implement all the remaining state pseudo-classes.

<!-- 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/16177)
<!-- Reviewable:end -->
2017-03-29 08:48:12 -05:00
Emilio Cobos Álvarez
ab6277a91d
script: Update expected size of elements now we have bigger state flags. 2017-03-29 15:44:47 +02:00
Matthias Devlamynck
05b5aabc69
Shorthand with variable reference should not have extra whitespace after colon for serialization 2017-03-29 12:16:28 +02:00
bors-servo
572c4dde26 Auto merge of #16174 - Adynatos:15200-serialization-with-comma, r=Wafflespeanut
Added missing comma in {background,mask}-position

<!-- Please describe your changes on the following line: -->
Fixed #15200 - missing comma in serialized {background,mask}-position with multiple values.

---
<!-- 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 #15200 (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/16174)
<!-- Reviewable:end -->
2017-03-29 01:33:19 -05:00
Kuba Pawlaczyk
fbdee15c53 Fixed #15200 - added missing comma in {background,mask}-position
serialization
2017-03-28 23:28:24 +02:00
n0max
20c07332a1 Parse perspective property as non negative and add tests 2017-03-28 22:57:06 +02:00
streichgeorg
a0d23e3120 Issue #15959: Implemented parsing and serialization of initial-letter property 2017-03-28 18:53:30 +02:00
James Bendig
67282f9bee Add full parsing/serialization for mask-repeat and background-repeat 2017-03-27 14:52:56 -05:00
bors-servo
9f5b17202f Auto merge of #16146 - mrobinson:containing-block-scrolling, r=glennw
Fix scroll root of absolutely positioned elements

Absolutely positioned elements should be given the scroll root of their
containing block and not necessarily the scroll root of their parent.
This fixes several CSS tests, though others are still failing pending a
similar fix for inherited clipping rectangles.

Fixes #13530.

<!-- 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: -->
- [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/16146)
<!-- Reviewable:end -->
2017-03-27 06:57:32 -07:00
Emilio Cobos Álvarez
10ee812784
Fixup style unit tests 2017-03-27 12:42:35 +02:00
Emilio Cobos Álvarez
46c6b4e1f3
Manifest update 2017-03-27 12:42:33 +02:00
Emilio Cobos Álvarez
37d8ee9037
style: Test a few more properties, and update expectations. 2017-03-27 12:42:29 +02:00
Emilio Cobos Álvarez
fc72f096a0
style: Properly track whether <angle> or <time> values came from calc() expressions. 2017-03-27 12:42:22 +02:00
Martin Robinson
feac76701f Fix scroll root of absolutely positioned elements
Absolutely positioned elements should be given the scroll root of their
containing block and not necessarily the scroll root of their parent.
This fixes several CSS tests, though others are still failing pending a
similar fix for inherited clipping rectangles.

Fixes #13530.
2017-03-27 08:43:07 +02:00
Emilio Cobos Álvarez
c654c05884
Fixup invalid test. 2017-03-27 03:56:33 +02:00
Emilio Cobos Álvarez
3ab6a20c85
style: Test for calc integer expressions. 2017-03-27 03:56:32 +02:00
Emilio Cobos Álvarez
c7ce2ff483
style: Make numbers keep track of whether they were specified as calc(). 2017-03-27 03:56:30 +02:00
bors-servo
f4371dfa02 Auto merge of #16136 - streichgeorg:counter, r=emilio
to_css of counter-increment returns none when there are no properties.

<!-- Please describe your changes on the following line: -->
Changed to_css in style::properties::longhands::counter_increment returns "none" if there are no properties defined.

---
<!-- 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 #15977 (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/16136)
<!-- Reviewable:end -->
2017-03-26 14:56:23 -07:00
bors-servo
3b79bc2582 Auto merge of #16113 - glennw:update-wr-opaque-opt, r=mrobinson
Update WR (opaque rect optimization, stacking context culling).

<!-- 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/16113)
<!-- Reviewable:end -->
2017-03-26 14:04:07 -07:00
Glenn Watson
3ca0f8a9ac Update WR (opaque rect optimization, stacking context culling).
Correct viewport test references

These references were using an incorrect value for the expected
container width. Now that WebRender is no longer clipping to stacking
context boundaries the rendered width is correct (100% of viewport
width = 240px).
2017-03-27 06:14:34 +10:00
streichgeorg
a700972cbb Issue #15977: Serialize counter-increment when there are no properties 2017-03-26 21:52:40 +02:00
bors-servo
1105100c3b Auto merge of #16131 - nox:tungstenite, r=jdm
Use NetworkConnector directly to account for replaced hosts

<!-- 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/16131)
<!-- Reviewable:end -->
2017-03-26 10:17:16 -07:00
Anthony Ramine
bc5c4fa892 Rework replace_hosts and host_replacement
They do less cloning now.
2017-03-26 16:14:22 +02:00
bors-servo
fd8127b23b Auto merge of #15905 - mephisto41:add-border-gradient, r=emilio
Add gradient border support.

webrender add gradient border support in https://github.com/servo/webrender/pull/953. This pr add support in servo.

---
<!-- 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 it should be covered by wpt

<!-- 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/15905)
<!-- Reviewable:end -->
2017-03-26 02:29:16 -07:00
bors-servo
0f2c71aa66 Auto merge of #16044 - bd339:iss15754, r=emilio
Make writing-mode affect computed display

<!-- Please describe your changes on the following line: -->
The first manual test-case in #15754 passes now, but the second test-case still renders "Text" horizontally, which is apparently because of servo's experimental support for writing-mode.

---
<!-- 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 #15754 (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. -->

<!-- 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/16044)
<!-- Reviewable:end -->
2017-03-24 08:05:36 -07:00
bors-servo
189b0d9094 Auto merge of #16099 - nox:tungstenite, r=jdm
Properly follow the spec in WebSocket::Constructor

<!-- 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/16099)
<!-- Reviewable:end -->
2017-03-24 01:46:14 -07:00
Anthony Ramine
0bd54b904b Properly follow the spec in WebSocket::Constructor 2017-03-24 09:43:14 +01:00
bors-servo
636f8ceb50 Auto merge of #15972 - jryans:ps-contain, r=emilio
Parsing / serialization for CSS contain

Adds parsing / serialization for CSS contain to the style package.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15955
- [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/15972)
<!-- Reviewable:end -->
2017-03-23 13:23:51 -07:00
bors-servo
af9a1588d1 Auto merge of #16087 - jdm:testimprovement, r=metajack
Don't create a new XHR until the previous one is complete.

This test often times out when run under rr, because the event loop gets flooded with timer events that initiate XHRs before the previous XHR has completed. Additionally, we're running the event handler up to three times per XHR, which is just silly.

<!-- 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/16087)
<!-- Reviewable:end -->
2017-03-23 12:46:14 -07:00
bors-servo
f00f3fa81c Auto merge of #16104 - Wafflespeanut:box-shadow-serialization, r=Wafflespeanut
Properly serialize <box-shadow>

Rebase of #15703, fixes #15203

<!-- 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/16104)
<!-- Reviewable:end -->
2017-03-23 10:57:03 -07:00
Nikita-04
ce7d63bbd5 Properly serialize <box-shadow> 2017-03-23 23:26:18 +05:30
J. Ryan Stinnett
535959f2a5 Parsing / serialization for CSS contain 2017-03-23 11:29:12 -05:00
Josh Matthews
5c29637bef Don't create a new XHR until the previous one is complete. 2017-03-23 12:17:03 -04:00
bors-servo
c99289a928 Auto merge of #16073 - glennw:update-wr-glfns, r=mrobinson
Update WR (gl trait, scroll roots)

<!-- 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/16073)
<!-- Reviewable:end -->
2017-03-23 03:43:49 -07:00
Glenn Watson
fe75382bcb Update WR (gl/es runtime table, scroll roots). 2017-03-23 14:32:03 +10:00
Matt Brubeck
4aded872fc Fix compiler warnings in stylo unit tests 2017-03-22 08:39:12 -07:00
bors-servo
cb1438e44f Auto merge of #15813 - canaltinova:will-change, r=upsuper,emilio
Implement parsing/serialization and glue for will-change property

Implement parsing/serialization  and glue for will-change property

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

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

<!-- 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/15813)
<!-- Reviewable:end -->
2017-03-21 21:56:23 -07:00
bors-servo
7be9f0e7c4 Auto merge of #15519 - gterzian:implement_structuredclone_callbacks, r=jdm
implement structured clone callbacks - support Blob cloning

<!-- Please describe your changes on the following line: -->
1. Implement stubs for structured clone callbacks.
2. Support Blob cloning.

Partial implementation of https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm

---
<!-- 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 #15021 (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. -->

<!-- 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/15519)
<!-- Reviewable:end -->
2017-03-21 21:17:25 -07:00
Gregory Terzian
5c4f0be048 support structured cloning for Blob 2017-03-22 09:52:35 +08:00
Lucjan Suski
ee310fdc2a Avoid panics for empty or multibyte image usemap 2017-03-21 19:21:09 +01:00
Nazım Can Altınova
56b8c1d8b7
Implement parsing/serialization of will-change 2017-03-21 21:09:57 +03:00
Benjamin Dahse
8db0fcaa29 Make writing-mode affect computed display
If a box has a different writing-mode than its containing block, and has a specified display of inline, change the computed display to inline-block.
Also adds the second manual testcase from #15754 as a WPT to assert that the computed display does in fact change.
2017-03-20 18:20:15 +01:00
bors-servo
4a63581fad Auto merge of #15918 - munyari:whitespace, r=emilio
PropertyDeclaration with CSSWideKeyword is parsed

Addresses #15401

<!-- 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/15918)
<!-- Reviewable:end -->
2017-03-20 04:23:28 -07:00
Manish Goregaokar
c9198d92d5 Add separate specified value for keyword font sizes
In Gecko, these keywords compute to different values depending on the
font.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1341775
2017-03-20 00:06:04 -07:00
Panashe M. Fundira
ec87545774
PropertyDeclaration with CSSWideKeyword is parsed
Addresses #15401

The desired result is for `CSSWideKeyword`s to return false (they are
parsed) and other Custom declaration values to return true (they are unparsed).
2017-03-19 18:37:40 -04:00
Simon Sapin
1bacd0eb15 Move all PropertyDeclarationBlock from RwLock<_> to Locked<_> 2017-03-19 22:30:38 +01:00
Simon Sapin
aeffca2a59 Replace RwLock<StyleRule> with Locked<StyleRule> 2017-03-19 22:30:37 +01:00
Simon Sapin
57724e5a37 Replace RwLock<Keyframe> with Locked<Keyframe> 2017-03-19 22:30:37 +01:00
Simon Sapin
adb97d4cbe Wrap most CSS rules in Locked<_> instead of RwLock<_> 2017-03-19 22:30:36 +01:00
Simon Sapin
f35b4e27b3 Replace RwLock<CssRules> with Locked<CssRules> 2017-03-19 22:30:35 +01:00