Commit graph

6718 commits

Author SHA1 Message Date
Nazım Can Altınova
c351092457 Fix overflow shorthand serialization. 2016-12-31 15:26:36 +03:00
Julien Levesy
b78979d692 replace match by if let statements if possible 2016-12-31 12:34:05 +01:00
bors-servo
bd67163438 Auto merge of #14801 - emilio:no-missing-docs, r=mbrubeck,Manishearth,Wafflespeanut
style: Document and force documentation in a big chunk of the style crate.

Style no forced docs for the properties code and similar, but I ran out of time, and I think it's a nice improvement.

I'd appreciate a fast-ish turn-around time because this is pretty much prone to bitrot.

<!-- 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/14801)
<!-- Reviewable:end -->
2016-12-31 03:19:02 -08:00
Emilio Cobos Álvarez
a847f26e84
style: Document the data module. 2016-12-31 12:17:13 +01:00
Emilio Cobos Álvarez
bc381ee945
style: Fully document the dom module. 2016-12-31 12:17:11 +01:00
Emilio Cobos Álvarez
e03ef33f58
style: Document the parallel traversal. 2016-12-31 12:17:10 +01:00
Emilio Cobos Álvarez
84361d2f0f
style: Do the proper thing for the sequential traversal. 2016-12-31 12:17:09 +01:00
Emilio Cobos Álvarez
14596609e3
style: Document Servo's SelectorImpl and deny missing docs. 2016-12-31 12:17:08 +01:00
Emilio Cobos Álvarez
40a6a1f971
style: Cleanup and document thread_state.rs 2016-12-31 12:17:06 +01:00
Emilio Cobos Álvarez
6dd9c9ecfa
style: Document stylesheets.rs 2016-12-31 12:17:05 +01:00
Emilio Cobos Álvarez
d14290e3a5
style: Document traversal.rs 2016-12-31 12:17:04 +01:00
Emilio Cobos Álvarez
5007e66043
style: Document the timer module. 2016-12-31 12:17:04 +01:00
Emilio Cobos Álvarez
5e52184278
style: Make the viewport module deny new undocumented code. 2016-12-31 12:17:03 +01:00
Emilio Cobos Álvarez
f37aa12927
style: Prevent more missing docs in the values module. 2016-12-31 12:17:02 +01:00
Emilio Cobos Álvarez
a0d425e8ce
style: Document and cleanup str.rs 2016-12-31 12:17:00 +01:00
Emilio Cobos Álvarez
9a8c94b998
style: Document a bit better the rule tree code. 2016-12-31 12:16:59 +01:00
Emilio Cobos Álvarez
277ef70d39
style: Consistently indent stuff, add a bit of documentation driving by. 2016-12-31 12:16:57 +01:00
Emilio Cobos Álvarez
b023791af5
style: Document the animated_properties code. 2016-12-31 12:16:55 +01:00
Emilio Cobos Álvarez
56f9a1a55c
style: Document the animations code. 2016-12-31 04:53:38 +01:00
Emilio Cobos Álvarez
b5ba53655f
style: Document and remove dead code from cache.rs 2016-12-31 04:53:37 +01:00
Emilio Cobos Álvarez
fa26e87030
layout: Remove get_font_arc in favor of clone_font.
Since they do the same.
2016-12-31 04:53:36 +01:00
bors-servo
569e61e7ff Auto merge of #14793 - emilio:stylo-at-import, r=heycam,Manishearth
stylo: Support at-import.

Reviewed upstream by @heycam  and @Manishearth in:

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

<!-- 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/14793)
<!-- Reviewable:end -->
2016-12-30 19:12:55 -08:00
Emilio Cobos Álvarez
c04c3c60c3
style: Serialize also "only" qualifier, and fix serialization of all media expressions without explicit qualifiers. 2016-12-30 15:05:28 +01:00
Emilio Cobos Álvarez
bb672f1a2c
style: Simplify media-query parsing so it's easier to split out. 2016-12-30 15:05:27 +01:00
Emilio Cobos Álvarez
8120906a15
style: Refactor media query serialization so it doesn't use an intermediate buffer.
I plan to move MediaType to ToCss soon.
2016-12-30 15:05:27 +01:00
Emilio Cobos Álvarez
b4caebae69
style: Cleanup and refactor how media types are represented.
This is necessary for the upcoming work in Stylo, given I plan to make MediaType
different for Servo and Gecko, and the Unknown variant doesn't fit in MediaType
to be fair, the device is never going to have any unknown media type.
2016-12-30 15:05:14 +01:00
Emilio Cobos Álvarez
df9da705f5
Bug 1304792: Use borrowed types for ServoImportRule. r=Manishearth r=heycam
MozReview-Commit-ID: HKjsOaE2qAp
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2016-12-30 13:00:51 +01:00
Emilio Cobos Álvarez
a5f5e48c68
Bug 1304792: stylo: Implement @import. r=heycam
MozReview-Commit-ID: Hw1V66JxIBD
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2016-12-30 13:00:44 +01:00
Cameron McCormack
be1a73dac5 Don't persist styles on elements not in the document. 2016-12-30 10:58:31 +08:00
bors-servo
ab623de261 Auto merge of #14768 - upsuper:upgrade-bindgen, r=emilio
Upgrade libbindgen to 0.1.5

0.1.4 is known to be broken on Windows, and earlier version may not work properly in various platforms.

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/14768)
<!-- Reviewable:end -->
2016-12-29 04:49:16 -08:00
Xidorn Quan
77bc2e0ba3 Add support of text-combine-upright for stylo 2016-12-29 14:02:46 +11:00
Xidorn Quan
f1f1466aa1 Upgrade libbindgen to 0.1.5
0.1.4 is known for being broken on Windows, and earlier version may not
work properly in various platforms.
2016-12-29 12:03:28 +11:00
bors-servo
adb3e12b72 Auto merge of #14746 - DominoTree:fix-linear-gradient, r=emilio
Default is top-to-bottom if unset, not bottom-to-top

<!-- Please describe your changes on the following line: -->
Reverse linear gradient direction if not explicitly specified to match expected default behavior

---
<!-- 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 #14745 (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/14746)
<!-- Reviewable:end -->
2016-12-28 10:46:53 -08:00
Nick Price
23d4f04ce5 Default is top-to-bottom if unset, not bottom-to-top 2016-12-28 10:17:00 -05:00
bors-servo
9e0d269353 Auto merge of #14754 - upsuper:skip-bindgen, r=emilio
Skip invoking bindgen if no header changes

This can avoid doing bindgen when build script is called for updating other files, e.g. properties.

This uses a global modified time, so there is a chance that some of the files which can be skipped but not skipped. But given that we do all three files in parallel, that would unlikely affect the actual runtime.

Using lots of `Mutex` could be an issue, but it doesn't seem to be in practice. Since only one thread would hold the lock of `ADDED_PATHS`, there is never a competitor for the lock of `LAST_MODIFIED`.

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/14754)
<!-- Reviewable:end -->
2016-12-28 04:51:53 -08:00
bors-servo
f9d971771c Auto merge of #14747 - hiikezoe:color-interpolation2, r=emilio
Interpolate colors with premultiplied alpha.

We need to clamp each interpolated values because some cubic-bezier functions
produce values that are out of range [0, 1].

r? @emilio

<!-- 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] 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/14747)
<!-- Reviewable:end -->
2016-12-28 02:06:38 -08:00
bors-servo
58fec2f05a Auto merge of #14124 - shinglyu:flexbox-trace, r=glennw
Flexbox trace

<!-- Please describe your changes on the following line: -->
This is a follow up for #13740, so r? @jdm

The first patch enables JSON serialization for flexbox flows, the second one fixed format incompatibilities for the layout viewer.

The 3rd and 4th patches are just layout viewer UI enhancements, we could split that to a spearate PR if you prefer.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it's a trivial debug tool

<!-- 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/14124)
<!-- Reviewable:end -->
2016-12-28 00:33:31 -08:00
Shing Lyu
4b2d80afcf Activate flexbox layout tracing 2016-12-28 15:31:45 +08:00
Xidorn Quan
b6ea9976ba Skip invoking bindgen if no header changes
This can avoid doing bindgen when build script is called for updating
other files, e.g. properties.
2016-12-28 18:10:27 +11:00
bors-servo
81ca858678 Auto merge of #14753 - upsuper:atom-gen-update, r=Wafflespeanut
Avoid write atoms files when not necessary

This would avoid rebuilding style component even if nothing is changed when using "mach build-geckolib --with-gecko".

The `FileAvoidWrite` class is a simplified version of [the same class used in Gecko's build system](https://dxr.mozilla.org/mozilla-central/rev/dccfc624915b1bebe7975076e9b42bd46684cbc6/python/mozbuild/mozbuild/util.py#202).

r? @Wafflespeanut

<!-- 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/14753)
<!-- Reviewable:end -->
2016-12-27 23:05:43 -08:00
Xidorn Quan
5909a4b213 Avoid write atoms files when not necessary
This would avoid rebuilding style component even when nothing is changed
when using "mach build-geckolib --with-gecko".
2016-12-28 17:49:34 +11:00
Bobby Holley
ab71b29959 style: Add a special, explicit path for lazy style resolution and use it for GetComputedStyle.
MozReview-Commit-ID: KAM9mVoxCHE
2016-12-28 11:52:46 +08:00
Hiroyuki Ikezoe
3320457c07 Interpolate colors with premultiplied alpha.
We need to clamp each interpolated values because some cubic-bezier functions
produce values that are out of range [0, 1].
2016-12-28 09:18:22 +09:00
bors-servo
a6d206eb66 Auto merge of #14703 - canaltinova:perspective-transform, r=Wafflespeanut
Add gecko glue for perspective/transform properties

<!-- Please describe your changes on the following line: -->
To be able to add glue for these properties,  we needed to change their structs. They are moved from effects to box and added stylo glue.
This PR covers these properties:
- perspective
- perspective-origin
- backface-visibility
- transform-box
- transform-style
- transform-origin

---
<!-- 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 stylo 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/14703)
<!-- Reviewable:end -->
2016-12-26 21:48:52 -08:00
Cameron McCormack
720942f792 Regenerate bindings. 2016-12-27 11:17:42 +08:00
Cameron McCormack
fc808d9030 Update bindings build script and glue for recent changes. 2016-12-27 10:30:24 +08:00
bors-servo
9d320d5a34 Auto merge of #14518 - mbrubeck:rowspan2, r=notriddle
Fix inline layout of table cells impacted by rowspan

This is part of the fix for #11297. This PR fixes the inline layout of table cells impacted by row-spanning cells from previous rows. A separate PR to follow will fix the table block size calculations to account for rowspan.

This PR doesn't yet include any test changes. If it doesn't cause any existing tests to pass, I will add a new test to it.

r? @pcwalton

<!-- 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/14518)
<!-- Reviewable:end -->
2016-12-26 10:09:09 -08:00
Nazım Can Altınova
d5eba1e7dc Add gecko glue for transform related properties. 2016-12-26 16:26:58 +03:00
Nazım Can Altınova
2e9d4df223 Move transform related properties from effects to box. 2016-12-26 16:04:57 +03:00
bors-servo
42ec8a8974 Auto merge of #14731 - heycam:flushing_and_pseudos, r=heycam
stylo: Coordinate stylist flushing with gecko, and clean up pseudo-element resolution
2016-12-25 18:13:30 -08:00