Commit graph

3197 commits

Author SHA1 Message Date
bors-servo
20eb81c00a Auto merge of #10009 - creativcoder:impl-navigator-language, r=Ms2ger
implements NavigatorLanguage

Fixes #9992

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10009)
<!-- Reviewable:end -->
2016-03-18 15:29:46 +05:30
bors-servo
0008c07dc3 Auto merge of #10014 - saurvs:pr1, r=KiChjang
Update WebSocket blocked ports to match the Fetch spec

Adresses #9949.

This adds a function that tests whether a request should be blocked or not based on it's url's scheme and port. It also adds testing for port restriction to the `main_fetch` method. More info in eb07418c83.

@Ms2ger In https://github.com/whatwg/html/issues/841, @annevk proposes to remove port restrictions from websockets. Should we go ahead do that, given that the spec hasn't been changed yet?

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10014)
<!-- Reviewable:end -->
2016-03-18 00:31:24 +05:30
St.Spyder
34726d8b9e Implementation of Blob Constructor with test changes 2016-03-17 23:47:12 +05:30
Daniel Robertson
8ca7ff11ca Add wpt tests for send
Add wpt tests for send that do not set the responseType and
compare the result against a string.
2016-03-17 10:26:27 -04:00
Anthony Ramine
46c505e47b Bump serde to 0.7 2016-03-17 13:52:39 +01:00
Saurav Sachidanand
4ddf4e7bdc Update WebSocket blocked ports to match the Fetch spec 2016-03-17 18:21:20 +05:30
Rahul Sharma
facf59177c implements NavigatorLanguage 2016-03-17 16:13:37 +05:30
bors-servo
909ff4446a Auto merge of #10035 - saurvs:master, r=jdm
Resets selection in textinput when its content is changed.

Fixes https://github.com/servo/servo/issues/10005.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10035)
<!-- Reviewable:end -->
2016-03-17 01:32:58 +05:30
Saurav Sachidanand
0b593759df Resets selection in textinput when its content is changed.
Adds a wpt test as well.
2016-03-16 22:20:22 +05:30
bors-servo
37574065e0 Auto merge of #9838 - szeged:webbluetooth, r=jdm
WebBluetooth API classes

Basic implementation of WebBluetooth API
API spec.: https://webbluetoothcg.github.io/web-bluetooth/

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9838)
<!-- Reviewable:end -->
2016-03-16 21:01:18 +05:30
Ms2ger
773d4a7ee5 Update expected results for the jquery tests.
Apparently four of the attributes tests were fixed at some point.
2016-03-16 14:48:10 +01:00
Attila Dusnoki
e7d70cfabf WebBluetooth API classes 2016-03-16 10:34:48 +01:00
bors-servo
437e875c2e Auto merge of #9997 - pcwalton:text-node-damage, r=mbrubeck
style: Compute damage for text nodes.

They have styles just like elements do.

Allows a dynamic change of `display: none` to `display: inline` to work.

Closes #9868.

r? @mbrubeck

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/9997)
<!-- Reviewable:end -->
2016-03-16 10:01:49 +05:30
Patrick Walton
d59dee0c65 style: Compute damage for text nodes.
They have styles just like elements do.

Allows a dynamic change of `display: none` to `display: inline` to work.

Closes #9868.
2016-03-15 21:32:16 -07:00
Simon Sapin
54790d0ae5 Fix the rem unit.
(I think it’s never worked in over a year since it was implemented…)
2016-03-15 18:10:16 +01:00
Ms2ger
a91433f0c8 Update web-platform-tests to revision 66c4613f823c4384c78ada77346eda17bb128947 2016-03-15 16:34:24 +01:00
bors-servo
183772583f Auto merge of #9988 - Ms2ger:lazy-static-host-table, r=Manishearth
Use lazy_static for HOST_TABLE.

This might change behaviour if the file is changed between Servo startup and
the moment HOST_TABLE is first accessed. I don't think we care.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9988)
<!-- Reviewable:end -->
2016-03-15 16:33:03 +05:30
Ms2ger
ec1f720662 Use lazy_static for HOST_TABLE.
This might change behaviour if the file is changed between Servo startup and
the moment HOST_TABLE is first accessed. I don't think we care.
2016-03-15 12:02:45 +01:00
Patrick Walton
28a71c4820 Make border radii clip their contents.
Needed for browser.html rounded corners.
2016-03-14 18:32:55 -07:00
bors-servo
6895dab07c Auto merge of #9737 - g-k:test-websocket-origin-in-worker, r=Ms2ger
test websocket origin set in worker

Fixes #9535

This crashes and I'm not sure how to debug it (and whether it's a problem with the browser or more likely a problem with the test):

```
./mach test-wpt /websockets/opening-handshake/003-sets-origin.worker --log-raw wpt.log                         Running 1 tests in web-platform-tests

  ▶ CRASH [expected OK] /websockets/opening-handshake/003-sets-origin.worker

Ran 1 tests finished in 2.0 seconds.
  • 0 ran as expected. 0 tests skipped.
  • 1 tests crashed unexpectedly
```

Also, should the test file be in `/websockets/` or `/websockets/opening-handshake/`?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9737)
<!-- Reviewable:end -->
2016-03-14 18:56:38 +05:30
bors-servo
a862384841 Auto merge of #9735 - KiChjang:planned-navigation-tests, r=jdm
Add test for get action URL planned navigation

Mutate action URL doesn't need to be tested, since the existing urlencoded.html already tests it.

This new test currently fails, because of the weirdness in calling `testframe.contentWindow`. It returns null for this test, but not for urlencoded.html. Can't figure out why.

Fixes #9690

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9735)
<!-- Reviewable:end -->
2016-03-12 13:49:52 +05:30
Keith Yeung
084e86daf2 Add test for get action URL planned navigation 2016-03-11 20:33:07 -05:00
bors-servo
71b1122e97 Auto merge of #9969 - mbrubeck:quotes-036, r=pcwalton
Don't re-resolve already-resolved generated content

This fixes #7846, a failure in the "quotes-036.htm" test. Servo lays out this test correctly in its initial layout, but then messes it up in any relayout (whether it's an incremental or full layout).

The problem is that the ResolveGeneratedContent traversal is not safe to run more than once on the same flow. It mutates some GeneratedContent fragments into ScannedText fragments, but leaves others unmodified (in particular, those that generate empty content). The next time layout runs, these remaining GeneratedContent fragments are processed *again* but with an incorrect correct quote nesting level (because some of the surrounding GeneratedContent fragments are gone).

This patch ensures that each GeneratedContent fragment is resolved only once.

r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9969)
<!-- Reviewable:end -->
2016-03-12 02:42:10 +05:30
bors-servo
7ff7932a8c Auto merge of #9824 - danlrobertson:element1, r=asajeffrey
Add the scrollWidth and scrollHeight extensions to the element interface

Add the `scrollWidth` and `scrollHeight` extensions to the element interface. My goal was to create a method that encompassed getting `scrollWidth`, `scrollHeight`, `scrollTop`, and `scrollLeft`.

I also noted that `clientHeight` and `clientWidth` to not handle the root element and the body element correctly.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9824)
<!-- Reviewable:end -->
2016-03-12 00:19:24 +05:30
Daniel Robertson
16d2778ece Add scrollWidth/Height to element interface
Add the scrollWidth and scrollHeight extensions to the element
interface.
2016-03-11 18:22:16 +00:00
bors-servo
059edc3287 Auto merge of #9961 - mbrubeck:split-line-work-list, r=pcwalton
Fix work list order after split_line_at_last_known_good_position

This fixes a bug in line splitting caused by the following actions when `LineBreaker::split_line_at_last_known_good_position` is called:

1. Push some number of previous fragments onto the front of the work list.
2. Push the current fragment back onto the front work list.

This resulted in the work list being out of order.  The correct order is action 2 followed by action 1.  Fixes #9830. r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9961)
<!-- Reviewable:end -->
2016-03-11 23:19:43 +05:30
Matt Brubeck
1e7d60e7b7 Fix work list order after split_line_at_last_known_good_position
This fixes a bug in line splitting caused by the following actions when
`LineBreaker::split_line_at_last_known_good_position` is called:

1. Push some number of previous fragments onto the front of the work list.
2. Push the current fragment back onto the front work list.

This resulted in the work list being out of order.  The correct order is
action 2 followed by action 1.  Fixes #9830.
2016-03-11 09:18:22 -08:00
Matt Brubeck
5104d8244f Don't re-resolve already-resolved generated content
This fixes #7846, a failure in the "quotes-036.htm" test. Servo lays out this
test correctly in its initial layout, but then messes it up in any relayout
(whether it's an incremental or full layout).

The problem is that the ResolveGeneratedContent traversal is not safe to run
more than once on the same flow. It mutates some GeneratedContent fragments
into ScannedText fragments, but leaves others unmodified (in particular,
those that generate empty content). The next time layout runs, these remaining
GeneratedContent fragments are processed *again* but with an incorrect correct
quote nesting level (because some of the surrounding GeneratedContent
fragments are gone).

This patch ensures that each GeneratedContent fragment is resolved only once.
2016-03-11 09:11:37 -08:00
bors-servo
f2f6787189 Auto merge of #9930 - rebstar6:htmlclick, r=jdm
Remove activatable element filter within HTMLElement#click()

Address https://github.com/servo/servo/issues/6542

Ensure that click() calls are not limited to activatable elements. Also makes the isTrusted attribute false when synthetic click activation are called from a click() method (as per spec).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9930)
<!-- Reviewable:end -->
2016-03-11 10:06:24 +05:30
bors-servo
eac68c523b Auto merge of #9905 - saurvs:master, r=ecoal95
Implement input.setSelectionRange

Fixes https://github.com/servo/servo/issues/9862.

Passes all tests for `input` in `tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html`.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9905)
<!-- Reviewable:end -->
2016-03-11 06:13:51 +05:30
Rebecca
d6678a184b Call synthetic_click_activation for all clicks
Moved synthetic_click_actiavtion out of Activatable trait so it can be
called by all elements (not just activatable). Calls appropriately
from click. Also updates the isdisabled check in click to check for all
types of elements
2016-03-10 14:43:33 -05:00
bors-servo
396812b6d9 Auto merge of #9926 - connorimes:update-em-interface-hbs-crates, r=asajeffrey
Update heartbeats and energymon profiler dependencies

Heartbeats now on crates.io.
Updates to energymon interface for energy profiling.
Profiling script for Android.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9926)
<!-- Reviewable:end -->
2016-03-10 23:09:23 +05:30
Saurav Sachidanand
a3d77790a6 Implement input.setSelectionRange 2016-03-10 19:54:21 +05:30
bors-servo
95883dcbcf Auto merge of #9907 - nikkisquared:async_tests, r=jdm
Add Tests For Asynchronous Fetch Calls With Filtered Responses

I've added two tests using async_fetch intended to create filtered responses. I caught and fixed a bug where waiting for response.body to be completed would never pass for Opaque or OpaqueRedirect, since their response.body is always `Empty`.

As always, I'd appreciate review and feedback! I don't plan to write new tests, but I will gladly patch up any gaps in the current tests.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9907)
<!-- Reviewable:end -->
2016-03-10 08:59:07 +05:30
bors-servo
fa93d3f467 Auto merge of #9796 - KiChjang:range-stringifier, r=jdm
Implement Stringifier for Range

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9796)
<!-- Reviewable:end -->
2016-03-10 07:35:06 +05:30
Nikki
cddc03be33 added two fetch_async tests involving filtered responses 2016-03-09 18:16:17 -07:00
bors-servo
d23b7481d6 Auto merge of #9946 - yoava333:master, r=KiChjang
Added compiler lint ban on DOMRefCell

this resolves https://github.com/servo/servo/issues/9924

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9946)
<!-- Reviewable:end -->
2016-03-10 04:44:33 +05:30
Yoav Alon
444eddb4a1 Added compiler lint ban on DOMRefCell 2016-03-09 23:48:32 +02:00
Connor Imes
f31e8841fb Heartbeats now on crates.io.
Updates to energymon interface for energy profiling.
Profiling script for Android.
2016-03-09 15:47:37 -06:00
Keith Yeung
b32e859c3a Implement Stringifier for Range 2016-03-09 15:27:37 -05:00
Anthony Ramine
b66d190166 Bump url to 0.5.7 2016-03-09 20:15:16 +01:00
Anthony Ramine
10e19e06a7 Bump string_cache to 0.2.11 2016-03-09 20:15:15 +01:00
Anthony Ramine
f89c321141 Bump euclid to 0.6.4 2016-03-09 20:15:11 +01:00
Anthony Ramine
200e2286fd Bump cssparser to 0.5.4 2016-03-09 20:14:38 +01:00
Anthony Ramine
5720c76816 Bump app_units to 0.2.3 2016-03-09 20:14:35 +01:00
bors-servo
162e89d8c6 Auto merge of #9780 - bobthekingofegypt:github_hsts_bug, r=jdm
correctly send secure cookies after hsts url match

Fixes #8100, where sites in the hsts list were not recieving secure
cookies if the site was originally loading using a plain http url.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9780)
<!-- Reviewable:end -->
2016-03-09 15:13:52 +05:30
Ms2ger
8b629652ac Make Response::new() an inherent method.
There is no real reason to put this in an extension trait.
2016-03-08 17:55:18 +01:00
bors-servo
fee7cb179e Auto merge of #9850 - nikkisquared:2_async_2_furious, r=jdm
Set response.body Asynchronously In Fetch

Following having finished making Fetch asynchronous, response.body should be set asynchronously, since it's the major goal of calling Fetch. So far, I've made the body wrapped in Arc<Mutex<>>, and I've wrapped a new thread around the part where it's set. I've also discovered that the fetch_async function makes step 8 of Main Fetch obsolete, and I've commented it appropriately.

I'm currently having a hard time with the thread for setting response.body, though. @jdm suggested I have the body set continually, block by block, but my implementation for that runs so slow that I can't finish running my fetch test suite in reasonable time. @KiChjang pointed out that a lot of the lag is due to how response.body currently stores everything inside a Vec. Changing the storage container seems to be both necessary and beyond the scope of the time I have to work on this.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9850)
<!-- Reviewable:end -->
2016-03-08 04:45:25 +05:30
Nikki
b187985e49 set response.body asynchronously in Fetch 2016-03-07 15:09:39 -07:00
Ms2ger
3a73a2452e Update CSS tests to revision 5366390418de396cdf7c9d45fbaedbed81dc4a61 2016-03-07 18:44:47 +01:00