Commit graph

25860 commits

Author SHA1 Message Date
bors-servo
15f3db5abf Auto merge of #16794 - emilio:table-text-fixup, r=Manishearth
style: Adjust text-align properly for -moz- values in tables.

Fixes bug 1363576.

<!-- 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/16794)
<!-- Reviewable:end -->
2017-05-10 17:24:57 -05:00
bors-servo
c6c0252b19 Auto merge of #16798 - bzbarsky:stylist-lazier-updates, r=emilio
Allow stylo to do lazier stylist rebuilds

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1361843 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's optimization, which should have no observable behavior difference.

<!-- 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/16798)
<!-- Reviewable:end -->
2017-05-10 16:22:06 -05:00
Manish Goregaokar
195e37954f Allow border radii to be set via preshints 2017-05-10 14:08:01 -07:00
Josh Matthews
d143396934 Add same-origin redirect variants to 2d canvas security tests. 2017-05-10 16:38:57 -04:00
Boris Zbarsky
4588664873 Clear the stylist when Gecko stylesheets change, but don't rebuild it until explicitly flushed.
This is the servo part of part 3 of the fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1361843
2017-05-10 16:25:54 -04:00
Pyfisch
11903830f8 Remove unused debug opts 2017-05-10 22:15:58 +02:00
bors-servo
c8171ed5d7 Auto merge of #16778 - emilio:snapshots, r=bholley
Take all the snapshots into account in the style system

See [bug 1355343](https://bugzilla.mozilla.org/show_bug.cgi?id=1355343).

The servo part of this patch presumably needs some polishing, let's see.

<!-- 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/16778)
<!-- Reviewable:end -->
2017-05-10 15:08:59 -05:00
Pyfisch
588922fecf Remove "Must be used with -w option" note 2017-05-10 21:54:32 +02:00
Ting-Yu Lin
4c9d8d36ad Simply element bounds in stylist
TElement already inherits from Debug and PresentationalHintsSynthesizer.
2017-05-10 11:28:31 -07:00
Ting-Yu Lin
dd5f73750c Fix typo for PresentationalHintsSynthesizer 2017-05-10 11:28:26 -07:00
Boris Zbarsky
fb5b587371 Split up Stylist's update() method into separate clear() and rebuild() methods.
This is part 1 of the fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1361843
2017-05-10 13:11:01 -04:00
bors-servo
d5efed6c6a Auto merge of #16770 - nox:POSITION-DO-YOU-EVEN, r=Wafflespeanut,nox
Refactor Position

<!-- 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/16770)
<!-- Reviewable:end -->
2017-05-10 09:56:17 -05:00
Anthony Ramine
70ec61cf01 Refactor Position
A specified position is now a struct made of two values of different types,
the first one being PositionComponent<X>, and the second one PositionComponent<Y>.

A position component is represented by the new enum PositionComponent<Side>,
with the three values Center, Length(LengthOrPercentage), and
Side(Side, Option<LengthOrPercentage>).

Side keywords are represented by the X and Y enums, which don't include a value
for the center keyword anymore. They are accompanied by the Side trait, which
allows us to determine whether a side keyword is "left" or "top".

This refactor simplified the parsing and serialisation code and exposed bugs in it,
where it would reject valid <position> values followed by arbitrary tokens,
and where it would fail to prefer "left" to "right" when serialising positions
in basic shapes.
2017-05-10 16:56:01 +02:00
Fernando Jiménez Moreno
79e9168c00 Stylo: Bug 1361994 - Implement access to CSSMozDocumentRule 2017-05-10 16:55:44 +02:00
Emilio Cobos Álvarez
3ec2b4f486
style: Adjust text-align properly for -moz- values in tables.
Fixes bug 1363576.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-10 12:59:14 +02:00
Emilio Cobos Álvarez
e6fc0aae14
Update bindgen.
MozReview-Commit-ID: Dyyvo6YMTcL
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-10 12:17:02 +02:00
Emilio Cobos Álvarez
c732b0c600
Bug 1355343: Cache snapshot lookups. r=bholley
This is likely to be important at least for the initial element.

For the rest of them this is likely useless because we create them in a
throwaway fashion.

MozReview-Commit-ID: EFz9WUdB8S0
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-10 12:05:40 +02:00
Emilio Cobos Álvarez
46bf5d61f0
Bug 1355343: Take all the snapshots into account. r=bholley
I've chosen this approach mainly because there's no other good way to guarantee
the model is correct than holding the snapshots alive until a style refresh.

What I tried before this (storing them in a sort of "immutable element data") is
a pain, since we call into style from the frame constructor and other content
notifications, which makes keeping track of which snapshots should be cleared an
which shouldn't an insane task.

Ideally we'd have a single entry-point for style, but that's not the case right
now, and changing that requires pretty non-trivial changes to the frame
constructor.

MozReview-Commit-ID: FF1KWZv2iBM
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-10 12:05:39 +02:00
Emilio Cobos Álvarez
7d45aad9b4
Bug 1355343: Move node restyle bits to Element, and add bits for snapshot handling. r=bholley
MozReview-Commit-ID: 6OrUKX5RcBq
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-10 12:05:38 +02:00
bors-servo
0040160b38 Auto merge of #16792 - birtles:make-animatable-trait, r=hiro
Combine ComputeDuration and Interpolate into a single trait

Pull request for [Gecko bug 1363573](https://bugzilla.mozilla.org/show_bug.cgi?id=1363573)

The pull request has been reviewed by @hiikezoe

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes in Gecko

<!-- 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/16792)
<!-- Reviewable:end -->
2017-05-10 02:05:43 -05:00
Brian Birtles
6dfc1d1aa8 Merge ComputeDistance trait into Animatable trait 2017-05-10 14:41:26 +09:00
bors-servo
bd3ebf219e Auto merge of #16791 - upsuper:counters-fix, r=heycam
Fix serialization of counters function.

This would fix several failures in Gecko's test.

<!-- 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/16791)
<!-- Reviewable:end -->
2017-05-10 00:26:04 -05:00
Xidorn Quan
512c2e9d88 Fix serialization of counters function. 2017-05-10 14:38:32 +10:00
Brian Birtles
4d25e87ac6 Rename the Interpolate trait to Animatable 2017-05-10 13:38:06 +09:00
bors-servo
2a7ef1d203 Auto merge of #16789 - CJKu:bug-1310885-part-2, r=heycam
stylo: Export RefPtr<ImageValue> to stylo.

<!-- Please describe your changes on the following line: -->
This is the second patch in bug 1310885
"Bug 1310885 - Part 2. (stylo) Export RefPtr<ImageValue> from gecko to stylo."

Bugzilla link:
https://bugzilla.mozilla.org/show_bug.cgi?id=1310885
---
<!-- 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 _____

<!-- 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/16789)
<!-- Reviewable:end -->
2017-05-09 23:00:51 -05:00
bors-servo
e029a42653 Auto merge of #16790 - upsuper:sync-bindings, r=heycam
Sync binding files with autoland

It seems there are lots of difference between servo in-tree files and autoland. To reduce the chance of having conflict, I'd like to sync binding files with the latest version generated from autoland when no one is landing anything.

<!-- 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/16790)
<!-- Reviewable:end -->
2017-05-09 21:58:22 -05:00
Xidorn Quan
2a46e10732 Sync binding files with autoland 2017-05-10 12:51:05 +10:00
bors-servo
82bffefbf7 Auto merge of #16786 - froydnj:gecko-profiler-bindings, r=upsuper
register stylo threads with the gecko profiler

Now that we require rayon 0.7, we can register start and stop handlers
that take care of dealing with the Gecko profiler for rayon threads in
the style thread pool.

Manually verified that adding "StyleThread" to the list of threads tracked by the Gecko profiler addon caused lots of threads to show up in a profile, and all the stack unwinding goodness seems to work!

- [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).

<!-- 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/16786)
<!-- Reviewable:end -->
2017-05-09 19:12:40 -05:00
Nathan Froyd
74ce5bd0ae register stylo threads with the gecko profiler
Now that we require rayon 0.7, we can register start and stop handlers
that take care of dealing with the Gecko profiler for rayon threads in
the style thread pool.
2017-05-09 19:43:53 -04:00
bors-servo
a05427fcd0 Auto merge of #16782 - chenpighead:stylo-serialization-of-image-orientation, r=nox
Fix the serialization of image-orientation property

Gecko bug: [Bug 1363295](https://bugzilla.mozilla.org/show_bug.cgi?id=1363295)

<!-- 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/16782)
<!-- Reviewable:end -->
2017-05-09 16:10:49 -05:00
bors-servo
66cfea6728 Auto merge of #16784 - mbrubeck:has_author, r=bholley
Bug 1349651 - stylo: Implement HasAuthorSpecifiedRules.

https://bugzilla.mozilla.org/show_bug.cgi?id=1349651

<!-- 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/16784)
<!-- Reviewable:end -->
2017-05-09 13:21:29 -05:00
Matt Brubeck
32d37795a2 Bug 1349651 - stylo: Implement HasAuthorSpecifiedRules. 2017-05-09 10:01:46 -07:00
Jeremy Chen
1c8e6eb30c stylo: Fix the serialization of image-orientation property. r=heycam
Gecko bug: Bug 1363295
2017-05-09 23:01:44 +08:00
bors-servo
121662aa57 Auto merge of #16780 - canaltinova:shorthand-aliases, r=emilio
Add comments to shorthand alias logic that explains the interesting bahavior

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

<!-- Either: -->
- [X] These changes do not require tests because they are just comments and variable name 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/16780)
<!-- Reviewable:end -->
2017-05-09 07:34:42 -05:00
Nazım Can Altınova
936fa7c90b
Add comments for shorthand alias property logic 2017-05-09 14:46:52 +03:00
Nazım Can Altınova
e1053f2c71
Rename ALIAS_PROPERTY with SHORTHAND_ALIAS_PROPERTY to prevent confusion 2017-05-09 14:23:39 +03:00
bors-servo
8bc20ee9ac Auto merge of #16768 - ferjm:bug1355408.mozdocument, r=xidorn
Stylo: Bug 1355408 - add support for @-moz-document

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

Link to the gecko bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1355408.

<!-- 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/16768)
<!-- Reviewable:end -->
2017-05-09 05:54:07 -05:00
Fernando Jiménez Moreno
b22e0e9494 Stylo: Bug 1355408 - add support for @-moz-document 2017-05-09 12:52:44 +02:00
cku
7d1ef34698 stylo: Export RefPtr<ImageValue> to stylo. 2017-05-09 16:46:47 +08:00
bors-servo
9c9bd17871 Auto merge of #16722 - UK992:clobber, r=SimonSapin
Add clobber mechanism

Solution for https://github.com/servo/servo/issues/16602 and https://github.com/servo/servo/issues/16632
Only work when `AUTOCLOBBER` environment variable is defined.

CC @SimonSapin @jdm

<!-- 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/16722)
<!-- Reviewable:end -->
2017-05-08 23:53:05 -05:00
bors-servo
fc3a7d03f2 Auto merge of #16303 - froydnj:rayon-version-bump, r=jdm
bump required rayon version to 0.7

...and bring jpeg-decoder along for the ride.  Minor tweaks were necessary because of rayon API changes.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- 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/16303)
<!-- Reviewable:end -->
2017-05-08 21:36:48 -05:00
bors-servo
8ff484d3fd Auto merge of #16767 - UK992:travis, r=jdm
Try to re-enable unit tests on travis-ci

After https://github.com/servo/servo/pull/16573 and https://github.com/servo/servo/pull/16593, issue https://github.com/servo/servo/issues/15076 _could_ be fixed.

Edit:
Closes #14723
Closes #15076

<!-- 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/16767)
<!-- Reviewable:end -->
2017-05-08 20:05:16 -05:00
bors-servo
fca15d3782 Auto merge of #16774 - emilio:unbust-stylo, r=Manishearth
Unbust stylo

<!-- 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/16774)
<!-- Reviewable:end -->
2017-05-08 18:59:33 -05:00
Emilio Cobos Álvarez
8bcb0e3e11
stylo: Update bindings. 2017-05-09 00:46:30 +02:00
Emilio Cobos Álvarez
29c52cc61b
stylo: Fix nsCOMPtr release bindings. 2017-05-09 00:46:27 +02:00
bors-servo
0d9b26f4e4 Auto merge of #16607 - canaltinova:moz-transform-var, r=SimonSapin
Fix variable serialization bug on shorthand alias properties

<!-- Please describe your changes on the following line: -->
-moz-transform were having a problem with variable serialization. It wasn't printing transform's value and transform wasn't printing -moz-transform's if their value was a variable. This PR fixes that.
Reduces stylo -moz-transform failures to 2: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3fd3a57873e5e98dfcb173eef4b13822a66fdf6a

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

<!-- 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/16607)
<!-- Reviewable:end -->
2017-05-08 17:34:54 -05:00
UK992
3f6703780b Try with enabled build-geckolib and test-stylo 2017-05-09 00:02:46 +02:00
UK992
be645794a6 Try to re-enable unit tests on travis-ci 2017-05-09 00:02:41 +02:00
bors-servo
19706085a7 Auto merge of #16756 - servo:rustup, r=jdm
Upgrade to rustc 1.19.0-nightly (ced823e26 2017-05-07)

<!-- 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/16756)
<!-- Reviewable:end -->
2017-05-08 16:06:56 -05:00
bors-servo
4e3544f05c Auto merge of #16761 - Ksbugbee:master, r=jdm
Use hash2 instead of deprecated hash

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

<!-- 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/16761)
<!-- Reviewable:end -->
2017-05-08 13:42:32 -05:00