Commit graph

177 commits

Author SHA1 Message Date
Glenn Watson
0873e5c8ca Implement window.parent for iframes. 2015-02-05 07:04:04 +10:00
bors-servo
58a3cdcbef auto merge of #4822 : KiChjang/servo/constellation-frame-handling, r=jdm
Attempt at fixing #4795. Code has been written to check for the existence for the current frame, but it seems to pass the condition every time.
2015-02-04 10:06:56 -07:00
Keith Yeung
37cb876f4e Changed Msg::KeyEvent to take in KeyState and moved the checks in CompositorTask::send_key_event to Compositor::handle_browser_message 2015-02-04 10:30:23 +08:00
Adenilson Cavalcanti
ffa23088ff Using the new transparent_black() in the proper places. 2015-02-03 18:08:30 -08:00
Keith Yeung
b262fc16e0 Modified constellation key event handler to deal with missing frames 2015-02-04 00:04:12 +08:00
Adenilson Cavalcanti
10418a0ea1 Using color helpers in Compositor and PaintContext
(plus added TODO related to equality operators).
2015-02-02 14:49:26 -08:00
Glenn Watson
f495884dcb Remove the glfw port (it doesn't compile since last rustup anyway). 2015-02-02 10:38:12 +10:00
Josh Matthews
9e01d91947 Lock crates.io dependencies to specific versions. 2015-01-31 01:27:26 +01: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
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Ms2ger
808315926c Pass a String to spawn_named.
IntoString has been removed from Rust, and named() will take a String, so
there is no good reason to do otherwise here.
2015-01-21 11:23:19 +01:00
Glenn Watson
797658fb3a Fix change of src attributes on iframe (prevents SetLayerOrigin crash). 2015-01-20 15:38:58 +10:00
Martin Robinson
0d297aea9b Fix set_ids naming in Constellation
The set_ids name is a holdover from a previous design and no longer
reflects what this method does. Instead move the content into
grant_paint_permission and rename it to
send_frame_tree_and_grant_paint_permission. Also move out the handling of
evicted iframes into its own method.
2015-01-19 11:30:04 -08:00
Martin Robinson
c3d23a0630 Update to latest rust-azure and rust-layers
We no longer need to implement from_azure_surface in Servo, now that
rust-layers is handling more of the glue between rust-layers and Azure.
2015-01-15 12:59:11 -08:00
Martin Robinson
efdc758dd7 Only send SetLayerRect messages for compositor-backed frames
Only send SetLayerRect when we know that a frame has a compositor
layer. If it doesn't, we wait until we send the new layer to the
compositor.
2015-01-09 16:20:09 -08:00
Martin Robinson
19f57008da Notify compositor when a FrameTree changes pipelines
When the constellation change a FrameTree pipeline, it should send a
notification to the compositor, so that it can negotiate buffers from
the correct render task. This commit also migrates away from the
generalized FrameTreeUpdateMsg to ones specific to the situation at
hand. That turned out to be an unnecessary abstraction.
2015-01-09 16:20:04 -08:00
Martin Robinson
f1d82cf82c Add FrameTree::add_child
This helper method simplifies a few lines.
2015-01-09 15:14:01 -08:00
Martin Robinson
6a46eef5cd Update FrameTree pipelines when appropriate
Instead of simply creating a new FrameTree when an iframe starts a
load, update the existing FrameTree's pipeline. This prevents the
FrameTree from accumulating many extra children.
2015-01-09 15:14:01 -08:00
bors-servo
c1d218cf02 auto merge of #4578 : mrobinson/servo/fix-compositor-timing-issues, r=larsbergstrom
Clean up compositor data structures and fix timing issues that cause Compositor panics.
2015-01-09 15:39:44 -07:00
Martin Robinson
b60f354405 Store pipelines in the Compositor
Instead of cloning pipelines and storing them once per layer, store
them globally in the compositor and access them via id. This trades
lots of unnecessary duplication for a HashMap lookup.
2015-01-09 14:33:59 -08:00
Martin Robinson
c5994c65ef Be less stringent with invalid compositor messages
It is possible for messages for defunct pipelines to arrive in the
compositor. If the compositor believes that the pipelines are in the
process of shutting down, simply ignore the messages. We still panic in
the case that the pipeline is totally unknown.

Fixes #3733.
2015-01-09 14:33:58 -08:00
bors-servo
0793137631 auto merge of #4575 : mttr/servo/warnings, r=jdm
Notes:

* This adds `#![allow(missing_copy_implementations)]` to components/*/lib.rs. I'm not sure how to approach the missing Copy warnings (are there things for which Copy should NOT be implemented, and how can I tell?) so I stuck this in to make life easier when looking through the warnings. I can easily remove this if necessary. 
* This leaves the following type of warnings, which I couldn't figure out how to approach (I'll investigate it later if no one else wants to).
```
css/matching.rs:72:23: 72:35 warning: use of deprecated item: Use overloaded core::cmp::PartialEq, #[warn(deprecated)] on by default
css/matching.rs:72         this_as_query.equiv(other)
                                         ^~~~~~~~~~~~
css/matching.rs:95:10: 95:49 warning: use of deprecated item: Use overloaded core::cmp::PartialEq, #[warn(deprecated)] on by default
css/matching.rs:95 impl<'a> Equiv<ApplicableDeclarationsCacheEntry> for ApplicableDeclarationsCacheQuery<'a> {
```
2015-01-08 16:03:55 -07:00
bors-servo
4cd9eb1253 auto merge of #4574 : Ms2ger/servo/if_let, r=Manishearth
This feature is now supported unconditionally.
2015-01-08 14:42:53 -07:00
Martin Robinson
d93b80608f Combine all pipeline status trackers into a single struct
This will make it easier to organize and clean up this information
during pipeline shutdown.
2015-01-08 12:11:21 -08:00
bors-servo
1458709247 auto merge of #4558 : mrobinson/servo/compositor-message-renames, r=zwarich
These names no longer reflect what the messages do, so rename them to
SetFrameTree, AssignPaintedBuffers, and CreateOrUpdateBaseLayer.
2015-01-08 12:36:53 -07:00
Matthew Rasmus
a3fc3a1581 Allow missing_copy_implementations 2015-01-08 08:51:11 -08:00
Ms2ger
5f31da82bd Remove if_let feature gates.
This feature is now supported unconditionally.
2015-01-08 17:26:06 +01:00
Ms2ger
16c7060bc8 Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19. 2015-01-08 09:58:46 -05:00
Martin Robinson
9ac759ed80 Fix root layer naming in the compositor
The term "root layer" is used in the compositor to refer to both the
pipeline root layer and the page background layer. This can be quite
confusing. Instead, call the page background layer the "base layer,"
which is always the first child of the pipeline root layer.
2015-01-06 15:40:42 -08:00
Martin Robinson
ad751e4926 Rename Compositor messages SetIds and Paint
These names no longer reflect what the messages do, so rename them to
SetFrameTree and AssignPaintedBuffers.
2015-01-06 07:23:26 -08:00
Ms2ger
be683a0888 Rename MouseWindowEvent variants. 2015-01-05 12:08:16 +01:00
Patrick Walton
5ea2c6dcfd layout: Paint stacking contexts' overflow areas properly.
This was making `box-shadow` not show up in many cases, in particular,
but the effects were not limited to that.
2015-01-04 17:41:59 -08:00
Ms2ger
6e027cda2d Rename the ConstellationControlMsg variants. 2015-01-04 19:01:13 +01:00
Ms2ger
04eb923da9 Remove dependencies on the native crate. 2015-01-04 16:28:02 +01:00
Ms2ger
138081ba25 Rename the PaintState variants. 2015-01-04 11:59:49 +01:00
Ms2ger
4d47817bae Rename TimeProfilerCategory variants. 2015-01-04 11:59:23 +01:00
Ms2ger
de0caf8761 Rename constellation_msg::Msg variants. 2015-01-04 11:59:21 +01:00
Ms2ger
d5cc791d31 Rename paint_task::Msg variants. 2015-01-04 11:06:07 +01:00
bors-servo
e8fac3681b auto merge of #4535 : servo/servo/pre-rustup_20141221, r=jdm
This prepares for the rust upgrade currently being conducted.
2015-01-03 14:39:46 -07: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
Ms2ger
b51e83819d Fix obsolete format traits.
They are to be removed from the language in the next rust upgrade.
2015-01-02 19:04:18 +01:00
Matt Brubeck
8dd1a363cb Update layer bounds on resize
This fixes a bug where fixed-position layers are not repositioned when the
window is resized.
2014-12-18 07:02:14 -08:00
Simon Sapin
084a63df45 Remove usage of the deprecated std::num::Zero trait. 2014-12-18 11:16:47 +00:00
Patrick Walton
7371e0b8e3 compositing: Implement cursor per CSS3-UI § 8.1.1 in the CEF/Mac port.
I'm not sure how we want to handle Linux cursors, and GLFW has no
ability to set cursors (short of disabling it and managing it yourself).
2014-12-17 22:58:52 -08:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
Patrick Walton
fa1e06e7ce compositing: Translate clip rects into the coordinate systems of child
layers when doing hit tests.

Fixes clicking on links on the second page of Hacker News.
2014-12-12 16:58:25 -08:00
Nathan E. Egge
b0552cb98e Sending key events through script task before processing them in the compositor.
Fixes #4163
2014-12-12 12:31:44 -05:00
Joseph Crail
c254d195ad Fix spelling mistakes in comments. 2014-12-11 23:56:29 -05:00
Martin Robinson
14bfa45105 Hit test against clipped layer boundaries
When finding the layer under a point, take into account clipping
rectangles defined by layers that mask to bounds. This prevents clicks
from being hijacked by masked layers.
2014-12-11 13:18:21 +01:00