Commit graph

16155 commits

Author SHA1 Message Date
bors-servo
63bed27073 Auto merge of #15900 - hiikezoe:process-css-animations, r=heycam
Process css animations for gecko

<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1341985 .

---
<!-- 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 it's for stylo

<!-- 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/15900)
<!-- Reviewable:end -->
2017-03-09 20:23:21 -08:00
bors-servo
8b8eb5e192 Auto merge of #15896 - canaltinova:flex-basis, r=Manishearth
Change the predefined type of flex-basis and make gecko glue auto-generate

Gecko [doesn't support](https://bugzilla.mozilla.org/show_bug.cgi?id=1105111) content value in flex-basis yet. We had to change the predefined type to `LengthOrPercentageOrAuto` in stylo build.

---
<!-- 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 [Bug 1331529](https://bugzilla.mozilla.org/show_bug.cgi?id=1331529)

<!-- Either: -->
- [X] These changes do not require tests because it's stylo glue change.

<!-- 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/15896)
<!-- Reviewable:end -->
2017-03-09 18:46:37 -08:00
Hiroyuki Ikezoe
f2c547aaaf Call UpdateAnimations even if the element has no computed values. 2017-03-10 11:37:06 +09:00
Hiroyuki Ikezoe
c32ba98031 Skip update_animations if we have no running animations and the element becomes display:none. 2017-03-10 11:37:05 +09:00
Hiroyuki Ikezoe
9ff99d4608 Update CSS animations in a SequentialTask.
We create the SequentialTask only if:

* We have no old computed values and we have animation name style in the new
  computed values.
* Any animation properties is changed.
* display property is changed from 'none' and we have animation name style.
* display property is changed to 'none'.

In a subsequent patch we skip the SequentialTask if we have no running
animations and the display propery is changed to 'none'.
2017-03-10 11:36:58 +09:00
Glenn Watson
2b4511e3c6 Update WR (pre-multiply images). 2017-03-10 12:33:55 +10:00
Hiroyuki Ikezoe
fdb8c48094 Split off animation related process in a function. 2017-03-10 11:09:18 +09:00
Hiroyuki Ikezoe
22de4dc7a6 Add a utility function to convert PseudoElement to nsIAtom*.
MozReview-Commit-ID: 14qYFpiW0iG
2017-03-10 11:08:58 +09:00
Hiroyuki Ikezoe
d8f08b80e0 Implement Gecko_StyleAnimationsEquals for checking nsStyleAutoArray<StyleAnimation> equality in servo side.
Later we update CSS animations if this function returns false.
2017-03-10 11:07:18 +09:00
bors-servo
d124297456 Auto merge of #15839 - chenpighead:stylo-text-justify, r=upsuper
Stylo - gecko glue code for text-justify

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

Implement gecko glue for text-justify property.

Gecko has supported text-justify in [Bug 276079](https://bugzilla.mozilla.org/show_bug.cgi?id=276079), and going to pref-on on Nightly very soon in [Bug 1343512](https://bugzilla.mozilla.org/show_bug.cgi?id=1343512). Let's make it work for stylo.

---
<!-- 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
- [ ] 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/15839)
<!-- Reviewable:end -->
2017-03-09 17:57:15 -08:00
Hiroyuki Ikezoe
2892071ce7 Update bindings. 2017-03-10 10:55:00 +09:00
Jeremy Chen
6ff62b1c36 Stylo - gecko glue code for text-justify 2017-03-10 09:34:47 +08:00
bors-servo
8f7c69e15f Auto merge of #15783 - ferjm:issue15756-parse-hosts, r=avadacatavra
Replace manual host parsing code with parse-host crate

This patch is replacing the code to parse the hosts file with the [parse-hosts](https://crates.io/crates/parse-hosts) crate. This crate has a [CC0 1.0 Universal License](https://creativecommons.org/publicdomain/zero/1.0/deed.en).

I could have used [HostsFile::load()](https://clarcharr.github.io/parse-hosts/parse_hosts/struct.HostsFile.html#method.load) directly, but this method loads `/etc/hosts` by default and does not allow to override the default path (for example with [env::var("HOST_FILE")](https://dxr.mozilla.org/servo/source/components/net_traits/hosts.rs#19)), so I kept the existing code to open and read the content of `env::var("HOST_FILE")` and also kept the [parse_hostsfile](https://dxr.mozilla.org/servo/source/components/net_traits/hosts.rs#42) method (used by the unit tests), but I modified it to use [HostsFile::read_buffered](https://clarcharr.github.io/parse-hosts/parse_hosts/struct.HostsFile.html#method.read_buffered), which is doing the actual hosts parsing for a given string buffer.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15756 .
- [X] There are tests for these changes (tests/unit/net/resource_thread.rs and tests/unit/net/http_loader.rs)

<!-- 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/15783)
<!-- Reviewable:end -->
2017-03-09 17:17:14 -08:00
Jamie Nicol
ec3142e811 Premultiply RGBA image data before sending to webrender 2017-03-10 11:06:44 +10:00
Nazım Can Altınova
aa5477bd34
Change predefined type of flex-basis / make gecko glue auto-generate
Gecko doesn't support content value in flex-basis yet.
2017-03-10 03:14:06 +03:00
bors-servo
ee223798cc Auto merge of #15893 - Manishearth:stylo-svg-pres, r=bz
Support SVG presentation attributes

r=bz from https://bugzilla.mozilla.org/show_bug.cgi?id=1329093

<!-- 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/15893)
<!-- Reviewable:end -->
2017-03-09 15:02:06 -08:00
Manish Goregaokar
eda6a4fc4f stylo: Pass parser URL data in Servo_DeclarationBlock_SetProperty*
MozReview-Commit-ID: EVk4aEoyiXv
2017-03-09 14:44:17 -08:00
Fernando Jiménez Moreno
79b7b9de54 Replace manual host parsing code with parse-host crate 2017-03-09 22:20:09 +01:00
Manish Goregaokar
14d8eb93ba stylo: Handle SVG presentation attributes 2017-03-09 12:23:30 -08:00
bors-servo
5c46e86546 Auto merge of #15888 - emilio:caching, r=Ms2ger
style: Simplify style sharing code.

No functional changes, just some code cleanup.

<!-- 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/15888)
<!-- Reviewable:end -->
2017-03-09 11:33:33 -08:00
Emilio Cobos Álvarez
727be58b4a
style: Simplify style sharing code. 2017-03-09 19:31:03 +01:00
bors-servo
e7efdfc655 Auto merge of #15869 - Iakis:NegBordRad, r=Wafflespeanut
Reject negative border radius

Replacerd Parse in parse_one_set_of_border_values with parse_non_negative and added tests for it
---
<!-- 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 #15345 (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/15869)
<!-- Reviewable:end -->
2017-03-09 04:52:35 -08:00
#
f5253c9f09 Fix and tests for negative border radius 2017-03-09 07:48:51 -05:00
bors-servo
802440dbf0 Auto merge of #15879 - glennw:update-wr-scroll, r=mrobinson
Update WR (scroll root changes, border gradients, yuv updates).

<!-- 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/15879)
<!-- Reviewable:end -->
2017-03-08 23:43:10 -08:00
Glenn Watson
ce49bc5f89 Update WR (scroll root changes, border gradients, yuv updates). 2017-03-09 16:01:47 +10:00
bors-servo
dc3b32c853 Auto merge of #15861 - projektir:make-text-decoration-testable, r=Wafflespeanut
Make text decoration testable and do not serialize initial text-decoration-style

Servo now uses the same name for the text-decoration-line longhand property as Gecko. This was done to enable testing of the text-decoration shorthand.

The text-decoration shorthand has been fixed to not serialize initial text-decoration-style.

---

- [x ] `./mach build -d` does not report any errors
- [x ] `./mach test-tidy` does not report any errors
- [x ] These changes fix #15790

---

- [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/15861)
<!-- Reviewable:end -->
2017-03-08 21:39:30 -08:00
projektir
b4c50de31e Don't serialize initial text-decoration-style #15790 2017-03-09 00:33:17 -05:00
bors-servo
5fe921f2ab Auto merge of #15844 - notriddle:domain_match_lowercase, r=nox
Assert that `domain_match` is operating on lowercase text

> (Note that both the domain string and the string will have been
> canonicalized to lower case at this point.)

Related to #15789

<!-- 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/15844)
<!-- Reviewable:end -->
2017-03-08 18:18:16 -08:00
Michael Howell
b0499e3422 Assert that domain_match is operating on lowercase text
> (Note that both the domain string and the string will have been
> canonicalized to lower case at this point.)

Related to #15789
2017-03-09 02:18:02 +00:00
Glenn Watson
034feafa8c Update WR (types updates, stacking context culling) 2017-03-09 10:32:40 +10:00
bors-servo
2565242665 Auto merge of #15872 - servo:dedup, r=emilio
Fix debug assertion failure in gecko 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/15872)
<!-- Reviewable:end -->
2017-03-08 13:35:40 -08:00
Simon Sapin
765be69780 Fix debug assertion failure https://bugzilla.mozilla.org/show_bug.cgi?id=1345483 2017-03-08 13:35:18 -08:00
Emilio Cobos Álvarez
1eb24f1adc
style: Allow trailing whitespace in a calc expression. 2017-03-08 17:07:54 +01:00
Emilio Cobos Álvarez
dae17dcaf3
style: Fix indentation in calc parsing code. 2017-03-08 16:54:10 +01:00
bors-servo
c11d398010 Auto merge of #15866 - servo:whitespace, r=nox
Require spaces around operators in calc() (fixes #15486)

<!-- 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/15866)
<!-- Reviewable:end -->
2017-03-08 06:12:54 -08:00
radhika2896
0138bbcdd1 Require spaces around operators in calc() (fixes #15486) 2017-03-08 14:32:25 +01:00
bors-servo
1f2e1e8b84 Auto merge of #15867 - servo:negative, r=nox
Reject negative factors in filter functions (fixes #15494)

<!-- 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/15867)
<!-- Reviewable:end -->
2017-03-08 05:28:59 -08:00
bors-servo
f90fc2fa88 Auto merge of #15771 - jdm:img-panic, r=nox
Improve behaviour of image elements that perform multiple requests

This addresses cases where image elements end up making multiple requests, as well as makes the element respond to additional relevant mutations that trigger updating the image data.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15709 (github issue number if applicable).
- [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/15771)
<!-- Reviewable:end -->
2017-03-08 04:28:58 -08:00
bors-servo
4fc7034370 Auto merge of #15856 - servo:dedup, r=Manishearth
Deduplicate declarations on insertion, not at the end of parsing a block

<!-- 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 #15558 (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/15856)
<!-- Reviewable:end -->
2017-03-08 03:07:04 -08:00
Simon Sapin
446aaa5845 Better variable name, remove obsolete comment 2017-03-08 12:03:47 +01:00
Jason Tran
b7edf34c8c Reject negative factors in filter functions (fixes #15494) 2017-03-08 11:54:12 +01:00
bors-servo
8b60a409c1 Auto merge of #15849 - servo:content-blocker, r=nox
Remove unused content blocker code.

I don't know what it is for, so I believe it would be better to remove it
entirely until and unless we start using it.

<!-- 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/15849)
<!-- Reviewable:end -->
2017-03-08 02:08:19 -08:00
bors-servo
ee3af09a8c Auto merge of #15863 - BorisChiou:animation/ns_timing_function, r=heycam
stylo: update ns_timing_function

This is an interdependent binding fix for [Bug 1248340](https://bugzilla.mozilla.org/show_bug.cgi?id=1248340).

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1248340](https://bugzilla.mozilla.org/show_bug.cgi?id=1248340)
- [X] These changes do not require tests because Bug 1248340 will merge some wpt tests for frames timing function.

<!-- 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/15863)
<!-- Reviewable:end -->
2017-03-07 23:03:21 -08:00
bors-servo
8ed29f4a96 Auto merge of #15843 - bzbarsky:split-anon-box-atoms, r=bzbarsky
Servo side of gecko bug 1343078: update bindinggen bits for the changes I'm making to Gecko atoms.

<!-- 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: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because they will get tested by Firefox CI.

<!-- 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/15843)
<!-- Reviewable:end -->
2017-03-07 22:28:02 -08:00
Boris Zbarsky
9a5a26078a Update bindinggen bits for gecko bug 1343078.
Both the set of atoms and the way they are represented in the atom list
is changing a bit.
2017-03-08 00:13:29 -05:00
Boris Chiou
0e97f07290 Bug 1248340 - Update bindgen. 2017-03-08 11:37:58 +08:00
Boris Chiou
510a4d05ba Bug 1248340 - Update the step data member in ns_timing_function.rs.
Replace mStep with mStepsOrFrames, and panic in From trait for frames timing
function.
2017-03-08 11:37:52 +08:00
Simon Sapin
60f454d7c4 Use a bitmap to optimize adding to a PropertyDeclarationBlock. 2017-03-07 23:37:32 +01:00
Simon Sapin
f70a49974a Make PropertyDeclarationBlock fields private 2017-03-07 23:37:32 +01:00
Simon Sapin
da4e5146e9 Make PropertyDeclarationBlock::important_count private. 2017-03-07 23:37:31 +01:00