Commit graph

1710 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
bf53447b9c
stylo: Regen bindings. 2016-12-25 01:41:21 +01:00
Emilio Cobos Álvarez
f08e851f81
style: Update bindings because of bug 1325006 2016-12-25 01:31:08 +01:00
Manish Goregaokar
211682ab49 Regen bindings 2016-12-22 23:26:21 -08:00
bors-servo
4052744139 Auto merge of #14671 - servo:style-no-plugins, r=mbrubeck
Remove the unused dependency of style to plugins.

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

<!-- 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/14671)
<!-- Reviewable:end -->
2016-12-22 12:53:33 -08:00
Bobby Holley
940cda1d15 Remove generation, remove filter pop, and add size tests. 2016-12-22 11:09:55 -08:00
Simon Sapin
6dec4580e6 Remove the unused dependency of style to plugins. 2016-12-22 19:54:04 +01:00
Bobby Holley
ea6a61af59 Stop using UnsafeNode in the parallel traversal.
\o/ \o/ \o/
2016-12-22 10:42:53 -08:00
Bobby Holley
b3cb786c81 Stop using UnsafeNode in the bloom filter. 2016-12-22 10:42:53 -08:00
Bobby Holley
96dc0d1eac Hoist SendElement into dom.rs, label construction as unsafe, and add corresponding SendNode. 2016-12-22 10:42:53 -08:00
Bobby Holley
b6e948dc5d Hoist bloom filter into scoped TLS and simplify code. 2016-12-22 10:42:53 -08:00
Cameron McCormack
2f81e8dfc9 Regenerate bindings. 2016-12-22 10:06:01 +08:00
Cameron McCormack
e1f86377bd Update atoms. 2016-12-22 10:06:00 +08:00
bors-servo
641010eed8 Auto merge of #14663 - ctjhoa:moz-orient, r=Manishearth
Stylo: implement -moz-orient

<!-- Please describe your changes on the following line: -->
https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-orient
![2016-12-21-213132_1342x870_scrot](https://cloud.githubusercontent.com/assets/1716173/21405334/c6c49cb2-c7c5-11e6-85d7-e10f71c331ef.png)

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it's a style addition

<!-- 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/14663)
<!-- Reviewable:end -->
2016-12-21 15:29:27 -08:00
Camille TJHOA
e8114ce19b Stylo: implement -moz-orient
Fix #14198
2016-12-21 21:31:58 +01:00
Bobby Holley
946e7fb7c3 Stop using UnsafeNode in the StyleSharingCandidateCache. 2016-12-21 11:10:41 -08:00
Bobby Holley
c5f01fe3b8 Introduce and use Scoped TLS.
It turns out that it's problematic to embed ThreadLocalStyleContext within
LayoutContext, because parameterizing the former on TElement (which we do
in the next patch) infects all the traversal stuff with the trait parameters,
which we don't really want.

In general, it probably makes sense to use separate scoped TLS types for
the separate DOM and Flow tree passes, so we can add a different ScopedTLS
type for the Flow pass if we ever need it.

We also reorder the |scope| and |shared| parameters in parallel.rs, because
it aligns more with the order in style/parallel.rs. I did this when I was
adding a TLS parameter to all these functions, which I realized we don't need
for now.
2016-12-21 11:10:39 -08:00
Bobby Holley
5c66815a21 Upgrade to rayon 0.6.
jpeg-decoder still needs updating. Until then we'll just have two copies.
2016-12-21 10:57:37 -08:00
bors-servo
c2e4e4295e Auto merge of #14654 - upsuper:bug1311870, r=heycam
Change property id of moz-prefixed properties to match their name

<!-- Please describe your changes on the following line: -->
This is the servo part of [bug 1311870](https://bugzilla.mozilla.org/show_bug.cgi?id=1311870) which has been reviewed by @heycam.

r? @heycam

---
<!-- 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/14654)
<!-- Reviewable:end -->
2016-12-20 23:37:12 -08:00
Xidorn Quan
6a05615e67 Remove special case for nsCSSPropertyID 2016-12-21 18:15:18 +11:00
Xidorn Quan
2760e2bae6 Unprefix column-rule properties in servo side 2016-12-21 18:13:44 +11:00
bors-servo
ae2b74e1c9 Auto merge of #14653 - upsuper:bug1321176, r=Manishearth
stylo: Fix assertion for unresolvable url

<!-- Please describe your changes on the following line: -->
This is the Servo part of [bug 1321176](https://bugzilla.mozilla.org/show_bug.cgi?id=1321176), which has been reviewed by @emilio, @Manishearth, and @heycam.

r? @Manishearth

---
<!-- 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/14653)
<!-- Reviewable:end -->
2016-12-20 15:41:13 -08:00
Xidorn Quan
09ce1320e9 stylo: handle unresolved url value gracefully 2016-12-21 10:14:44 +11:00
Xidorn Quan
fed488cd01 Change SpecifiedUrl::for_cascade to take ServoUrl 2016-12-21 10:14:04 +11:00
bors-servo
fd5733fc1e Auto merge of #14645 - upsuper:gecko-builtin-counter-styles, r=heycam
Move {lower,upper}-alpha to extra_servo_values

These two counter styles are supported via @counter-style rules in UA style sheet 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/14645)
<!-- Reviewable:end -->
2016-12-19 23:59:00 -08:00
Xidorn Quan
45eea00171 Move {lower,upper}-alpha to extra_servo_values
These two counter styles are supported via @counter-style rules in UA
style sheet in Gecko.
2016-12-20 17:18:45 +11:00
Simon Sapin
01442ba1ae Remove usage of std::intrinsics::discriminant_value. 2016-12-20 07:07:05 +01:00
Emilio Cobos Álvarez
fc6bed28ff
style: Use a HashSet in free-list check. 2016-12-19 09:47:00 +01:00
Emilio Cobos Álvarez
e67ea42c3f
style: Add simple rule-tree benchmarks. Fix rule node drop race. 2016-12-19 09:46:59 +01:00
bors-servo
11dffa8958 Auto merge of #14608 - upsuper:bug1323147, r=heycam
Use string and nsCSSProperty for stylo CSSOM FFI

<!-- Please describe your changes on the following line: -->
This is the Servo side change of [bug 1323147](https://bugzilla.mozilla.org/show_bug.cgi?id=1323147) which has been reviewed by @heycam and @SimonSapin on Bugzilla.

r? @heycam

<!-- 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/14608)
<!-- Reviewable:end -->
2016-12-17 18:22:10 -08:00
bors-servo
f6163c77b9 Auto merge of #14622 - emilio:last-restyle, r=bholley
stylo: Track the last restyle generation properly.

I couldn't reproduce locally, but I believe this fixes:

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

r? @heycam

<!-- 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/14622)
<!-- Reviewable:end -->
2016-12-17 14:40:33 -08:00
Julien Wajsberg
d024787188 Expose Quirks Mode information in the style shared context r=emilio 2016-12-17 11:15:32 -08:00
Emilio Cobos Álvarez
3db6514252
stylo: Track the last restyle generation properly.
I couldn't reproduce locally, but I believe this fixes:

https://bugzilla.mozilla.org/show_bug.cgi?id=1323890
2016-12-17 10:48:45 +01:00
bors-servo
9d2b98e6f8 Auto merge of #14598 - DominoTree:master, r=canaltinova
Fix linear gradient's specified form #13892

<!-- Please describe your changes on the following line: -->
WIP for #13892

---
<!-- 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 #13892  (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/14598)
<!-- Reviewable:end -->
2016-12-16 15:11:29 -08:00
Nick Price
5d56946bc2 Maintain Corner type, add None type to AngleOrCorner 2016-12-16 17:49:15 -05:00
bors-servo
71b68ea0de Auto merge of #14000 - Wafflespeanut:grid, r=Manishearth
Stylo: Basic support for grid-{row,column}-{start,end}

<!-- 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-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [ ] 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/14000)
<!-- Reviewable:end -->
2016-12-16 14:23:40 -08:00
bors-servo
a4ecdf2d5f Auto merge of #14610 - bholley:style_context_refactor, r=emilio
Simplify style context architecture and make it safer

See the discussion at https://bugzilla.mozilla.org/show_bug.cgi?id=1323372

Not done here, but want to get a try run in on the first patch.

<!-- 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/14610)
<!-- Reviewable:end -->
2016-12-16 11:38:27 -08:00
Bobby Holley
648ce1e44e Make the DomTraversalContext own the SharedStyleContext and share it immutably across the traversal.
This allows us to get rid of a bunch of lifetimes and simplify a lot of code. It
also lets us get rid of that nasty lifetime transmute, which is awesome.

The situation with thread-local contexts is still suboptimal, but we fix that in
subsequent patches.
2016-12-16 10:57:27 -08:00
Emilio Cobos Álvarez
8356c3386a
style: Fix @import serialization. 2016-12-16 17:59:47 +01:00
Emilio Cobos Álvarez
ca93a2dcec
style: Add a way to update an empty stylesheet for @import.
We'll update the empty stylesheet we've created when instantiating the
ImportRule when the stylesheet finishes loading.
2016-12-16 16:57:19 +01:00
Emilio Cobos Álvarez
a42cfae153
style: Add a StylesheetLoader abstraction, and make it a no-op on Geckolib.
Servo doesn't compile at this stage.
2016-12-16 16:57:19 +01:00
Emilio Cobos Álvarez
444fef164e
style: Add a struct to represent import rules, and parse them correctly. 2016-12-16 16:57:18 +01:00
bors-servo
e5d783c454 Auto merge of #14615 - servo:import, r=Ms2ger
Prepare for @import support.

<!-- 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/14615)
<!-- Reviewable:end -->
2016-12-16 06:41:45 -08:00
Emilio Cobos Álvarez
85b6e5ad80 style: Move Stylist::device into an Arc 2016-12-16 15:10:37 +01:00
Emilio Cobos Álvarez
62d65c1872 style: Simplify some code in media_queries.rs 2016-12-16 14:53:17 +01:00
Ms2ger
ce0a402bc8 Remove unused style::refcell module. 2016-12-16 14:30:01 +01:00
Ravi Shankar
6d9aed9ac3 Add gecko glue for grid-{row,column}-{start,end} 2016-12-16 13:07:08 +05:30
Ravi Shankar
7976640251 Add GridLine type for grids 2016-12-16 13:03:27 +05:30
Xidorn Quan
7f06c554d9 Remove static atoms of CSS properties 2016-12-16 18:14:40 +11:00
Xidorn Quan
e73bb054c5 Update CSSOM FFI to use string and nsCSSProperty 2016-12-16 18:09:12 +11:00
bors-servo
0bc8415485 Auto merge of #14609 - upsuper:auto-regen-atoms, r=Wafflespeanut
Update atoms when build geckolib with gecko

<!-- Please describe your changes on the following line: -->
This would automatically update the generated atom-related files in-tree before calling cargo to build geckolib. With this change, `./mach build-gecko --with-gecko` should be now the easiest way to update all in-tree bindings.

This isn't really a build-time generating, because it isn't invoked from the build script, but from mach. It isn't done the other way because
1. it doesn't seem to be a common practice for build script to write anything to the src directory
2. real build-time generated atom data wouldn't need to include atoms for multiple platforms, but we still want it so that we can build geckolib independently

cc @heycam

r? @emilio

<!-- 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/14609)
<!-- Reviewable:end -->
2016-12-15 22:05:15 -08:00