Commit graph

22572 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
bors-servo
32eca899e6 Auto merge of #14821 - servo:docs-in-style, r=emilio
More docs in style.

Follow up to #14802.

r? @emilio

---
<!-- 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
- [ ] `./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/14821)
<!-- Reviewable:end -->
2017-01-02 02:08:01 -08:00
Simon Sapin
125a216bde More docs in style.
Follow up to #14802.
2017-01-02 10:40:20 +01:00
bors-servo
e995af9cff Auto merge of #14790 - heycam:bindings-update-14, r=Manishearth
stylo: update bindings

Bindings update for https://treeherder.mozilla.org/#/jobs?repo=stylo&revision=68a742b057d75c060fc7e37b8ab89bbffbbb9e2e.

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/14790)
<!-- Reviewable:end -->
2017-01-01 19:20:37 -08: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
bors-servo
2ebcad10f5 Auto merge of #14802 - emilio:no-missing-docs, r=Wafflespeanut
Document more style modules.

<!-- 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/14802)
<!-- Reviewable:end -->
2016-12-31 15:34:51 -08: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
bors-servo
b29b33c84c Auto merge of #14809 - anholt:webgl-blend-enums, r=emilio
webgl: Validate enums for blendEquation.

Improves a conformance test that tried passing in desktop GL enums for
blending.

---
<!-- 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: -->
- [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/14809)
<!-- Reviewable:end -->
2016-12-31 14:21:20 -08:00
Eric Anholt
daa64bf84f webgl: Validate enums for blendEquation.
Improves a conformance test that tried passing in desktop GL enums for
blending.
2016-12-31 11:37:38 -08:00
bors-servo
62ff467be8 Auto merge of #14757 - canaltinova:overflow, r=Manishearth
Fix `overflow` serialization with CSS-wide keywords

<!-- Please describe your changes on the following line: -->
Overflow does not behave like a normal shorthand. CSS-wide keywords were handled in their `to_css_declared` method. So I had to bypass this check to make it work.

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

<!-- 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/14757)
<!-- Reviewable:end -->
2016-12-31 11:26:21 -08: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
82b6825a86
style: Document style_traits and deny missing docs on it. 2016-12-31 12:17:07 +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
bors-servo
c2ac495188 Auto merge of #14798 - mbrubeck:rowgroup, r=notriddle
Fix rowspan handling for rows that span to the end of the rowgroup

This fixes `rowspan="0"` to behave as described in [the HTML spec](https://html.spec.whatwg.org/multipage/tables.html#attributes-common-to-td-and-th-elements):

> For this attribute, the value zero means that the cell is to span all the remaining rows in the row group.

It also prevents any `rowspan` from overlapping into another rowgroup, as required by [HTML § 4.9.12](https://html.spec.whatwg.org/multipage/tables.html#table-processing-model):

> Row groups cannot overlap each other. Similarly, column groups cannot overlap each other. A cell cannot cover slots that are from two or more row groups.

r? @notriddle or @pcwalton

---

- [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).
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/14798)
<!-- Reviewable:end -->
2016-12-30 21:56:00 -08: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