Commit graph

5298 commits

Author SHA1 Message Date
Anthony Ramine
a6d22b1a35 Only pass the protocol in use in to establish a WS connection 2017-03-24 11:09:30 +01:00
Anthony Ramine
0bd54b904b Properly follow the spec in WebSocket::Constructor 2017-03-24 09:43:14 +01:00
Anthony Ramine
bba0be13dd Make ServoUrl::as_url return a &Url 2017-03-23 15:37:32 +01:00
Anthony Ramine
9894dca86c Avoid a useless clone in WebSocket::Constructor 2017-03-23 14:17:17 +01:00
Bobby Holley
63e8367eee Don't resolve URLs at parse time for Stylo.
It's a bit unfortunate the use separate implementations of SpecifiedUrl for Servo
and Gecko, but they're different enough at this point that I don't think it really
makes sense to try to share everything. Splitting them out has some nice
simplifications as well.

I recognize that there's still some potential correctness issues for Servo using
the resolved URI in various places where the original URI may be the right thing,
but I've got too much on my plate to look into that for now.

MozReview-Commit-ID: BeDu93TQ4Ow
2017-03-22 19:11:30 -07:00
bors-servo
851cef4a2b Auto merge of #16083 - MortimerGoro:display_raf_check, r=emilio
Fix WebVR data race condition when calling GetFrameData outside of VRDisplay.requestAnimationFrame callback

<!-- Please describe your changes on the following line: -->
Fix WebVR data race condition when calling GetFrameData outside of VRDisplay.requestAnimationFrame callback. Fixes a possible deadlock during the interval when the requestAnimationFrame is moved from window to VRDisplay.

---
<!-- 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/16083)
<!-- Reviewable:end -->
2017-03-22 15:03:04 -07:00
Imanol Fernandez
134e918aae Only sync WebVR framedata with compositor when GetFrameData function is called inside a VRDisplay.requestAnimationFrame callback. 2017-03-22 17:41:15 +01:00
Emilio Cobos Álvarez
a9b133bcbb
Bug 1345950: stylo: Fix slow selector flags. r=bholley
MozReview-Commit-ID: QwuSxulNG0
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-03-22 11:21:24 +01:00
bors-servo
7be9f0e7c4 Auto merge of #15519 - gterzian:implement_structuredclone_callbacks, r=jdm
implement structured clone callbacks - support Blob cloning

<!-- Please describe your changes on the following line: -->
1. Implement stubs for structured clone callbacks.
2. Support Blob cloning.

Partial implementation of https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm

---
<!-- 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 #15021 (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/15519)
<!-- Reviewable:end -->
2017-03-21 21:17:25 -07:00
Gregory Terzian
5c4f0be048 support structured cloning for Blob 2017-03-22 09:52:35 +08:00
Lucjan Suski
9a059b49c5 Use servo_config::opts only on linux target.
It's not used for other architectures and triggers warnings.
2017-03-21 15:55:45 +01:00
Lucjan Suski
c83ac31e71 Make ImageData::new return Fallible instead of panic 2017-03-20 21:16:55 +01:00
bors-servo
50fd39f068 Auto merge of #16016 - Manishearth:graft-font-size, r=upsuper
Add separate specified value for keyword font sizes

In Gecko, these keywords compute to different values depending on the
font.

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

<!-- 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/16016)
<!-- Reviewable:end -->
2017-03-20 00:28:46 -07:00
Manish Goregaokar
c9198d92d5 Add separate specified value for keyword font sizes
In Gecko, these keywords compute to different values depending on the
font.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1341775
2017-03-20 00:06:04 -07:00
Simon Sapin
643545b87f Per-document shared lock for author-origin stylesheets.
Fix #16027
2017-03-19 23:12:15 +01:00
Simon Sapin
2952ccfae2 Fix another deadlock 2017-03-19 22:30:41 +01:00
Simon Sapin
1e38013783 Refactor StylesheetLoader so impls do not need to acquire a shared lock.
This fixes a deadlock:
https://github.com/servo/servo/pull/16014#issuecomment-287527067
2017-03-19 22:30:39 +01:00
Simon Sapin
1bacd0eb15 Move all PropertyDeclarationBlock from RwLock<_> to Locked<_> 2017-03-19 22:30:38 +01:00
Simon Sapin
aeffca2a59 Replace RwLock<StyleRule> with Locked<StyleRule> 2017-03-19 22:30:37 +01:00
Simon Sapin
57724e5a37 Replace RwLock<Keyframe> with Locked<Keyframe> 2017-03-19 22:30:37 +01:00
Simon Sapin
adb97d4cbe Wrap most CSS rules in Locked<_> instead of RwLock<_> 2017-03-19 22:30:36 +01:00
Simon Sapin
f35b4e27b3 Replace RwLock<CssRules> with Locked<CssRules> 2017-03-19 22:30:35 +01:00
Simon Sapin
b213daaa88 Tidy 2017-03-19 22:30:34 +01:00
Simon Sapin
600152bd00 Replace more RwLock<MediaList> with shared_lock::Locked<MediaList> 2017-03-19 22:30:34 +01:00
Simon Sapin
fe4e70c5f8 Introduce a ToCssWithGuard trait 2017-03-19 22:30:33 +01:00
Simon Sapin
c5a7294e05 Replace RwLock<MediaList> with shared_lock::Locked<MediaList> 2017-03-19 22:30:31 +01:00
Bobby Holley
97dd3a1b08 Box more specified values to bring SpecifiedValue/PropertyDeclaration sizes down to 24/32 bytes.
MozReview-Commit-ID: xstAfjVQqi
2017-03-17 22:18:19 -07:00
Alan Jeffrey
6bcb5f68be Implement dissimilar-origin window.parent and window.top. 2017-03-17 10:53:20 -05:00
Anthony Ramine
0d904e387e Properly coalesce whitespace when given a reference child (fixes #15979) 2017-03-17 11:40:03 +01:00
bors-servo
47f0b4155c Auto merge of #15987 - nox:h5e, r=Ms2ger
Fix a couple of HTML parsing issues

<!-- 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/15987)
<!-- Reviewable:end -->
2017-03-16 17:36:00 -07:00
bors-servo
0a747e23c6 Auto merge of #15966 - mbrubeck:any, r=emilio
Bug 1340683 - stylo: Implement the :-moz-any pseudo-class

Adds support for the non-standard [:-moz-any](https://developer.mozilla.org/en-US/docs/Web/CSS/:any) selector.

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1340683
- [x] These changes do not require tests because they are gecko-only

<!-- 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/15966)
<!-- Reviewable:end -->
2017-03-16 16:19:12 -07:00
bors-servo
e62d029ed6 Auto merge of #15906 - mchv:mchv-safe-browsing-context, r=asajeffrey
Access browsing context safely

Current browsing context accessor in `Document` unwraps the browsing context `Option` which prevents document to handle correctly the case when there is no browsing context.

This is the reason servo panics with `session-history.max-length=1` (https://github.com/servo/servo/issues/15877).

As it is my first contribution, I added a `safe` method to retrieve the browsing context rather than change the existing method, but I am happy to change if you think this is the right approach. I did not as well replace all existing method call to the `safe` method, to focus on fixing the issue.

If someone can give me a bit of guidance for the test, I will try to contribute one.

---
<!-- 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
- [ ] `./mach test-tidy` does not report any errors
- [X] These changes fix #15877.
- [ ] 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/15906)
<!-- Reviewable:end -->
2017-03-16 15:41:07 -07:00
Bobby Holley
8cf331a498 Rearrange PropertyDeclaration to avoid embedding DeclaredValue.
From https://bugzilla.mozilla.org/show_bug.cgi?id=1347719

This effectively combines the discriminants of the two enums and reduces the
size of PropertyDeclaration by one word.

MozReview-Commit-ID: 9rCRiSVZTQT
2017-03-16 14:40:55 -07:00
Matt Brubeck
2872c8bfab Bug 1340683 - stylo: Implement the :-moz-any pseudo-class 2017-03-16 11:44:47 -07:00
Anthony Ramine
6b43624a71 Properly handle annotation-xml integration points (fixes #15980) 2017-03-16 16:35:38 +01:00
Alan Jeffrey
f05577cb29 Disabled tinyfiledialogs when running headless. 2017-03-16 08:48:33 -05:00
Alan Jeffrey
f9c5d0c117 Implement dissimilar-origin postMessage. 2017-03-15 14:57:25 -05:00
bors-servo
ed98cb9c0a Auto merge of #15938 - servo:form-owner, r=nox,jdm
Implement the form owner concept

<!-- 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/15938)
<!-- Reviewable:end -->
2017-03-15 09:16:08 -07:00
Mukilan Thiyagarajan
38a61712e4 Implement the form owner concept 2017-03-15 16:39:55 +01:00
bors-servo
e600e0495c Auto merge of #15536 - asajeffrey:script-document-domain-setter, r=nox
Implement setter for document.domain

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

This PR implements the setter for `document.domain`.

It builds on #15438 and #15478, only the last commit is part of this PR.

It includes tests for similar-origin security checks.

---
<!-- 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 #934.
- [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/15536)
<!-- Reviewable:end -->
2017-03-15 08:35:41 -07:00
Alan Jeffrey
5348b63e38 Implement setter for document.domain 2017-03-15 10:34:23 -05:00
bors-servo
5bfa87a8e2 Auto merge of #15821 - montrivo:ImDataConstructors, r=Ms2ger
Implement ImageData constructors #15671 -- 1

<!-- Please describe your changes on the following line: -->
Implement ImageData constructors
* new constructors in the imagedata.rs file
* modification of the ImageData::new method
* new method ImageData::from_vec
* new wpt test file imagedata.html

---
<!-- 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 affect #15671  (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/15821)
<!-- Reviewable:end -->
2017-03-15 02:23:48 -07:00
montrivo
46a25d621c Implement ImageData constructors #15671 2017-03-14 23:16:17 +01:00
Alan Jeffrey
1f61a549a3 Added some same-origin-domain checks. 2017-03-14 14:36:03 -05:00
Mariot Chauvin
f8c7235f73 Access browsing context without panic
Current browsing context accessor in Document unwrap the browsing context option which prevents document to handle correctly the case when there is no browsing context.
2017-03-14 14:18:56 +00:00
Emilio Cobos Álvarez
b4de69e3eb
style: Avoid cloning all over the error reporter. 2017-03-14 00:49:18 +01:00
lucantrop
d6568e608b removed instances of -> () in existing code 2017-03-13 17:38:33 +01:00
bors-servo
94c344a014 Auto merge of #15882 - ak1t0:clean-up-htmlimageelement, r=Ms2ger
Clean up HTMLImageElement::areas

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because github issue says no tests needed.

<!-- 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/15882)
<!-- Reviewable:end -->
2017-03-13 07:47:56 -07:00
bors-servo
d70c1e53ae Auto merge of #15874 - sendilkumarn:user-script, r=nox
apply user scripts correctly

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

<!-- 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/15874)
<!-- Reviewable:end -->
2017-03-13 07:01:52 -07:00
SendilKumar N
5b25cb3345 apply user scripts correctly
replace to utf8_lossy
2017-03-13 21:57:50 +08:00