Commit graph

1788 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
121b718e99
style: Remove a bunch of duplicated logic in add_stylesheet.
This is remminiscent of my recent @import refactor, and stayed there
incorrectly.

Note that it's the same code that lives in `update` (where it should live).
2017-01-02 12:57:50 +01:00
Emilio Cobos Álvarez
7ad3ac054a
style: Document the servo-specific module. 2017-01-02 12:57:50 +01:00
Emilio Cobos Álvarez
2cef9c948e
style: Document the restyle_damage module. 2017-01-02 12:57:49 +01:00
Emilio Cobos Álvarez
a5005a9967
style: document the sink module. 2017-01-02 12:57:49 +01:00
Emilio Cobos Álvarez
b556449a96
style: Require docs in the less-straightforward part of the properties module. 2017-01-02 12:57:48 +01:00
Emilio Cobos Álvarez
577bd15277
style: remove ComputedStyle::do_cascade_property.
It's defined to be the same in both Servo and Gecko, so it's pointless right
now.
2017-01-02 12:57:48 +01:00
Simon Sapin
125a216bde More docs in style.
Follow up to #14802.
2017-01-02 10:40:20 +01:00
Cameron McCormack
c15df6777e stylo: Regenerate bindings. 2017-01-02 11:19:11 +08:00
bors-servo
bbe70c7c5f Auto merge of #14769 - upsuper:complex-color-update, r=heycam
Update helper functions of StyleComplexColor

<!-- Please describe your changes on the following line: -->
The definition of `StyleComplexColor` in the Gecko side was updated in [bug 1063162](https://bugzilla.mozilla.org/show_bug.cgi?id=1063162). The helper functions need update as well.

r? @Manishearth

<!-- 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/14769)
<!-- Reviewable:end -->
2016-12-31 22:33:47 -08:00
bors-servo
d967d89fc0 Auto merge of #14796 - jlevesy:jl-match-to-if-let, r=Wafflespeanut
replace match by if let statements if possible

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

This PR replaces `match` statements by `if let` when possible.

Thanks for reviewing

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because this PR is a code cleanup patch.

<!-- 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/14796)
<!-- Reviewable:end -->
2016-12-31 21:28:41 -08:00
Xidorn Quan
7d59e3bd93 Update helper functions of StyleComplexColor 2017-01-01 11:51:50 +11:00
Emilio Cobos Álvarez
be9ff1d2a3
style: Make the comment from #14757 a doc comment. 2016-12-31 23:28:11 +01:00
Emilio Cobos Álvarez
68476df18e
style: Document the font_metrics module. 2016-12-31 23:24:19 +01:00
Emilio Cobos Álvarez
858ee1f1ec
style: Document the error_reporting module. 2016-12-31 23:24:19 +01:00
Emilio Cobos Álvarez
4108ff8383
style: Document cascade_info. 2016-12-31 23:24:19 +01:00
Emilio Cobos Álvarez
7bf80e5d50
style: Document the matching module. 2016-12-31 23:24:18 +01:00
Emilio Cobos Álvarez
30d010342a
style: Document the bloom filter. 2016-12-31 23:24:18 +01:00
Emilio Cobos Álvarez
eb90004f5a
style: Avoid missing docs in element_state. 2016-12-31 23:24:17 +01:00
Emilio Cobos Álvarez
c82fcac77f
style: Document the bezier module. 2016-12-31 23:24:17 +01:00
Emilio Cobos Álvarez
5241fa35ab
style: Tidy and document the declaration_block module. 2016-12-31 23:24:16 +01:00
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