Commit graph

2826 commits

Author SHA1 Message Date
Corey Farwell
5efbf0fa8f Move util::str::parse_length into 'style' component.
The function is only used in the 'style' component, so we'll move it
there alongside other relevant parse functions.
2016-03-24 10:45:33 -04:00
bors-servo
f56062b069 Auto merge of #10169 - jdm:formvalidation, r=jdm
Implement initial pieces of form validation.

Rebase of #10108.

<!-- 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/10169)
<!-- Reviewable:end -->
2016-03-24 19:13:02 +05:30
Sagar Muchhal
051ffba0e5 Implement initial pieces of form validation. 2016-03-24 09:07:38 -04:00
Stjepan Glavina
4965c93d16 Merge branch 'master' into fix-local-urls-only-10147 2016-03-24 13:45:25 +01:00
Stjepan Glavina
3ec4515a73 Address PR comments
- Remove fn `url_is_local`
- Remove fn `set_local_urls_only`
- Fix `test_fetch_with_local_urls_only`
2016-03-24 13:42:40 +01:00
bors-servo
446783f7b6 Auto merge of #10167 - stjepang:fix-aboutblank-body, r=KiChjang
Fix fetching about:blank

When fetching about:blank, response body should be the empty byte
sequence.
Spec: https://fetch.spec.whatwg.org/#concept-basic-fetch

Before this change, response body would be set to `ResponseBody::Empty`,
and then fetching would result in an infinite loop at step 19 in fn
`main_fetch` (methods.rs).

r? @KiChjang

<!-- 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/10167)
<!-- Reviewable:end -->
2016-03-24 16:40:19 +05:30
Stjepan Glavina
bcd813d961 Fix fetching about:blank
When fetching about:blank, response body should be the empty byte
sequence.
Spec: https://fetch.spec.whatwg.org/#concept-basic-fetch

Before this change, response body would be set to `ResponseBody::Empty`,
and then fetching would result in an infinite loop at step 19 in fn
`main_fetch` (methods.rs).
2016-03-24 11:17:12 +01:00
Sankha Narayan Guria
d010df92cf Implement and test DOMTokenList.replace (fixes #8511) 2016-03-24 10:37:42 +01:00
bors-servo
2887623c4a Auto merge of #10150 - emilio:canvas-cleanup, r=jdm
Canvas cleanup

This PR cleans up the layerization infrastructure for canvas, which was unused, and removes unused dependencies.

It also takes in account my recent username change to update angle's dependency (offscreen_gl_context requires extra work due to webrender depending on it).

r? @jdm

<!-- 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/10150)
<!-- Reviewable:end -->
2016-03-24 08:44:40 +05:30
Emilio Cobos Álvarez
5ed93a5c4a Change old references of ecoal95 2016-03-23 18:12:40 +01:00
Stjepan Glavina
6576fde29b Correctly handle flag local_urls_only
In function Request::fetch_main, flag local_urls_only (if set)
should allow fetching local urls only. Before this change, the flag had
the inverse behaviour.
2016-03-23 18:01:43 +01:00
Jussi Räsänen
ddeb33bb41 Fixed missing test image for filter inline reftests 2016-03-23 16:44:36 +02:00
Jussi Räsänen
7d6fbcf90a Bug #10128 - Fixed missing rust.png in reftests 2016-03-23 14:28:12 +02:00
bors-servo
f3abfeeadd Auto merge of #9979 - stspyder:master, r=jdm
Implementation of Blob Constructor with test changes

Apologize for the late PR. I see that #9977 already overlaps with some of the work. If that is accepted, then I'll change my PR to reflect just the WPT changes.

<!-- 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/9979)
<!-- Reviewable:end -->
2016-03-23 09:07:38 +05:30
bors-servo
50193e9119 Auto merge of #9518 - shinglyu:responseurl, r=jdm
Implemented XMLHttpRequest.responseURL

Resolves #8830

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9518)
<!-- Reviewable:end -->
2016-03-23 00:12:57 +05:30
Sankha Narayan Guria
feddb52e59 Test that any call to classList.add() create the class attribute 2016-03-22 13:27:33 +01:00
Shing Lyu
f55b0765d1 Bug 8830 - Implemented XMLHttpRequest.responseURL 2016-03-22 13:56:31 +08:00
bors-servo
d1e27eb4f4 Auto merge of #10109 - mbrubeck:compute_damage_short_circuit, r=pcwalton
Fixes for compute_damage

A few changes:

* Make `compute_damage` short-circuit more, by skipping comparisons if they will only set flags that are already set.

* Update some obsolete comments.

* Add a bunch of missing properties to `compute_damage`.

* Set `RECONSTRUCT_FLOW` when `text-decoration` changes, because it can affect text fragment splitting/merging.

I believe this is all of the computed properties except for the animation properties. (I wasn't sure what to do with those.)  After this lands I'd like to work on moving this information into `properties.mako.rs` so that this function can be auto-generated, and so that newly-added properties can default to setting all flags instead of none.

<!-- 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/10109)
<!-- Reviewable:end -->
2016-03-22 10:29:48 +05:30
Matt Brubeck
f7d490a7e7 Add missing properties to compute_damage 2016-03-21 16:28:07 -07:00
Paul Rouget
6577409b95 Add history information to mozbrowserlocationchange event 2016-03-21 19:19:48 +08:00
bors-servo
090da52913 Auto merge of #9586 - notriddle:details_ui, r=SimonSapin
Details ui

Requires a patch to rust-selectors, and doesn't currently recalculate the styles correctly (which is needed to make actual toggling work correctly).

Still trying to figure out what it takes to get style recalc to do what this needs.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9586)
<!-- Reviewable:end -->
2016-03-20 13:27:59 +05:30
bors-servo
8e95f54501 Auto merge of #10079 - servo:script-encoding, r=jdm
Implement encoding determination for external scripts.

<!-- 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/10079)
<!-- Reviewable:end -->
2016-03-20 06:28:25 +05:30
Michael Howell
9d9c5398a8 Get the fundamentals of the HTMLDetailsElement rendering stuff working.
Still need to implement the style invalidation.

Part of #9395
2016-03-19 16:02:11 -07:00
bors-servo
a4251c832d Auto merge of #9876 - mbrubeck:seen-viewport-percentages, r=SimonSapin
Recompute styles on viewport size change if they contain viewport percentages

Fixes #8754.  Depends on servo/rust-cssparser#99.  r? @SimonSapin

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9876)
<!-- Reviewable:end -->
2016-03-20 02:20:54 +05:30
Matt Brubeck
25c1bce9f6 Recompute viewport-dependent styles on viewport size change
Fixes #8754.
2016-03-19 13:23:39 -07:00
Patrick Walton
5ea8c34276 layout: Move overflow calculation to be a separate, sequential,
bottom-up pass.

Right now, the only reason that overflow calculation works is that we
rely on script inducing extra reflows that are sent for display. This
was preventing #10021 from landing.

This change regresses layout performance by about 1% in my tests.

Fixes #7797 properly.
2016-03-18 22:11:51 -07:00
bors-servo
2d6283c64b Auto merge of #9929 - servo:cascade, r=pcwalton
Refactor the cascade

Converting the specified value of some properties into a computed value depends on the value of other properties. For example, the `em` unit of any length depends on the `font-size` property.

Previously, we would do a first pass over applicable declarations to build up a `values::computed::Context` struct with a number of fields for each such piece of data from other properties.

This simplies the struct by instead having it contain the set of computed values (for a given element) that is being populated and classify properties into "early" and "other", such that the only dependencies can be from "other" to "early". We iterate applicable_declarations twice, first cascading "early" properties then "other". Unfortunately, it’s not easy to check that this classification is correct.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9929)
<!-- Reviewable:end -->
2016-03-19 08:08:56 +05:30
askalski
89b8499df8 Implement encoding determination for external scripts. 2016-03-18 16:51:25 +01:00
bors-servo
14c6497dbd Auto merge of #9971 - danlrobertson:i9357, r=KiChjang
Add wpt tests for send

Add wpt tests for send that do not set the responseType and compare the result against a string.

Fixes #9357

r? @KiChjang

<!-- 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/9971)
<!-- Reviewable:end -->
2016-03-18 16:27:40 +05:30
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