Commit graph

22572 commits

Author SHA1 Message Date
bors-servo
30b67a8d7a Auto merge of #14800 - mbrubeck:warnings, r=Manishearth
Fix an unused variable warning in net_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/14800)
<!-- Reviewable:end -->
2016-12-30 17:28:06 -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
Matt Brubeck
f6e7179e9a Fix an unused variable warning in net_tests 2016-12-30 17:24:10 -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
bors-servo
608511ddc3 Auto merge of #14792 - servo:tl-unsafe, r=emilio
Stop allowing unsafe code around thread_local.

<!-- 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/14792)
<!-- Reviewable:end -->
2016-12-30 03:04:12 -08:00
Ms2ger
8dce3e5c9a Stop allowing unsafe code around thread_local. 2016-12-30 11:11:25 +01:00
bors-servo
b49eb6f566 Auto merge of #14776 - heycam:not-in-doc-persist, r=emilio
stylo: Don't persist styles on elements not in the document.

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

This is the Servo half of https://bugzilla.mozilla.org/show_bug.cgi?id=1324983, which @emilio has already reviewed.

<!-- 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/14776)
<!-- Reviewable:end -->
2016-12-29 19:00:30 -08:00
Cameron McCormack
be1a73dac5 Don't persist styles on elements not in the document. 2016-12-30 10:58:31 +08:00
bors-servo
b5f3d7dd41 Auto merge of #14737 - UK992:package-prefs, r=Wafflespeanut
Package: Various improvements

Fixes https://github.com/servo/servo/issues/11966
Fixes https://github.com/servo/servo/issues/12707

Also adds simple mechanism to set os specific prefs, by adding  like `os:macosx,os:windows;` before pref name.

<!-- 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/14737)
<!-- Reviewable:end -->
2016-12-29 10:28:37 -08:00
UK992
fe7cb599a0 Package: Small cleanup 2016-12-29 19:21:18 +01:00
UK992
736559887b Package: Move Android packaging to target dir
Fixes #13800
2016-12-29 19:19:05 +01:00
UK992
01c7ac785b Package: Set shell.homepage to browserhtml
Closes #12154
2016-12-29 19:19:03 +01:00
UK992
456900b4ef Package: Simplify getting browserhtml path 2016-12-29 19:19:01 +01:00
UK992
63a4bf74b0 Fix tidy json alphabetical order check 2016-12-29 19:18:59 +01:00
UK992
7eb4d7a9a7 Package: Merge changed prefs from package-prefs.json to prefs.json 2016-12-29 19:18:57 +01: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
bors-servo
49bdef98bf Auto merge of #14771 - upsuper:text-combine-upright, r=Wafflespeanut
Add support of text-combine-upright for stylo

<!-- 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
- [x] These changes do not require tests because it is just a trivial change for stylo only

<!-- 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/14771)
<!-- Reviewable:end -->
2016-12-28 21:19:26 -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
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
bors-servo
7f2da7483b Auto merge of #14346 - mati865:master, r=UK992,larsberg
Use MSVC toolchain if PLATFORM is defined

<!-- Please describe your changes on the following line: -->
`VSInstallDir` exists only when Visual Studio is installed.
`VS140COMNTOOLS` is defined by installing either Visual Studio or [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools)

It will allow to build MSVC based Servo without having to install whole Visual Studio (few GiB).

EDIT: Another (maybe cleaner) solution would be reverting 63ec96a57d

---
<!-- 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
- [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
- [x] These changes do not require tests because `VS140COMNTOOLS` variable is already used in [mach.bat](https://github.com/servo/servo/blob/master/mach.bat)

<!-- 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/14346)
<!-- Reviewable:end -->
2016-12-28 07:37:45 -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
17fe437fb7 Auto merge of #14755 - servo:wpt-20161228, r=Ms2ger
Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e.

<!-- 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/14755)
<!-- Reviewable:end -->
2016-12-28 06:17:00 -08: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
Ms2ger
d6ba94ca28 Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e 2016-12-28 11:34:21 +01: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
344ad61f2c Added a toolbar for going to previous and next node 2016-12-28 15:31:48 +08:00
Shing Lyu
fe82d277cd Added toolbar for toggling unchanged code display 2016-12-28 15:31:47 +08:00
Shing Lyu
22ffdf8018 Fix flexbox trace loading problem in layout_viewer 2016-12-28 15:31:46 +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