Commit graph

250 commits

Author SHA1 Message Date
Guro Bokum
be2cb665de Start using on_refresh_driver_tick #5681
Final
2015-05-06 02:08:39 +07:00
Ms2ger
1303dd6e2e Require documentation in script_traits. 2015-04-30 20:48:21 +02:00
Prabhjyot Singh Sodhi
b980278d90 Uniformise the various Msg types [#5882] 2015-04-30 01:22:16 +05:30
James Graham
c2fc6e311a Add script execution support via WebDriver 2015-04-23 16:14:27 +01: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
Glenn Watson
18d465bcd2 Support focus management and keyboard events for iframes. 2015-04-20 07:52:22 +10:00
Gilles Leblanc
ba36a108c1 Split out shared networking code into net_traits crate
Fixes #4476
2015-04-03 13:38:10 -04:00
Ms2ger
eefb0773a0 Remove the unsafe impl Send for ConstellationControlMsg.
This impl made it possible to put raw pointers in ConstellationControlMsg and
send them across threads without considering the consequences.

This required making SmallVec1<T> Send if T is Send.
2015-04-03 13:32:51 +02:00
Ms2ger
6b127a8df8 Introduce a MouseButton enum. 2015-04-03 01:24:33 +02:00
Ms2ger
54c006d159 Use u32 for reflow ids. 2015-03-28 15:36:36 +01:00
Avi Weinstock
cb9cfe2b22 Replace (String, Option<String>) with MozBrowserEvent in uses of MozBrowserEventMsg. 2015-03-25 17:07:59 -04:00
Glenn Watson
06a79243a7 Ensures that iframe navigation updates the parent iframe element subpage id.
This fixes the case of clicking a link in an iframe, going back, then clicking the link again.
2015-03-24 10:14:49 +10:00
Glenn Watson
bf9b8f7050 Experimental implementation of (a small subset of) mozbrowser APIs. 2015-03-23 13:26:55 +10:00
Simon Sapin
6a58cbd118 Fix more warnings everywhere. 2015-03-18 22:11:20 +01:00
Ms2ger
5f15eb5fbf Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev. 2015-03-18 13:18:31 -04:00
Glenn Watson
939a89568e First part of refactoring constellation to support iframe navigation.
The history is now recorded per frame, but needs to be exposed in a followup PR.

Also fixes a race condition that occurs loading iframes under heavy CPU load.

This ensures that iframes never do a reflow / layout until they have a valid
window size set from their parent frame.
2015-03-17 09:35:41 +10:00
Josh Matthews
d9f04180a5 Split page load into separate network and parsing stages. Delay Page creation until the load is finished. Make session history traversal simply activate existing pipelines, rather than potentially loading them from the network. 2015-03-03 16:25:40 -05:00
bors-servo
a3ea3eed47 auto merge of #4960 : pkondzior/servo/add-script-timers-suspend-resume-functionality, r=jdm
Adds free/thaw methods to script_task that let you send suspend/resume messages to web content timers. Fixes #4907
2015-02-23 21:45:46 -07:00
Pawel Kondzior
c2961c94b4 Add thaw/freeze messages that can suspend/resume webcontent timers #4907 2015-02-24 05:33:27 +01:00
Ms2ger
b6483c96be Move layout to libc from crates.io. 2015-02-19 21:38:25 +01:00
Ms2ger
aaed4a54c7 Use rustc-serialize rather than the built-in deprecated serialize. 2015-02-17 13:24:15 +01:00
Ms2ger
58180fa4f7 Fix warnings in script_traits. 2015-02-13 11:08:14 +01:00
Ms2ger
a09a912178 Import net as net rather than servo_net. 2015-02-10 12:55:24 +01:00
Ms2ger
b2fcc2397e Import msg as msg rather than servo_msg. 2015-02-10 11:40:36 +01:00
Josh Matthews
446f0f447e Allow unused variables, imports, and mutable. 2015-02-09 17:41:57 -05:00
Glenn Watson
1e0e98b63c Implement window.frameElement, change window.parent to make use of it. 2015-02-07 06:46:29 +10:00
Glenn Watson
0873e5c8ca Implement window.parent for iframes. 2015-02-05 07:04:04 +10:00
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Ms2ger
2026cbada2 Fix various build warnings. 2015-01-28 20:42:39 +01:00
Manish Goregaokar
b8fb725af2 raw_pointer_deriving -> raw_pointer_derive 2015-01-28 13:54:18 +05:30
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Josh Matthews
d2f0aac5ce Make UntrustedNodeAddress a newtype.
This will allow us to make it Send after the Rust upgrade.
2015-01-24 11:40:21 +01:00
Matthew Rasmus
a3fc3a1581 Allow missing_copy_implementations 2015-01-08 08:51:11 -08:00
Ms2ger
6e027cda2d Rename the ConstellationControlMsg variants. 2015-01-04 19:01:13 +01:00
Ms2ger
fbf257f878 Remove obsolete attributes. 2015-01-03 10:06:17 +01:00
Martin Robinson
c0b397322f Stall PaintTask exit until it can release all buffers
It is possible for a PaintTask to start exiting soon after sending new
buffers to the compositor. In that case, the compositor should return
the now unnecessary buffers to the PaintTask so that it can properly
free them.

To accomplish this, the compositor now keeps a hash map of paint task
channels per pipeline id. When a PaintTask exists, the constellation
informs the compositor that it can forget about it. Additionally, the
PaintTask should not wait for any buffers when the engine is doing a
complete shutdown. In that case, the compositor is already halted and
has simply let all buffers leak. We pipe through the shutdown type when
destroying the pipeline to make this decision.

Fixes #2641.
2015-01-02 15:20:32 -08:00
Patrick Walton
8b2aadc30b ports/cef: Implement accelerated compositing for the CEF port. 2014-12-10 08:35:47 -08:00
nkdalmia
f6fb9f862d Implement Window.sessionStorage: Storage Task, Storage Methods (excluding Storage event, QuotaExceededError) 2014-12-03 18:31:50 -05:00
Josh Matthews
329ba56fca Dispatch keydown, keyup, and keypress events at appropriate times. 2014-11-13 11:27:15 -05:00
Josh Matthews
1c64dabb15 Pass all key events to the current constellation frame. 2014-11-13 11:24:14 -05:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Martin Robinson
c7327450ef Clip display list based on frame viewport
Instead of creating a display list for the entire page, only create one
for an area that expands around the viewport. On my machine this makes
incremental layout of http://timecube.com 50% faster.
2014-11-11 08:46:16 -08:00
Patrick Walton
10f7b49cf7 Invert control flow, fix resizing, and improve checkerboarding
significantly by giving tiles some time to paint before we render
unrendered content.
2014-11-04 13:51:56 -08:00
bors-servo
2f9808e130 auto merge of #3626 : Manishearth/servo/form-prep, r=jdm
Framework for form submission
2014-10-09 16:00:34 -06:00
Clark Gaebel
d12c6e7383 Incremental Style Recalc
This patch puts in the initial framework for incremental reflow. Nodes' styles
are no longer recalculated unless the node has changed.

I've been hacking on the general problem of incremental reflow for the past
couple weeks, and I've yet to get a full implementation that actually passes all
the reftests + wikipedia + cnn. Therefore, I'm going to try to land the different
parts of it one by one.

This patch only does incremental style recalc, without incremental flow
construction, inline-size bubbling, reflow, or display lists. Those will be coming
in that order as I finish them.

At least with this strategy, I can land a working version of incremental reflow,
even if not yet complete.

r? @pcwalton
2014-10-09 12:55:21 -04:00
Manish Goregaokar
ad16c52a6b Allow passing a method, request body, and headers to the pipeline in LoadUrlMsg 2014-10-09 14:09:29 +05:30
Keegan McAllister
a640a7c5c3 Upgrade to rustc 0.12.0-pre (4d2af3861 2014-09-17 15:51:11 +0000) 2014-09-20 13:00:06 -07:00
Josh Matthews
f0f7e98dfa Dump initial prototype of devtools server into the build. Expect lies if you try to use it for anything real. 2014-09-18 15:06:40 -04:00
Jack Moffitt
e10206e91e Reinstate errors for unused variables and imports. 2014-09-13 23:38:00 -06:00
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00
Renamed from src/components/script_traits/script_traits.rs (Browse further)