Commit graph

6274 commits

Author SHA1 Message Date
Ms2ger
32903ba6d5 Pin clippy to a working revision. 2016-01-07 10:09:05 +01:00
Ms2ger
27ad50cfa7 Silence a warning in EventSourceReadyState. 2016-01-07 09:45:12 +01:00
Manish Goregaokar
f67e208630 Remove virtual call and unconditionally dirty node on set_focus_state 2016-01-07 13:38:05 +05:30
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
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
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
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
Nikki
af310f7874 minimal implementation of http_network_fetch for testing purposes 2016-01-05 12:14:07 -07:00
Bobby Holley
513a75d86a Hoist the rest of css/matching.rs into style/. 2016-01-04 09:41:31 -08:00
Bobby Holley
94b0789a5f Remove the dependency of css/matching.rs on SharedLayoutContext. 2016-01-04 09:38:04 -08:00
Bobby Holley
08f2a24552 Remove the dependency of css/matching.rs on concrete RestyleDamage.
We can make this easier by inlining helper method implementations in the traits themselves,
which makes the code more compact as a nice side-effect.
2016-01-04 09:38:04 -08:00
Bobby Holley
27987c3bb4 Introduce a concept of restyle damage to the style system.
We can't hoist RestyleDamage itself, because it's very layout-dependent. But this
should be enough to let us hoist the things we need.
2016-01-04 09:38:04 -08:00
Bobby Holley
947134949a Refactor parallel dom traversal to be agnostic to the processing steps themselves. 2016-01-04 09:38:04 -08:00
Emilio Cobos Álvarez
d30f05554b conversions: Make a is_type_compatible method for ArrayBufferViews. 2016-01-04 15:51:01 +01:00
Emilio Cobos Álvarez
43d395a682 conversions: Add a checked version to array_buffer_view_data 2016-01-04 15:29:24 +01:00
Adrian Heine
4069645729 Don't shadow family_name
The argument to `local()` is not a font family, but the name of a
»single font face within a larger family« according to
http://www.w3.org/TR/css3-fonts/#src-desc.

The previous implementation of `FontCache::run` would panic if the argument to
`local()` would not be the name of a font family present in `self.web_families`.
That happened since `FontCacheTask` tried to use the argument to `local()` as a
key for `self.web_families`, although it previously correctly initialized a
value for the `family` field of the `AddWebFont` command.
2016-01-04 15:23:27 +01:00
Adrian Heine
3f61d63e72 Add failing test for FontCacheTask::add_web_font
This test tries to add a web font to the `FontCacheTask`. The added web font
corresponds to the following CSS font definition:

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

This test fails, since `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".
2016-01-04 15:23:26 +01:00
Emilio Cobos Álvarez
9ad49c8aa1 conversion: Extrapolate array_buffer_view_data
And use it instead of the raw jsapi calls.
2016-01-04 15:19:29 +01:00
Emilio Cobos Álvarez
4d32444bf7 webgl: Unify accessing ArrayBufferView objects
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).
2016-01-04 13:58:49 +01:00
Guillaume Gomez
99ac1a81cc Generate PartialEq automatically 2016-01-03 18:07:09 +01:00
Manish Goregaokar
46a9c92b70 Avoid whitespace collapse for text inputs (fixes #8772) 2016-01-03 13:18:26 +05:30
Manish Goregaokar
23e7dfa57b Relayout text input elements on blur 2016-01-03 13:18:24 +05:30
bors-servo
4a141fb63f Auto merge of #9137 - iszak:issue-9135, r=nox
Fixes https://github.com/servo/servo/issues/9135

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9137)
<!-- Reviewable:end -->
2016-01-03 11:33:00 +05:30
bors-servo
1b0053f8b1 Auto merge of #9136 - frewsxcv:htmlbodyelement-background, r=nox
HTMLBodyElement 'background' attribute improvements

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9136)
<!-- Reviewable:end -->
2016-01-03 11:00:49 +05:30
bors-servo
7f156b8c12 Auto merge of #9072 - Manishearth:password-placeholder, r=eefriedman
Fix placeholders for password inputs

currently they show dots instead of the placeholder text

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9072)
<!-- Reviewable:end -->
2016-01-03 10:21:26 +05:30
Manish Goregaokar
cc5844a373 Move placeholder logic out of get_raw_textinput_value 2016-01-03 09:47:30 +05:30