Commit graph

4739 commits

Author SHA1 Message Date
Jefry Lagrange
ebcb15d6f2 Rewrite the ban-type lint in Python
Delete old rust ban lint and move tests to python tidy

Fix ban lint regex and fix test
2017-02-25 15:56:06 +01:00
Nazım Can Altınova
d7c227f614
Fix parsing of ClipRect 2017-02-25 00:10:43 +03:00
bors-servo
a204c4176d Auto merge of #15715 - nox:custom-derive, r=SimonSapin
Make #[dom_struct] a proc_macro attribute

The rustup is needed for https://github.com/rust-lang/rust/pull/40039.

<!-- 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/15715)
<!-- Reviewable:end -->
2017-02-24 05:56:30 -08:00
Anthony Ramine
b2adcfb40b Test that StorageEvent's URL is empty from document.createEvent 2017-02-24 12:22:10 +01:00
bors-servo
b52288af00 Auto merge of #15685 - absoludity:fix-animation-serialization-15398-pt2, r=upsuper
Fix animation serialization 15398 pt2

Fixes animation serialization so that an animation shorthand is serialized only when the value lists have the same length (part of #15398)

There are two commits here - the first is a refactoring to update PropertyDeclarationBlock::to_css to match the spec (please see the full commit message for perhaps too many details).

The second commit utilizes the changes in the first, and updates the animation serialization itself to write an empty serialization if the longhand value lists have different lengths, as per the original issue.
Interestingly, the refactoring of the first commit simplified quite a lot more than the fix for this bug, in particular, the special case of 'overflow' shorthand serialization is handled by default, without the extra special case code (now removed).

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15398 (github issue number if applicable).
- [X] There are tests for these changes OR

<!-- 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/15685)
<!-- Reviewable:end -->
2017-02-23 20:12:30 -08:00
bors-servo
3bf81c389b Auto merge of #13561 - mathieuh:request-constructor, r=jdm
Make Request throw less often (fixes #13457)

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

<!-- 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/13561)

<!-- Reviewable:end -->
2017-02-23 17:54:40 -08:00
Michael Nelson
bcafe21dc9 Animation shorthand should be serialized only when the value lists have the same length.
Fixes #15398

The previous commit did most of the work here of updating the algorithm
to skip shorthands if a shorthand value was an empty string. This commit
just updates animations LonghandToSerialize's implementation of
to_css_declared to write an empty string value if the list lengths
differ (and updates the test to match).
2017-02-24 12:03:04 +11:00
Simon Sapin
64885c4213 Update to rustc 1.17.0-nightly (413a975e3 2017-02-23)
Fix #15704
2017-02-24 01:49:29 +01:00
bors-servo
1d13e6a2df Auto merge of #15700 - glennw:zoom-wip-2, r=mbrubeck
Introduce CSSPixel as a replacement for ViewportPx and PagePx.

<!-- 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/15700)
<!-- Reviewable:end -->
2017-02-23 16:01:16 -08:00
Mathieu Hordesseaux
6f97ce826b Make Request throw less often (fixes #13457) 2017-02-23 18:55:52 -05:00
bors-servo
6c9e94b1c0 Auto merge of #15697 - glennw:border-image, r=jdm,pcwalton
Add support for most of the border-image properties, pass to WR.

This adds support for:
 * border-image (images, not gradients yet)
 * border-image-source
 * border-image-slice
 * border-image-repeat (stretch + repeat only for now)

Remaining work:
 * Connect border-image-outset (WR supports this).
 * border-image-width

<!-- 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/15697)
<!-- Reviewable:end -->
2017-02-23 13:40:40 -08:00
Glenn Watson
30ff2f8f0d Introduce CSSPixel as a replacement for ViewportPx and PagePx. 2017-02-24 06:58:10 +10:00
bors-servo
56a99577b3 Auto merge of #15535 - froydnj:global-style-thread-pool, r=bholley
geckolib: use a global thread pool for styling

By having a single thread pool, rather than one per document, we use less memory.  This addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1324250.

This may be obvious to an experienced Rust programmer, but I went with raw pointers because trying to use `Option` global variables resulted in complaints about turning on feature flags in nightly Rust.  Since this is for stylo, nightly features are not appropriate here.

---
<!-- 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
- [ ] 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/15535)
<!-- Reviewable:end -->
2017-02-23 10:15:41 -08:00
Nathan Froyd
4a1dd9fa57 stylo-tests: update for geckolib changes 2017-02-23 12:06:45 -05:00
bors-servo
b34fdf6234 Auto merge of #15690 - vwvww:issue_14898, r=Wafflespeanut
Add 'use statements with extraneous spaces' tidy check

Add 'use statements with extraneous spaces' tidy check

I added simple check routine for 'use statements with extraneous
spaces' and codes that breaks the check routine in rust_tidy.rs.

* Added a code that using 'use statements with extraneous spaces' code
  in rust_tidy.rs
* Added assertion code in test_tidy.py.
* check_rust function in tidy.py now recognizes the simple case in
  the 'use statements with extraneous spaces'.
* Ran tidy check on rust code and modified a
  code(tests/unit/style/parsing/inherited_text.rs) that is not passing
  on this new tidy check.

TODO: this code has to be refactored to support more general cases, such as tab or newline.

- [X] `./mach build -d` does not report any errors
- [X] ./mach test-tidy does not report any errors
- [X] These changes fix #14898 (github issue number if applicable).
- [X] These changes do not require tests because ./mach test-tidy itself is the test for the code.

<!-- 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/15690)
<!-- Reviewable:end -->
2017-02-22 21:19:08 -08:00
Glenn Watson
ffcb319324 Add support for most of the border-image properties, pass to WR.
This adds support for:
 * border-image (images, not gradients yet)
 * border-image-source
 * border-image-slice
 * border-image-repeat (stretch + repeat only for now)

Remaining work:
 * Connect border-image-outset (WR supports this).
 * border-image-width
2017-02-23 14:15:20 +10:00
bors-servo
854d720b21 Auto merge of #14962 - jdm:image_script_load, r=Ms2ger,glennw,emilio
Remove network requests from image cache thread

The design of initiating network requests from the image cache thread was simple, but it makes it difficult to implement image loading that conforms to the HTML specification. These changes make the implementation of HTMLImageElement responsible for network requests for `<img>` elements, and CSS-based images (background-image, bullets, etc.) are requested by the script thread to ensure that the layout thread does not attempt to retain unsafe pointers to DOM nodes during asynchronous operations.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #7708
- [X] There are tests for these changes

<!-- 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/14962)
<!-- Reviewable:end -->
2017-02-22 17:50:48 -08:00
Josh Matthews
5af2603ec4 Allow async webgl conformance tests to complete. 2017-02-22 19:17:38 -05:00
bors-servo
af292c4a71 Auto merge of #15682 - upsuper:arc-types, r=Manishearth
Simplify defining arc ffi types

r? @Manishearth

I don't have a good sense for creating syntax... so if you have any suggestion for the syntax of `impl_arc_ffi` macro, it would be appreciated.

<!-- 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/15682)
<!-- Reviewable:end -->
2017-02-22 15:58:35 -08:00
Xidorn Quan
0cac276891 Simplify defining arc ffi types 2017-02-23 10:22:39 +11:00
Josh Matthews
e0837134ff Remove synchronous forks of drawImage tests, and enable proper asynchronous drawImage tests. 2017-02-22 14:19:35 -05:00
bors-servo
78e8c31a4d Auto merge of #15438 - asajeffrey:url-serializable-origin, r=jdm
Add ImmutableOrigin to allow for serializing origins

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

This PR adds a serializable type `ImmutableOrigin` and a non-serializable type `MutableOrigin`. The immutable type represents an origin with `null` domain, and the mutable type represents an origin with a mutable domain. This separation is needed for implementing setting `document.domain`.

---
<!-- 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 #14892.
- [X] These changes do not require tests because it's a refactoring which will enable other features.

<!-- 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/15438)
<!-- Reviewable:end -->
2017-02-22 09:46:27 -08:00
Connor Brewster
bfd7b950ad Add ImmutableOrigin to allow for serializing origins 2017-02-22 11:11:59 -06:00
bors-servo
2bfea912dc Auto merge of #15458 - connorimes:hbs-0.4, r=emilio
Update heartbeats-simple dependencies for bug fixes

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

Updates heartbeats-simple dependencies for some bug fixes in native code (primarily for Windows).
Now we create heartbeats as needed so we don't have to maintain a hardcoded list which keeps getting out of sync.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it updates a dependency and performs some code maintenance.

<!-- 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/15458)
<!-- Reviewable:end -->
2017-02-22 09:05:37 -08:00
vwvww
ccb14abd12 Add 'use statements with extraneous spaces' tidy check
Add 'use statements with extraneous spaces' tidy check

I added simple check routine for 'use statements with extraneous
spaces' and codes that breaks the check routine in rust_tidy.rs.

* Added a code that using 'use statements with extraneous spaces' code
  in rust_tidy.rs
* Added assertion code in test_tidy.py.
* check_rust function in tidy.py now recognizes the simple case in
  the 'use statements with extraneous spaces'.
* Ran tidy check on rust code and modified a
  code(tests/unit/style/parsing/inherited_text.rs) that is not passing
  on this new tidy check.

TODO: this code has to be refactored to support more general cases.

- [X] ./mach test-tidy does not report any errors
- [X] These changes fix #14898 (github issue number if applicable).
2017-02-23 01:29:46 +09:00
bors-servo
4f7e422054 Auto merge of #15683 - hiikezoe:fill-missing-property-in-keyframe, r=emilio
Fill missing property in keyframe

<!-- Please describe your changes on the following line: -->
This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1340961
All patches has been reviewed by @emilio.

Thanks!

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

<!-- 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/15683)
<!-- Reviewable:end -->
2017-02-22 08:17:18 -08:00
bors-servo
469ed934e7 Auto merge of #15608 - prampey:wpt-link, r=SimonSapin
Added test documentation link to wpt's README.md

<!-- Please describe your changes on the following line: -->
For the sake of convenience, the documentation for writing web platform tests can be provided in the wpt README file.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because of documentation change.

<!-- 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/15608)
<!-- Reviewable:end -->
2017-02-22 07:07:28 -08:00
Hiroyuki Ikezoe
501edfdbdb Get all animated properties in *all* keyframes.
@keyframes anim {
  from { transform: none; }
  to { opacity: 0; transform: none; }
}

In above case, we have to add opacity property and value in the 'from' keyframe.
2017-02-22 19:04:49 +09:00
Alan Jeffrey
8496b021e9 Support running ./mach test-wpt /html. 2017-02-21 10:52:21 -06:00
bors-servo
14bbe9d872 Auto merge of #15670 - nox:die-plugins-die, r=Manishearth
Kill the plugins crate and its clippy support

<!-- 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/15670)
<!-- Reviewable:end -->
2017-02-21 05:15:15 -08:00
Anthony Ramine
63c4490e73 Kill the plugins crate and its clippy support
Sometimes clippy gets outdated by months, and its current support setup
means that each Servo component need to opt into it by depending on
the plugins crate manually, and not all components do that.
2017-02-21 11:50:36 +01:00
bors-servo
d724bffde8 Auto merge of #15612 - UnICorN21:master, r=canaltinova
fixed the wrong behavior of border-spacing

fixed the wrong behavior of border-spacing
---
<!-- 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 #15489.

<!-- 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/15612)
<!-- Reviewable:end -->
2017-02-21 01:09:35 -08:00
bors-servo
b5d8e8b84d Auto merge of #15654 - glennw:update-wr-clip-scroll, r=metajack
Update WR (clip scroll group work).

This shouldn't have any noticeable change on Servo, but as we land
various parts of the clip/scroll changes, keeping Servo up to date
will hopefully help catch any regressions early.

<!-- 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/15654)
<!-- Reviewable:end -->
2017-02-20 17:05:07 -08:00
Glenn Watson
b1e91a9751 Update WR (clip scroll group work).
This shouldn't have any noticeable change on Servo, but as we land
various parts of the clip/scroll changes, keeping Servo up to date
will hopefully help catch any regressions early.
2017-02-21 10:16:06 +10:00
Connor Imes
d10ad4465f Update heartbeats-simple to 0.4; Include recently added profiler categories in heartbeat logging 2017-02-20 17:17:54 -06:00
bors-servo
f86e711506 Auto merge of #15662 - canaltinova:column, r=Manishearth
Fix parsing methods of column-{gap,width}

<!-- Please describe your changes on the following line: -->
They weren't accepting {normal, auto} keywords. Fixed parsing methods of these properties.

---
<!-- 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 #15088 (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/15662)
<!-- Reviewable:end -->
2017-02-20 10:28:03 -08:00
Nazım Can Altınova
19978f2087
Fix parsing methods of column-{gap,width} 2017-02-20 21:07:19 +03:00
Ms2ger
0200a233fd Make EventListener-invoke-legacy.html a little more robust to missing interfaces. 2017-02-20 14:23:59 +01:00
Ms2ger
4fadf9b0b6 Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534
Fixes #15648.
2017-02-20 13:52:41 +01:00
bors-servo
978a603190 Auto merge of #15516 - absoludity:fix-animation-serialization-15398, r=upsuper
Animation longhand serialization should be a list of each animation rather than a list of lists for each longhand.

Fixes part of #15398 -  serialization should be a list of each animation, rather than a list of lists for each longhand.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes are prework for #15398

- [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/15516)
<!-- Reviewable:end -->
2017-02-19 19:41:19 -08:00
Huxley
06650f8428 fixed the wrong behavior of border-spacing 2017-02-19 22:59:51 +08:00
bors-servo
d2ae3d8bed Auto merge of #15334 - canaltinova:inverse, r=nox
Fix the panic when transform is non-invertible

<!-- Please describe your changes on the following line: -->
Fixes the panic when transform is non-invertible.
Counterpart of https://github.com/servo/webrender/pull/823
r? @glennw

---
<!-- 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 #13266 (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/15334)
<!-- Reviewable:end -->
2017-02-19 05:10:57 -08:00
Nazım Can Altınova
f362f6f93b Fix the panic when transform is non-invertible 2017-02-19 15:15:52 +03:00
bors-servo
debdebe8de Auto merge of #15495 - prampey:mql-borrow-error, r=jdm
Calling matchMedia during a MQL change event will not panic

<!-- Please describe your changes on the following line: -->
Calling matchMedia now leads to a new copy of MQL objects to prevent errors when borrowing references from MQL during an MQL change event.

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

<!-- Either: -->
- [X] There are tests for these changes OR
- [x] 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/15495)
<!-- Reviewable:end -->
2017-02-19 04:10:04 -08:00
bors-servo
5f813233c9 Auto merge of #15520 - frewsxcv:html-options-collection-selected-index, r=nox
Implement `selectedIndex` IDL attribute on `HTMLOptionsCollection`.

<!-- 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/15520)
<!-- Reviewable:end -->
2017-02-19 03:08:12 -08:00
Anthony Ramine
fe3f4ff0c2 Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
Prudhvi Rampey
0c21333777 Calling matchMedia during a MQL change event will not panic 2017-02-18 20:12:19 +05:30
Prudhvi Rampey
f304c56f68 Added test documentation link to wpt's README.md 2017-02-18 03:35:09 +05:30
Matt Brubeck
39a32028c4 Update gamma-lut, heartbeats-simple, hyper, mac, truetype, unicode-bidi 2017-02-17 12:31:59 -08:00
bors-servo
6adbcb4ccd Auto merge of #15358 - asajeffrey:script-browsingcontext-xorigin-window, r=jdm
Allow browsing contexts to resolve to cross-origin windows

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

This PR implements cross-thread `WindowProxy` objects.

At the moment, if a `Window` performs a non-similar-origin navigation, the old script thread does not update its `WindowProxy`, since the new `Window` is in the new script thread. With this PR, the `WindowProxy` is updated to a dummy `XOriginWindow` object, that only implements the whitelisted methods that are allowed to be called cross-origin.

This PR does not include working implementations of some of the cross-origin `Window` or `Location` methods.

This PR causes some cross-origin wpt tests to now pass, in particular `/html/browsers/origin/cross-origin-objects/cross-origin-objects.html ` now passes `Only whitelisted properties are accessible cross-origin`. There are some CORS failures in `fetch`, I suspect caused by the incorrect setting of `origin` in fetch requests.

Although there are some functions that now throw `SecurityException`, it is not meant to be a complete implementation, which will have to wait for XOWs to land.

---
<!-- 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 #15180.
- [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/15358)
<!-- Reviewable:end -->
2017-02-16 16:57:05 -08:00