Commit graph

6066 commits

Author SHA1 Message Date
Bryan Bell
0c9f469f64 Restructure compositor layers to work with iframes
When a frame is selected via set_ids, a tree of root compositor
layers is also created, matching the tree of pipelines in the frame.
This decouples the chronological ordering dependency for parent frames
and child iframes sending CreateOrUpdateRootLayer &
CreateOrUpdateDescendentLayer messages.

Change the Compositor ready and render states to per pipeline.
This ensures the compositor doesn't composite for an epoch until
every *pipeline* in the epoch is finished rendering.

For iframes it fixes a bug where the compositor didnt wait on the
child pipeline ready state before compositing the window.

Gotchas:
* layout task or script task failure on exit ("task '' failed at sending
  on a closed channel"), this happens if the child iframe shares the
  same script task as the parent and can be avoided by adding the
  sandbox attribute to the iframe.

Other changes:
* Inline set_clipping_rect in compositor.rs
* Commented out ref test simple_iframe.html fails on os x
2014-07-19 10:46:11 -07:00
Manish Goregaokar
cf7e9c1a3b Check for worker scope in responseText setter 2014-07-19 21:32:03 +05:30
Bryan Bell
12a2cde8a5 Modify borders ref test to work on OS X
Issue https://github.com/mozilla/servo/issues/2848 has details.
This commit uncomments the borders ref test in basic.list
and modifies the test to work with viewports up to 4096px wide.

Also as a workaround change the html element background to white,
otherwise pixel (0,0) is black (it should be white since the border
at pixel (0, 0) is white. The bug is mostly likely a regression
in rust-layers.
2014-07-19 05:37:43 -07:00
Cameron Zwarich
ca96821902 Merge pull request #2870 from mrobinson/more-cleanup
Update to reflect rust-layers changes
2014-07-18 23:48:45 -07:00
Martin Robinson
072a2768e8 Update to reflect rust-layers changes
It is no longer necessary to flush pending buffer requests when adding
buffers nor to manually create textures for layers.
2014-07-18 19:32:49 -07:00
Matt Brubeck
d43db3df30 Merge pull request #2863 from mbrubeck/2862-null-fun
Don't fail on invalid JS syntax in event handlers. r=Ms2ger
2014-07-18 15:40:10 -07:00
Patrick Walton
45379a6a61 Merge pull request #2869 from SimonSapin/writing-modes-rebase
Convert layout code to use logical directions (rebase)
2014-07-18 13:27:23 -07:00
Simon Sapin
1807c29f3e Convert layout code to use logical directions. 2014-07-18 19:41:35 +01:00
Simon Sapin
94b630e2ed Mark as expected failure a reftest that uses 'direction'.
That property is behind the new --experimental flag.
2014-07-18 19:35:01 +01:00
Simon Sapin
bc2aa8430b Move CSS Writing Modes properties behind a new command-line flag. 2014-07-18 19:35:01 +01:00
Matt Brubeck
d20b216e31 Don't fail on invalid JS syntax in event handlers.
Fixes #2862.
2014-07-18 11:05:35 -07:00
Ms2ger
7f6bd1707e Merge pull request #2867 from Ms2ger/postMessage
Implement Worker.postMessage; r=larsberg
2014-07-18 16:06:04 +02:00
Lars Bergstrom
0f9df7b616 Merge pull request #2866 from glennw/pg-scroll
Add PgUp/PgDn scrolling support.
2014-07-18 06:30:39 -05:00
Ms2ger
5b6aef3d9c Implement Worker.postMessage. 2014-07-18 13:25:36 +02:00
Ms2ger
07a89a06c9 Implement MessageEvent::dispatch.
This avoids duplicating the dispatching code for multiple postMessage
implementations.
2014-07-18 13:24:27 +02:00
Patrick Walton
aa43c1493a Merge pull request #2865 from glennw/wiki-layout-2
Fix issue with auto table layout when cells have multiple fragments. Fix...
2014-07-17 20:32:12 -07:00
Glenn Watson
3ddf2036ab Add PgUp/PgDn scrolling support. 2014-07-18 12:53:33 +10:00
Glenn Watson
049b99cfac Fix issue with auto table layout when cells have multiple fragments. Fixes some layout issues related to #2554. 2014-07-18 12:11:03 +10:00
glennw
c3e6d956ff Merge pull request #2844 from glennw/atom-element
Convert element name to be stored as atom instead of string.
2014-07-18 10:13:24 +10:00
Lars Bergstrom
2934c5a89d Merge pull request #2864 from zmike/embedding-iscool_jpg
use a more appropriate embedding url
2014-07-17 16:51:40 -05:00
Mike Blumenkrantz
0e230691b4 use a more appropriate embedding url 2014-07-17 16:48:24 -04:00
Ms2ger
c85f6db17b Merge pull request #2861 from Ms2ger/xhr-worker
Support XMLHttpRequest in workers: r=larsbergstrom
2014-07-17 18:55:50 +02:00
Ms2ger
ed946a747d Store the ScriptChan in the WorkerGlobalScope.
This is necessary to make XMLHttpRequest and postMessage work.
2014-07-17 18:02:55 +02:00
Ms2ger
68cb00a32f Store the worker's URL in the WorkerGlobalScope.
This will be necessary to resolve relative URLs in the worker.
2014-07-17 18:02:07 +02:00
Ms2ger
9fd67a751f Implement a resource_task getter on GlobalRef.
This is needed to fetch resources on all threads.
2014-07-17 16:22:52 +02:00
Ms2ger
e22c8f9290 Store the ResourceTask on the WorkerGlobalScope.
This is necessary to load dependent resources, such as through new Worker(),
importScripts, XHR, ...
2014-07-17 16:06:22 +02:00
Ms2ger
31376a6a79 Inline DedicatedWorkerGlobalScope::init.
This was an unnecessary abstraction.
2014-07-17 15:45:32 +02:00
Ms2ger
603c0b889a Move the code to start the worker into DedicatedWorkerGlobalScope::run_worker_scope.
This is somewhat cleaner than keeping it all in the Worker constructor.
2014-07-17 15:34:09 +02:00
Edit Balint
90adcc6265 Improve snapshot storage system for easy bisection. Fix #2694. Fix #2851. 2014-07-17 13:26:42 +01:00
Ms2ger
a3127593c2 Merge pull request #2842 from Ms2ger/workers
Basic Web Workers; r=Manishearth,larsbergstrom
2014-07-17 14:16:40 +02:00
Lars Bergstrom
8da1abf776 Merge pull request #2812 from Ms2ger/deny-unused-variable
Deny unused variables.
2014-07-17 07:09:55 -05:00
Ms2ger
33a7fe4f7e Deny unused variables. 2014-07-17 12:06:47 +02:00
Ms2ger
ca2a5f150d Add a spec link for the Worker constructor. 2014-07-17 11:50:04 +02:00
Ms2ger
9524f8daa7 Explicitly spawn a native task for workers. 2014-07-17 11:49:11 +02:00
Patrick Walton
bfde6ac0a7 Merge pull request #2859 from glennw/wiki-layout-1
Partial fix for footer layout issues on wikipedia, ref #2554.
2014-07-16 22:16:13 -07:00
Glenn Watson
3f010907ad Partial fix for footer layout issues on wikipedia, ref #2554. 2014-07-17 14:30:29 +10:00
Cameron Zwarich
49d2bd741d Merge pull request #2858 from zwarich/scene-new
Rename Scene constructor to Scene::new
2014-07-16 20:38:22 -07:00
Cameron Zwarich
f073d28c75 Rename Scene constructor to Scene::new 2014-07-16 16:57:44 -07:00
Cameron Zwarich
27e87e58be Merge pull request #2856 from mrobinson/tile-cleanup
Changes reflecting the latest version of rust-layers
2014-07-16 16:09:44 -07:00
Glenn Watson
560e380767 Fix comments and variable names for atom wrapper. 2014-07-17 08:31:31 +10:00
Martin Robinson
4d6613c72e Changes reflecting the latest version of rust-layers
The Tile trait has been removed and TileGrid now keeps Tile structs with
Textures embedded instead of simply buffers. rust-layers now creates
its own textures instead of relying on Servo to do it.
2014-07-16 15:04:46 -07:00
Lars Bergstrom
718ddde1f8 Merge pull request #2845 from glennw/update-cg
Update submodule pointer for core-graphics
2014-07-16 10:05:57 -05:00
Ms2ger
39d2c0cb2c Merge pull request #2835 from brunoabinader/bind_to_tree_fix
Added 'parent is/was in tree' param to bind_to_tree/unbind_from_tree; r=Ms2ger
2014-07-16 15:55:36 +02:00
Manish Goregaokar
b70053006e Merge pull request #2852 from Ms2ger/MessageEvent
Implement MessageEvent.
2014-07-16 18:55:50 +05:30
Bruno de Oliveira Abinader
113bc48d6e Use tree_in_doc on Style elem to parse its own CSS, if needed 2014-07-16 09:03:30 -04:00
Bruno de Oliveira Abinader
aea4ccf849 Added 'parent is/was in tree' param to bind_to_tree/unbind_from_tree
According to a talk with Ms2ger, both bind_to_tree / unbind_from_tree
should be called regardless if the tree is part of a Document. This
information is now passed as a parameter to their respective virtual
methods.
2014-07-16 08:59:56 -04:00
Ms2ger
d40b97ea73 Implement MessageEvent. 2014-07-16 14:53:22 +02:00
Ms2ger
c40ad756e6 Create Worker objects. 2014-07-16 11:54:05 +02:00
Edit Balint
0b5a1b2ad9 Move timer firing implemention into Window #1992 2014-07-16 11:36:18 +02:00
Ms2ger
1fbf9f7749 Implement WorkerGlobalScope.self. 2014-07-16 11:26:50 +02:00