Commit graph

293 commits

Author SHA1 Message Date
bors-servo
dd319c1a99 Auto merge of #5727 - jdm:parserinterrupt2, r=mbrubeck
...r parsing. Hook up document loading to async networking events.

Relies on https://github.com/servo/html5ever/pull/107, so we'll likely need to backport it rather than wait for the next rustc upgrade.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5727)
<!-- Reviewable:end -->
2015-05-21 12:37:06 -05:00
Patrick Walton
7e7675c1dc net: Don't load the placeholder image for background images, only for
image fragments.

This also changes the way the placeholder is handled in the image cache
task to decode it up front instead of each time an image fails to load,
both because it was more convenient to implement that way and because
it saves CPU cycles to do so.

This matches the behavior of Gecko and WebKit. It improves the look of
our cached copy of Wikipedia.
2015-05-20 12:00:33 -07:00
Josh Matthews
8082df7d0d Make external script sources load asynchronously, yet still block further parsing. Hook up document loading to async networking events. 2015-05-20 14:22:09 -04:00
Glenn Watson
41c243e853 Add closed pipelines record as a debugging aid 2015-05-20 09:22:08 +10:00
Glenn Watson
23b18a8417 Handle case where a page fetch completes after pipeline exits. 2015-05-20 07:55:22 +10:00
Glenn Watson
decfb0da6e Address review comments 2015-05-20 07:10:55 +10:00
Glenn Watson
35a570ab66 Fix several hangs / panics during pipeline cleanup of in progress loads.
This fixes a hang found while testing the jQuery test suite.
2015-05-19 16:14:25 +10:00
James Graham
8d10fa1f2d Add basic support for executeAsyncScript.
This relies on a global webdriverCallback function, which is visible to content.
Obviously that's not a long term solution for a number of reasons, but it allows
us to experiment for now
2015-05-14 10:59:17 +01:00
James Graham
28ac0abf6a Make WebDriver Get() command wait on pages loading before returning.
This makes using WebDriver significantly less racy. Also
refactors the message structure a little
2015-05-14 10:59:10 +01:00
Glenn Watson
2b3737d34e Various fixes for cleaning up iframes, compositor layers, pipelines and threads.
This allows most of the jquery test suite to run without exhausting thread resources.
2015-05-14 11:42:54 +10:00
Glenn Watson
eec3fad93d Fixes a number of race conditions and reliability issues with reftests and compositor.
The basic idea is it's safe to output an image for reftest by testing:
 - That the compositor doesn't have any animations active.
 - That the compositor is not waiting on any outstanding paint messages to arrive.
 - That the script tasks are "idle" and therefore won't cause reflow.
    - This currently means page loaded, onload fired, reftest-wait not active, first reflow triggered.
    - It could easily be expanded to handle pending timers etc.
 - That the "epoch" that the layout tasks have last laid out after script went idle, is reflected by the compositor in all visible layers for that pipeline.
2015-05-14 09:35:53 +10:00
bors-servo
2baa69595e Auto merge of #5804 - jdm:docloader, r=Ms2ger
This implements a simple load-tracking system and tracks stylesheet loads as an example of how it fits together. This is a simplified and rebased version of #3714; I do not believe that the main thrust of hsivonen's comments (related to tracking navigation in browsing contexts) affect this part of the work. 

r? @Ms2ger

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5804)
<!-- Reviewable:end -->
2015-05-11 14:35:33 -05:00
Josh Matthews
a1ae53a230 Delay stylesheet load in test to increase confidence. 2015-05-11 15:35:10 -04:00
Josh Matthews
f3cdba6b8b Make link elements fire a load event. 2015-05-11 13:41:52 -04:00
Josh Matthews
32a89c9455 Make stylesheets block page load. 2015-05-11 13:41:52 -04:00
Josh Matthews
7f0706ed42 Implement a DocumentLoader type that tracks pending loads and notifies the script task when the queue is empty. Dispatch the document load event based on the DocumentLoader's notification. 2015-05-11 13:41:51 -04:00
James Graham
6e639de664 Add support for getActiveElement webdriver command 2015-05-11 17:31:23 +01:00
bors-servo
8df824998f Auto merge of #5969 - jgraham:webdriver_select_css, r=jdm
Also adds example support for getting the name and text properties of the elements.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5969)
<!-- Reviewable:end -->
2015-05-11 09:57:02 -05:00
Ms2ger
cfe240d117 Remove reference counting from the Runtime implementation. 2015-05-10 18:09:09 +02:00
Ms2ger
4ed94629a2 Use Runtime in Window. 2015-05-10 17:16:15 +02:00
Ms2ger
076d15992a Update js. 2015-05-10 15:58:07 +02:00
James Graham
9e44206760 Add WebDriver support for getting elements by selector.
Also adds example support for getting the name and text properties of the elements.
2015-05-08 22:25:37 +01:00
Patrick Walton
be8a5a2939 layout: Don't rerun selector matching unless we need to when resizing
the window.
2015-05-07 15:48:14 -07:00
James Graham
5311d9ab59 Support WebDriver takeScreenshot command.
This adds support for compositing to a PNG without actually quiting
the browser.
2015-05-07 09:56:15 +01:00
James Graham
1576107c45 Implement webdriver commands for back/forward/title/handles. 2015-05-06 12:22:10 +01:00
bors-servo
5e59e77c41 Auto merge of #5753 - JIoJIaJIu:timeline, r=jdm
RequestAnimationFrame
[Task](https://github.com/servo/servo/issues/5681)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5753)
<!-- Reviewable:end -->
2015-05-06 00:50:13 -05:00
bors-servo
1721cf45ed Auto merge of #5951 - SimonSapin:au-cleanup, r=mbrubeck
Fix #5943.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5951)
<!-- Reviewable:end -->
2015-05-05 15:08:12 -05:00
Guro Bokum
be2cb665de Start using on_refresh_driver_tick #5681
Final
2015-05-06 02:08:39 +07:00
Himaja
01eb31ae8a 1. Add an Option<Pipeline_id> field to the LoadData struct, and a corresponding parameter to LoadData::new()
2. Change addEvent in the NetworkEventActor to add_request and add_response
2015-05-05 12:31:40 -04:00
Simon Sapin
8b522f2e7d Rename Au methods with f32/f64 instead of frac32/frac/subpx 2015-05-05 18:23:29 +02:00
Simon Sapin
32d5e24922 Replace Au-related free functions in util::geometry with Au methods. 2015-05-05 17:36:03 +02:00
Simon Sapin
ef8edd4e87 Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
Philip Munksgaard
fe1a334b11 Remove FIXME
Following the (short) in #5930 it was decided that we should remove this
FIXME.

Fixes #5930
2015-05-04 15:38:38 +02:00
bors-servo
88ed4e58e1 Auto merge of #5725 - pgonda:dispatch-mousedown-mouseup, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5725)
<!-- Reviewable:end -->
2015-04-30 12:22:03 -05:00
Peter
c069d1753e added dispatching for mousedown and mouseup events, fixes #5705 2015-04-29 21:32:18 -04:00
Prabhjyot Singh Sodhi
b980278d90 Uniformise the various Msg types [#5882] 2015-04-30 01:22:16 +05:30
Ms2ger
903305416a Implement Clone for Copy types. 2015-04-28 23:31:10 +02:00
Anthony Ramine
7197052c0d Uniformise root() methods
They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable
and ResultRootable.
2015-04-28 09:22:45 +02:00
Manish Goregaokar
369a568264 Make RootedVec/RootCollection #[no_move]; improve code (fixes #5737) 2015-04-28 04:35:58 +05:30
Manish Goregaokar
dcb0a0eab6 Fix some no_move errors 2015-04-28 04:20:45 +05:30
Ms2ger
5fd753fda2 Factor out a handle_parsing_complete function from ScriptTask::Load. 2015-04-27 13:18:56 +02:00
James Graham
c2fc6e311a Add script execution support via WebDriver 2015-04-23 16:14:27 +01:00
bors-servo
43d666f94b Auto merge of #5802 - mmatyas:indentfix, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5802)
<!-- Reviewable:end -->
2015-04-22 19:49:30 -05:00
Glenn Watson
d8aef7208e Refactored image cache task - details below.
* Simpler image cache API for clients to use.
 * Significantly fewer threads.
   * One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
   * 4 threads for decoder worker tasks.
 * Removed ReflowEvent hacks in script and layout tasks.
   * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
   * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
 * Add reflow batching for when multiple images load quickly.
   * Reduces the number of paints loading wikipedia from ~95 to ~35.
 * Reasonably simple to add proper prefetch support in a follow up PR.
 * Async loaded images always construct Image fragments now, instead of generic.
   * Image fragments support the image not being present.
 * Simpler implementation of synchronous image loading for reftests.
 * Removed image holder.
 * image.onload support.
 * image NaturalWidth and NaturalHeight support.
 * Updated WPT expectations.
2015-04-23 09:40:24 +10:00
Mátyás Mustoha
91b4246e1b Fix some irregular indentation. 2015-04-22 21:57:58 +02:00
Ms2ger
04b532e1fb Store a Runtime object in ScriptTask. 2015-04-22 11:17:09 +02:00
Ms2ger
cd7ec9912e Make ScriptTask::js_context immutable.
Since we drop the ScriptTask almost immediately after clearing the field,
there's little reason to do it manually.
2015-04-20 20:16:55 +02:00
Glenn Watson
18d465bcd2 Support focus management and keyboard events for iframes. 2015-04-20 07:52:22 +10:00
Bogdan Cuza
e0724ec9a9 Make mouse_over_targets a RootedVec 2015-04-18 15:54:25 +03:00
Josh Matthews
d0704d1797 Documentation. 2015-04-16 11:46:42 -04:00