Commit graph

7621 commits

Author SHA1 Message Date
Josh Matthews
a80320e24e Add event handlers for media-related events. 2016-05-03 18:05:22 -04:00
Josh Matthews
d718da1c6a Pause media elements when they're removed from the document. 2016-05-03 18:05:21 -04:00
Josh Matthews
e3db11fd8b Implement play, pause, paused, and autoplay APIs. 2016-05-03 18:05:20 -04:00
Josh Matthews
5960fbe604 Implement load, canPlayType, and error APIs for media elements. 2016-05-03 18:05:18 -04:00
Josh Matthews
eae27adc4a Implement basic media resource selection and fetching. 2016-05-03 16:25:24 -04:00
Josh Matthews
5918954edd Add media tasks to the DOM manipulation task queue. 2016-05-03 16:25:22 -04:00
Josh Matthews
53f9307fb7 Add stubs for src and currentSrc for HTMLMediaElement. 2016-05-03 16:25:21 -04:00
Josh Matthews
b8b4be34c0 Stub out readyState and networkState attributes for HTMLMediaElement. 2016-04-28 17:35:29 -04:00
bors-servo
3d38a60cee Auto merge of #10867 - danlrobertson:sandbox, r=KiChjang
Fix logic for cors cache match

The current logic for a cors cache match does not consider "credentials is false and request's credentials mode is not "include" or credentials is true."

I could have missed something, but `CacheRequestDetails::credentials` is set to true if credentials mode is "include", and false otherwise. So `(!cors_cache.credentials && !cors_req.credentials) || cors_cache.credentials` would be directly following the spec, but unless I'm mistaken `cors_cache.credentials || !cors_req.credentials` is logically the same.

Fixes: #10525

<!-- 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/10867)
<!-- Reviewable:end -->
2016-04-28 13:36:05 -07:00
bors-servo
3836c2c4cb Auto merge of #10159 - pcwalton:iframes-know-their-pipelines, r=jdm
script: Make iframes know their pipeline IDs at all times, even after navigation.

Since WebRender uses the pipeline ID stored in the iframe element to
determine which pipeline to display, it had better be kept up to date!

Closes #9919.

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/10159)
<!-- Reviewable:end -->
2016-04-28 12:44:39 -07:00
Patrick Walton
7bd257089c script: Make iframes know their pipeline IDs at all times, even after
navigation.

Since WebRender uses the pipeline ID stored in the iframe element to
determine which pipeline to display, it had better be kept up to date!

Closes #9919.
2016-04-28 10:53:13 -07:00
Patrick Walton
6b6587a73b layout: Translate floats flowing out of blocks to compensate for inline
direction margins.

Improves Reddit /r/rust.
2016-04-28 10:25:49 -07:00
Patrick Walton
97de2c2afa layout: Reset the speculated inline size of floats out to compensate for
margins for all blocks, not just block formatting contexts.

Partial fix for Reddit /r/rust.
2016-04-28 10:25:49 -07:00
bors-servo
55d14ffe00 Auto merge of #10855 - servo:unit, r=nox
Make css-properties.json checking a proper unit test.

<!-- 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/10855)
<!-- Reviewable:end -->
2016-04-28 07:16:57 -07:00
Simon Sapin
a3b271266c Make css-properties.json checking a proper unit test. 2016-04-28 15:41:30 +02:00
bors-servo
224bcd7057 Auto merge of #10880 - mbrubeck:char-at, r=nox
Code cleanup in gfx::text

* Fix deprecation warnings by replacing `str::char_at` and related functions with iterators.
* Replace some uses of `range::Range` with `std::ops::Range`.

<!-- 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/10880)
<!-- Reviewable:end -->
2016-04-28 05:01:24 -07:00
bors-servo
b8e2fa58d6 Auto merge of #10694 - fitzgen:profile-traces-to-file, r=SimonSapin
Add a method for dumping profiles as self-contained HTML w/ timeline visualization

This commit adds the `--profiler-trace-path` flag. When combined with `-p` to
enable profiling, it dumps a profile as a self-contained HTML file to the given
path. The profile visualizes the traced operations as a Gantt-chart style
timeline.

Example output HTML file: http://media.fitzgeraldnick.com/dumping-grounds/trace-reddit.html

Mostly I made this because I wanted to see what kind of data the profiler has, and thought that this might be useful for others as well. I'm happy to add tests if we can figure out how to integrate them into CI, but I'm not sure how that would work.

Thoughts?

<!-- 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/10694)
<!-- Reviewable:end -->
2016-04-28 02:47:35 -07:00
Keith Yeung
33acb1937c Remove extraneous script_chan parameter from Trusted::new 2016-04-28 10:52:44 +02:00
Nick Fitzgerald
9fbb5c720e Add a method for dumping self-contained HTML timeline profiles
This commit adds the `--profiler-trace-path` flag. When combined with `-p` to
enable profiling, it dumps a profile as a self-contained HTML file to the given
path. The profile visualizes the traced operations as a gant-chart style
timeline.
2016-04-27 18:35:17 -07:00
bors-servo
14de06aef0 Auto merge of #10871 - daoshengmu:canvasWithoutContexts, r=jdm
Fix issue #10755 Canvas without contexts

While canvas without contexts, we just need to return the function without drawing any pixel.

Fixes #10755.
<!-- 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/10871)
<!-- Reviewable:end -->
2016-04-27 16:40:43 -07:00
Daosheng Mu
b7e05b4a9d Avoid drawing while canvases without contexts. 2016-04-28 07:03:45 +08:00
Daniel Robertson
483f07c8f0
Cleanup CORSCache
Remove the CORSCache trait, CORSCacheSender, CORSCacheThreadMsg, and
CORSCacheThread. Rename BasicCORSCache to CORSCache and keep its old
implementation of CORSCache.
2016-04-27 17:02:54 -04:00
Daniel Robertson
153059c55c
Fix logic for cors cache match
The current logic for a cors cache match does not consider "credentials
is false and request's credentials mode is not "include" or credentials
is true."
2016-04-27 16:39:57 -04:00
Matt Brubeck
4d05bf23b8 Get rid of unnecessary clamping in text shaping 2016-04-27 10:58:16 -07:00
Matt Brubeck
83feda3ac2 Stop using deprecated str::char_* methods
Fixes deprecation warnings in the gfx crate.
2016-04-27 10:57:11 -07:00
bors-servo
311dd0f930 Auto merge of #10816 - SunyDays:errorevent_argument, r=frewsxcv
Implement the errorevent argument to Document::createEvent

new_uninitialized function on ErrorEvent has already been in components/script/dom/errorevent.rs

close #10738

<!-- 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/10816)
<!-- Reviewable:end -->
2016-04-27 10:52:41 -07:00
SunyDays
7d24426172 Implement the errorevent argument to Document::createEvent 2016-04-27 20:49:25 +03:00
Matt Brubeck
7e67bb788c Replace range::Range with std::ops::Range in text shaping code 2016-04-27 10:17:21 -07:00
bors-servo
daa1a2a0a8 Auto merge of #10647 - ConnorGBrewster:parse_xml, r=jdm
Finish hooking up XML parser

This is a work in progress PR for #10581. I just want to make sure I am headed in the right direction.

cc @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/10647)
<!-- Reviewable:end -->
2016-04-27 07:50:54 -07:00
Connor Brewster
3389c497c0 Finish hooking up XML parser
added script integration with xml5ever

Updated test expectations

Removed timeout test expectation

Refactors

application/xhtml+xml is treated as HTML

Updated xml5ever

Updated Text Expectations
2016-04-27 08:44:13 -06:00
bors-servo
88020e9151 Auto merge of #10869 - frewsxcv:dry, r=jdm
DRY out `StreamedResponse::from_http_response`.

<!-- 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/10869)
<!-- Reviewable:end -->
2016-04-27 04:23:34 -07:00
bors-servo
5fd93de7be Auto merge of #10866 - broesamle:issue10856-a, r=Ms2ger
Move abstract parser infrastructure from servohtmlparser.rs to parse

Fixes #10856

<!-- 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/10866)
<!-- Reviewable:end -->
2016-04-27 03:29:50 -07:00
bors-servo
e079e01320 Auto merge of #10848 - heycam:struct-accessor, r=bholley
Add Servo_GetStyleFoo functions to get style structs from GeckoComputedValues

r?@bholley

<!-- 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/10848)
<!-- Reviewable:end -->
2016-04-27 02:20:17 -07:00
Martin Broesamle
7c4489b193 Move abstract parser infrastructure from servohtmlparser.rs to parse 2016-04-27 10:32:59 +02:00
bors-servo
ad77d40360 Auto merge of #10868 - frewsxcv:loadcancelled, r=Ms2ger
Add `NetworkError::LoadCancelled` variant.

<!-- 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/10868)
<!-- Reviewable:end -->
2016-04-27 01:26:05 -07:00
bors-servo
21c1773115 Auto merge of #10838 - bd339:iss9551, r=KiChjang
Implement step 3 according to spec

Goes towards fixing #9551

<!-- 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/10838)
<!-- Reviewable:end -->
2016-04-27 00:16:08 -07:00
Cameron McCormack
88f51af3f8 Add Servo_GetStyleFoo functions to get style structs from GeckoComputedValues.
While we're here we also:

* remove any code conditional on style_struct.gecko_ffi_name, since all
  style structs now do have a corresponding Geckos struct

* add new UIReset and XUL style structs, so that all Gecko structs are
  now present (apart from Variables, which is special)
2016-04-27 17:13:26 +10:00
Akshit Khurana
4a3addb72f Return a Result<i64, ()> from do_parse_integer
Fixes #10860
2016-04-26 23:03:16 -07:00
bd339
ac88c5e16b Implement step 3 according to spec 2016-04-27 07:45:38 +02:00
Corey Farwell
87b54ef685 DRY out StreamedResponse::from_http_response. 2016-04-27 01:00:50 -04:00
Corey Farwell
2099b190bb Remove superfluous end-of-file whitespace. 2016-04-27 00:26:37 -04:00
Corey Farwell
55c2f93740 Add NetworkError::LoadCancelled variant. 2016-04-27 00:25:27 -04:00
bors-servo
959dbac0e7 Auto merge of #10862 - asajeffrey:only-the-chrome-survives, r=SimonSapin
Don't kill the root pipeline when randomly killing pipelines.

Useful for stress-testing the browser chrome, e.g. testing #10334.

<!-- 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/10862)
<!-- Reviewable:end -->
2016-04-26 18:40:21 -07:00
bors-servo
aa078a0780 Auto merge of #10820 - SunyDays:focusevent_argument, r=Ms2ger
Implement the "focusevent" argument to Document::createEvent

close #10739

<!-- 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/10820)
<!-- Reviewable:end -->
2016-04-26 17:50:51 -07:00
SunyDays
e4f3a31caf Implement the focusevent argument to Document::createEvent 2016-04-27 01:51:48 +03:00
bors-servo
2729864af7 Auto merge of #10857 - servo:toml, r=nox
Simplify TOML syntax

* Sections like `[dependencies.foo]` can be entries in a `[dependencies]` section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)` conditions instead of exact target triples: https://github.com/rust-lang/cargo/pull/2328

<!-- 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/10857)
<!-- Reviewable:end -->
2016-04-26 15:46:37 -07:00
Simon Sapin
83b3ebf6ac Simplify TOML syntax
* Sections like `[dependencies.foo]` can be entries in a `[dependencies]`
  section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)`
  conditions instead of exact target triples:
  https://github.com/rust-lang/cargo/pull/2328
2016-04-26 23:51:36 +02:00
bors-servo
caba731da1 Auto merge of #10847 - servo:rustup-20160424, r=nox
Update rustc.

<!-- 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/10847)
<!-- Reviewable:end -->
2016-04-26 14:41:54 -07:00
bors-servo
f773dc182b Auto merge of #10824 - asajeffrey:communicate-backtrace-on-panic, r=Manishearth
Communicate a backtrace to the constellation when panicking.

Send a representation of the backtrace from a pipeline thread to the constellation in the case of panic. This is the next step in communicating the backtrace to the browser chrome (#10334).

<!-- 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/10824)
<!-- Reviewable:end -->
2016-04-26 13:17:33 -07:00
Alan Jeffrey
2a52351de0 Don't kill the root pipeline when randomly killing pipelines. 2016-04-26 14:32:11 -05:00