Commit graph

15034 commits

Author SHA1 Message Date
Corey Farwell
8f35652f25 Update HTMLFormElement WebIDL to match spec
https://html.spec.whatwg.org/multipage/#htmlformelement
2016-01-08 20:38:56 -05:00
Corey Farwell
a1795a54d0 Update HTMLFieldSetElement WebIDL to match spec
https://github.com/whatwg/html/pull/413

https://html.spec.whatwg.org/multipage/#htmlfieldsetelement
2016-01-08 20:37:30 -05:00
bors-servo
083d3e0201 Auto merge of #9193 - nerith:fire_event, r=KiChjang
Rename fire_simple_event_params to fire_event in eventtarget.rs

Fixes #9180.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9193)
<!-- Reviewable:end -->
2016-01-08 22:34:14 +05:30
bors-servo
58111a6420 Auto merge of #9177 - pcwalton:filter-out-useless-clips, r=glennw
gfx: Eagerly transform clips into `ClippingRegion::max()` if possible.

This helps WebRender look for useless clips and optimize them out.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9177)
<!-- Reviewable:end -->
2016-01-08 21:24:45 +05:30
bors-servo
ba8f007b88 Auto merge of #9199 - nox:disable-mime-sniffing-font-context, r=nox
Disable mime_sniffing_font_context.html

Blocked who knows how many PRs, disabling for now. See #9124.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9199)
<!-- Reviewable:end -->
2016-01-08 19:30:23 +05:30
Anthony Ramine
44ff6727c8 Disable mime_sniffing_font_context.html
Blocked who knows how many PRs, disabling for now. See #9124.
2016-01-08 14:34:38 +01:00
bors-servo
a0d26445c0 Auto merge of #9171 - pcwalton:linear-gradients-background-clip, r=mbrubeck
Fix `linear_gradients_lengths_a.html` and fix Servo's use of "background-clip" to actually make it work.

See the commit messages for details.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9171)
<!-- Reviewable:end -->
2016-01-08 15:10:02 +05:30
bors-servo
ddc3b7942e Auto merge of #9176 - bholley:hoist_traversal, r=SimonSapin
Hoist traversal code into style/

This should be the last major hoisting necessary to use the style system standalone. \o/

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9176)
<!-- Reviewable:end -->
2016-01-08 13:57:39 +05:30
bors-servo
5cf2520e2f Auto merge of #9172 - nikkisquared:rewrap_request, r=jdm
Replace Rc<RefCell<Request>> with Rc<Request>

To make using Request easier, I've changed it from an `Rc<RefCell<T>>` to just `Rc<T>`, and updated individual fields to `RefCell<T>` or `Cell<T>` as needed. Git seems to be telling me there's a conflict with request.rs, which I resolved locally, but I'm not sure what to do (if anything) to make it easier to merge.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9172)
<!-- Reviewable:end -->
2016-01-08 12:37:38 +05:30
bors-servo
8e75a05e6b Auto merge of #9149 - adrianheine:webFonts, r=glennw
Correctly handle local sources for CSS3 fonts

Currently, servo panics for me when loading something like this:

```
@font-face {
  font-family: "test family";
  src: local(test font face);
}
```

That's due to a bug in `FontCacheTask`. `FontCacheTask` tries to get the value for the key
"test font face" from `self.web_families`, but previously initialized a value for the key "test family".

These two commits add an awkward test and fix the bug by not shadowing the variable `family_name`. Since the argument to `local()` should explicitly not be the name of a font family, the previous variable name was wrong and misleading anyways.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9149)
<!-- Reviewable:end -->
2016-01-08 04:47:55 +05:30
Bobby Holley
3b33174163 Review nits: Narrowly scoping unsafety, and expanding comment. 2016-01-07 11:17:31 -08:00
Nikki
67f4df5d3a changed Rc<RefCell<Request>> into Rc<Request> 2016-01-07 12:16:01 -07:00
Brandon Fairchild
fb0304cfdb Rename fire_simple_event_params to fire_event
Fixes #9180.
2016-01-07 13:49:49 -05:00
bors-servo
72ecbbe221 Auto merge of #9184 - servo:clippy, r=frewsxcv
Fix some clippy warnings.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9184)
<!-- Reviewable:end -->
2016-01-07 20:13:03 +05:30
Ms2ger
a7afb25e9f Use Option::cloned() in HTMLCanvasElement::GetContext(). 2016-01-07 14:51:19 +01:00
Ms2ger
ad1035f0a0 Remove an unused argument to CustomEvent::init_custom_event. 2016-01-07 14:51:18 +01:00
bors-servo
e5fcb7a5b7 Auto merge of #9182 - Ms2ger:es-warning, r=Manishearth
Silence a warning in EventSourceReadyState.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9182)
<!-- Reviewable:end -->
2016-01-07 15:10:23 +05:30
Ms2ger
27ad50cfa7 Silence a warning in EventSourceReadyState. 2016-01-07 09:45:12 +01:00
bors-servo
0fcee73ef3 Auto merge of #8860 - craftytrickster:8801/blob-vec, r=jdm
Changing blob to use arc pointers in order to limit wasteful copying …

Fixes #8801.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8860)
<!-- Reviewable:end -->
2016-01-07 13:07:42 +05:30
bors-servo
f3aa5b40ed Auto merge of #9179 - nerith:mixedmessage, r=KiChjang
script_task.rs: Use self::MixedMessage in handle_msgs

handle_msgs contains many references to variants of MixedMessage.

The function should directly reference the variants instead of
prepending `MixedMessage::`.

Fixes #9169.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9179)
<!-- Reviewable:end -->
2016-01-07 10:50:29 +05:30
Brandon Fairchild
0b25737113 script_task.rs: Use self::MixedMessage in handle_msgs
handle_msgs contains many references to variants of MixedMessage.

The function should directly reference the variants instead of
prepending `MixedMessage::`.

Fixes #9169.
2016-01-07 00:13:05 -05:00
Patrick Walton
3103b03262 gfx: Eagerly transform clips into ClippingRegion::max() if possible.
This helps WebRender look for useless clips and optimize them out.
2016-01-06 19:48:14 -08:00
bors-servo
6eb28c7fd8 Auto merge of #9173 - pcwalton:remove-font-group-address-cache, r=mbrubeck
Remove the fontgroup address cache.

It's not clear to me that it actually helps. Moreover, it's wrong and
results in fonts randomly changing e.g. on GitHub when mousing over
elements.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9173)
<!-- Reviewable:end -->
2016-01-07 09:15:45 +05:30
Bobby Holley
29987a6715 Bonus Fix - Rename traverse_dom_preorder to traverse_dom.
The incorrect naming here was bugging me - the dom traversal has both pre- and post-order
processing steps.
2016-01-06 19:21:13 -08:00
Bobby Holley
136c0938a2 Hoist the style parts of sequential.rs into style/. 2016-01-06 19:21:11 -08:00
Bobby Holley
57d2a0b0db Make sequential traversal operate on TNode instead of LayoutNode.
I forgot to do this along with the parallel case. Ideally I'd merge this patch
into that one, but then I'd need to rebase it over the LayoutContext patch,
which would be a pain.
2016-01-06 19:21:09 -08:00
Bobby Holley
60b3c66b28 Hoist the style parts of parallel.rs into style/. 2016-01-06 19:21:07 -08:00
Bobby Holley
f9a02f0aba Hoist the style parts of traversal.rs into style/. 2016-01-06 18:50:16 -08:00
Bobby Holley
bf1a7d243f Remove the dependency of parallel DOM traversal and style calculation on LayoutContext. 2016-01-06 18:24:18 -08:00
Bobby Holley
ebc5eb1b98 Make parallel DOM traversal and style calculation operate on TNode instead of LayoutNode. 2016-01-06 17:58:53 -08:00
Patrick Walton
154f970b5b Remove the fontgroup address cache.
It's not clear to me that it actually helps. Moreover, it's wrong and
results in fonts randomly changing e.g. on GitHub when mousing over
elements.
2016-01-06 17:06:59 -08:00
David Raifaizen
76f689cd06 Changed blob to use DataSlice with Arc in order to limit wasteful copying of byte vector 2016-01-06 19:41:52 -05:00
bors-servo
238a8786de Auto merge of #9029 - KiChjang:event-source, r=jdm
Implement EventSource and update test expectations

Partial #8925.

Most of the processing model for `EventSource` are unimplemented because we currently don't have a fetch implementation.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9029)
<!-- Reviewable:end -->
2016-01-07 00:38:25 +05:30
Patrick Walton
fdb791bdd5 layout: Take the value of background-clip into account when
determining the painting area for background images and gradients.

See: https://drafts.csswg.org/css-backgrounds-3/#the-background-clip
2016-01-06 10:39:51 -08:00
Patrick Walton
c9242309cb tests: Make linear_gradients_lengths_a.html and
`linear_gradients_lengths_ref.html` use `background-clip: content-box`.

The tests clearly expect the background painting area to have width of
100px, but since the default value of `background-clip` is `border-box`
and the boxes in question have a 1-pixel border the background painting
areas are actually 102px. This commit fixes the tests so that the width
of the background painting area is actually 100px.
2016-01-06 10:39:45 -08:00
bors-servo
f4a2fe9501 Auto merge of #9164 - paulrouget:updatePipelineURL, r=jdm
update pipeline url after redirections

`pipeline.url` is not updated after a redirection.

Fixes #8902

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9164)
<!-- Reviewable:end -->
2016-01-06 21:53:41 +05:30
bors-servo
99689bc6b0 Auto merge of #9165 - KiChjang:extract-response, r=Ms2ger
Extract Response from net_traits/lib.rs

This puts them in a new file located at `net_traits/response.rs`.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9165)
<!-- Reviewable:end -->
2016-01-06 20:17:05 +05:30
Keith Yeung
05dc512055 Extract Response from net_traits/lib.rs 2016-01-06 09:45:22 -05:00
Paul Rouget
268e285439 update pipeline url after redirections 2016-01-06 06:49:49 +01:00
bors-servo
64e968d8bc Auto merge of #9119 - TheKK:input_element_size, r=eefriedman
Parse size attribute of HTMLInputElemnt correctly

Should fix #8773

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9119)
<!-- Reviewable:end -->
2016-01-06 08:57:19 +05:30
Ying-Ruei Liang (KK)
74905f0f3c Invalid type attribute for HTMLInputElement now fallback as text type (fixes #8773) 2016-01-06 10:56:00 +08:00
Keith Yeung
1d62db405e Implement EventSource and update test expectations 2016-01-05 21:47:43 -05:00
bors-servo
25c2b7dec6 Auto merge of #9161 - frewsxcv:cleanup-match, r=jdm
Reduce 'match' body, remove unnecessary clone

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9161)
<!-- Reviewable:end -->
2016-01-06 08:02:33 +05:30
Corey Farwell
639fbc2275 Reduce 'match' body, remove unnecessary clone 2016-01-05 16:55:37 -08:00
bors-servo
8b855e4456 Auto merge of #9160 - nerith:spec, r=jdm
Update FileAPI spec links

The links in components/script/dom/blob.rs were pointing to the old location.

Fixes #9157.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9160)
<!-- Reviewable:end -->
2016-01-06 03:04:21 +05:30
bors-servo
e3dd36f0f3 Auto merge of #9159 - saneyuki:9158, r=jdm
gfx: handle the ResponseAction::ResponseComplete error case in font_cache_task

Fix #9158

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9159)
<!-- Reviewable:end -->
2016-01-06 02:29:26 +05:30
Brandon Fairchild
b5e121a312 Update FileAPI spec links
The links in components/script/dom/blob.rs were pointing
to the old location.

Fixes #9157.
2016-01-05 15:48:30 -05:00
bors-servo
4ab1cdece6 Auto merge of #8970 - ecoal95:webgl-array-buffer-data, r=jdm
webgl: Make a general way to get data from a JS array buffer view

This fixes an invalid length being reported from
`float32_array_to_slice` (which used the byte length), and also to
generalize getting data from a JS array buffer view, to reduce code
duplication.

The pending type safety issues, like where we could send a `UInt16Array`
where we expect a `Float32` one, should be solved by IDL bindings in
some cases, like `uniform[n]fv` or `vertexAttrib[n]fv`, and with extra
checks in others, like in the pending `texImage2D(..., ArrayBufferView)`.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8970)
<!-- Reviewable:end -->
2016-01-06 01:54:16 +05:30
Tetsuharu OHZEKI
574f934314 gfx: handle the ResponseAction::ResponseComplete error case in font_cache_task 2016-01-06 04:59:10 +09:00
bors-servo
1ea2341a5d Auto merge of #9153 - nikkisquared:http_network_fetch, r=jdm
Partial implementation of HTTP-network Fetch step

I've been working on making a partial implementation of HTTP-network Fetch[1] so that I can begin testing the entire Fetch protocol as implemented in Servo. The empty steps are intentionally so, including the incomplete Step 5, which I started without realizing I don't need to do basic testing.

[1] https://fetch.spec.whatwg.org/#http-network-fetch

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9153)
<!-- Reviewable:end -->
2016-01-06 00:46:17 +05:30