Commit graph

11446 commits

Author SHA1 Message Date
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
Nazım Can Altınova
c351092457 Fix overflow shorthand serialization. 2016-12-31 15:26:36 +03: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
Matt Brubeck
37d200e628 Fix rowspan handling for rows that span to the end of the rowgroup 2016-12-30 17:27:20 -08:00
bors-servo
b06f4aec67 Auto merge of #14794 - mrnayak:hsts-refactor, r=emilio
Refactor HSTSList to use HashMap

Refactored HSTSList to use HashMap, where the key of HashMap is the base domain. Every time when we check if a host is secure, we find the base domain of the host and get a vector of HSTS entries associated with the base domain.

While this will not give O(1) look up time, we would have a smaller list to iterate for every lookup. I have added one unit test to validate `HashMap` changes.

<!-- 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
- [X] These changes fix #14756

<!-- Either: -->
- [X] There are tests for these changes OR

<!-- 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/14794)
<!-- Reviewable:end -->
2016-12-30 10:33:40 -08:00
Raghav
6a14349eb1 Refactor HSTSList to use HashMap
Refactored HSTSList to use HashMap, where the key of HashMap is the base
domain. Every time when we check if a host is secure, we find the base
domain of the host and get a vector of HSTS entries associated with the
base domain.

While this will not give O(1) look up time, we would have a smaller list
to iterate for every lookup. I have added one unit test to validate
HashMap changes.
2016-12-30 22:00:03 +05:30
bors-servo
d3875f6ec5 Auto merge of #14739 - servo:stylo-mq, r=Manishearth
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.

<!-- 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/14739)
<!-- Reviewable:end -->
2016-12-30 06:05:43 -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
Ms2ger
8dce3e5c9a Stop allowing unsafe code around thread_local. 2016-12-30 11:11:25 +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
bors-servo
885d152e92 Auto merge of #14647 - servo:current-global, r=jdm
Support the 'current' global object.

<!-- 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/14647)
<!-- Reviewable:end -->
2016-12-29 01:38:19 -08:00
bors-servo
c7991d596f Auto merge of #14716 - mrnayak:hsts, r=jdm
Implement HSTS fetch step

Implemented step nine of the main fetch. If current URL scheme is 'HTTP' and
current URL's host is domain and if current URL's host matched with Known
HSTS Host Domain Name Matching results in either a superdomain match with
an asserted includeSubDomains directive or a congruent match then we
change request scheme to 'https'. This change has been made in method.rs

A test case to validate this has been added in fetch.rs. For asserting
https scheme, a https localhost was required. For this purpose I have
created a self-signed certificate and refactored fetch-context and
connector.rs to programmatically trust this certificate for running this
test case.

This should fix https://github.com/servo/servo/issues/14363
<!-- 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
- [X] These changes fix #14363

<!-- 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/14716)
<!-- Reviewable:end -->
2016-12-29 00:35:09 -08:00
Raghav
6020b4c15c Implement HSTS fetch step
Implemented step nine of the main fetch. If current URL scheme is 'HTTP'
and current URL's host is domain and if current URL's host matched with
Known
HSTS Host Domain Name Matching results in either a superdomain match with
an asserted includeSubDomains directive or a congruent match then we
change request scheme to 'https'. This change has been made in method.rs

A test case to validate this has been added in fetch.rs. For asserting
https scheme, a https localhost was required. For this purpose I have
created a self-signed certificate and refactored fetch-context and
connector.rs to programmatically trust this certificate for running this
test case.
2016-12-29 12:55:31 +05:30
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
c6ea1ec91f Auto merge of #14762 - prampey:error-handle, r=jdm
Error handled canvas closing

<!-- Please describe your changes on the following line: -->
Correctly handled error when Canvas doesn't close properly, with a descriptive warning.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because minor changes don't require tests.

<!-- 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/14762)
<!-- Reviewable:end -->
2016-12-28 13:49:02 -08:00
bors-servo
149facbb3c Auto merge of #14760 - mrnayak:update-links, r=jdm
Update links to DOM Parsing specification

Changed links from https://domparsing.spec.whatwg.org/ to
https://w3c.github.io/DOM-Parsing/.

<!-- 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
- [X] These changes fix #14758

<!-- Either: -->
- [X] These changes do not require tests because these are link update

<!-- 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/14760)
<!-- Reviewable:end -->
2016-12-28 12:05:23 -08: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
Prudhvi Rampey
e3d8131698 Error handled canvas closing 2016-12-28 23:14:46 +05:30
bors-servo
0f600db3ae Auto merge of #14718 - dpyro:websocket-typed-arrays, r=jdm
Rewrote websocket array buffer handling to typed array API

<!-- Please describe your changes on the following line: -➜
Replaced existing code for handling `BinaryType::Arraybuffer` from `JS_NewArrayBuffer` to `Uint8Array::create`.

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

<!-- Either: -->
- [X] These changes do not require tests because they replace an existing implementation

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

I am not certain the test suite will adequately verify my implementation as I am not familiar with the architecture. It compiles and passes the current tests.

<!-- 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/14718)
<!-- Reviewable:end -->
2016-12-28 09:43:51 -08:00
Raghav
eb401ee2ca Update links to DOM Parsing specification
Changed links from https://domparsing.spec.whatwg.org/ to
https://w3c.github.io/DOM-Parsing/.
2016-12-28 21:45:53 +05:30
Nick Price
23d4f04ce5 Default is top-to-bottom if unset, not bottom-to-top 2016-12-28 10:17:00 -05:00