Commit graph

94 commits

Author SHA1 Message Date
Glenn Watson
3befc8ce0b Make change page url message consistent with other compositor messages.
This doesn't have any effect on functionality, it just simplifies a few upcoming changes with how FrameIds work.
2015-03-11 08:54:36 +10:00
Josh Matthews
6351fc75fd Only store the url inside a pipeline instead of the rest of the LoadData. 2015-03-03 16:25:40 -05:00
bors-servo
6927bf6ff0 auto merge of #5113 : glennw/servo/fix-title, r=mbrubeck
Sometimes, the root pipeline title is sent before the compositor has created the root pipeline, so also request the main page title once the initial frame tree has been sent.
2015-03-02 17:24:56 -07:00
Glenn Watson
f68386f0fa Fix making an iframe visible when it was initially set to display:none.
When an iframe is created with display:none it sets the root layer to be
zero width and height. When updating the rect of the iframe from layout
send the entire rect rather than just the new origin, which handles the case
where the iframe has been made visible and now has a non-zero rect.
2015-03-03 07:46:26 +10:00
Glenn Watson
2517bb561a Only allow root pipelines to set the window title.
Sometimes, the root pipeline title is sent before the compositor
has created the root pipeline, so also request the main page
title once the initial frame tree has been sent.
2015-03-03 06:10:47 +10:00
Ms2ger
dda12e196b Fix warnings in compositing. 2015-02-13 10:36:48 +01:00
Simon Sapin
d5dd1d658e Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
Martin Robinson
cf5b6199e7 Send back unused buffers to the right pipeline
Update to latest rust-layers and send back all buffers to their
original pipeline.
2015-02-10 17:11:28 -08:00
Ms2ger
b2fcc2397e Import msg as msg rather than servo_msg. 2015-02-10 11:40:36 +01: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
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
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
Glenn Watson
797658fb3a Fix change of src attributes on iframe (prevents SetLayerOrigin crash). 2015-01-20 15:38:58 +10: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
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
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
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
Ms2ger
6e027cda2d Rename the ConstellationControlMsg variants. 2015-01-04 19:01:13 +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
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
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
Martin Robinson
66f6c3a213 All root layers should mask their content
Root layers that define the extent of iframes should always mask their
child content. This fixes a bug where root layers without an assigned
size and location do not spill over the entire scene.
2014-12-11 12:29:31 +01:00
Patrick Walton
8b2aadc30b ports/cef: Implement accelerated compositing for the CEF port. 2014-12-10 08:35:47 -08:00
Tetsuharu OHZEKI
8cee554898 Replace almost "render" to "paint" in compositing crate.
This doesn't touch some "render" words which are used as general means.
2014-12-08 14:55:30 +09:00
Tetsuharu OHZEKI
15a32247a6 Rename WindowMethods::set_paint_state() 2014-12-08 14:05:50 +09:00
Tetsuharu OHZEKI
189f40f6f8 Rename IOCompositor's members. 2014-12-08 14:05:50 +09:00
Tetsuharu OHZEKI
806b6f09c9 Rename RenderState -> PaintState 2014-12-08 14:05:50 +09:00
Tetsuharu OHZEKI
94071f6330 Rename compositor_task::Msg. 2014-12-08 14:05:50 +09:00
Tetsuharu OHZEKI
79722bdc03 Rename gfx::paint_task::Msg 2014-12-08 14:05:50 +09:00
Tetsuharu OHZEKI
7ff790d941 Rename RenderChan -> PaintChan 2014-12-08 14:05:50 +09:00
Tetsuharu OHZEKI
9b6faaf7f0 Rename RenderRequest -> PaintRequest 2014-12-08 14:05:50 +09:00