This cleans up configure and Makefile.in so that things build correctly on Darwin.
This needs https://github.com/mozilla-servo/nss/pull/6 before it can be merged. Please hold any r+ until that lands and I push the submodule update.
Fixes#967 and #965
This has been wrong for a long time. Previously, only the pipeline associated with the root frame evicted would be shut down. 1) It shouldn't necessarily be closed, because there could be references to it still in the navigation context, and 2) Presumably none of the children pipelines of the root frame were ever exiting.
It's hard to test this right now because #965 covers up other pipeline exiting issues, but when that's fixed, a pathological case in which things would have broken down would be:
1) Load a page with an iframe that contains a link
2) Click the link
3) Press backspace to navigate back
4) Navigate to any new page, at which point the forward page would be evicted from the navigation context, and the outer frame's pipeline would be shut down improperly.
5) Press backspace, at which point there is no longer a pipeline for the old page, because it was shut down prematurely. Presumably this would cause a crash.
I also changed the FrameTree function ```find_mut``` to ```find``` because find_mut implies it's doing something to cause mutability, but the mutability is caused by the type of object being iterated over, nothing else.
Additionally, script was exiting completely when receiving an exit message. Instead, it needs to handle exit messages according to who sent it. It should only close the subframes of the frame whose pipeline sent the exit message. This is now fixed.
Inexplicably, script was also closing the compositor upon receiving an exit message. This doesn't seem like it'd ever be the right thing to do. *Edit: this is _only_ the right thing to do when received from the window.* I've fixed that. I don't think anyone shuts down the compositor now. *Edit: the script shuts down the compositor only when receiving an exit from the window.*
update_window_title() is called constantly in the compositor loop. This function
always changes the title to "Servo" when in idle state so it is spamming the X
server with constant changes. But this isn't necessary because updating the
title is taken care of when the Rendering or Ready state are changed in
set_ready_state() and set_render_state().
Fixes#830
Happy Software Freedom Day
update_window_title() is called constantly in the compositor loop. This function
always changes the title to "Servo" when in idle state so it is spamming the X
server with constant changes. But this isn't necessary because updating the
title is taken care of when the Rendering or Ready state are changed in
set_ready_state() and set_render_state().
Fixes#830
Happy Software Freedom Day
* Profiler is now close to a no-op when ```-p``` is not passed in
* The profiler's printing ```Timer``` now stops looping when the profiler is closed
* Most task ```Chans``` are now newtype ```structs```
* Some more ```Cell``` removals in places where ```spawn_with``` is appropriate
script task sent RendererReadyMsg after every reflow.
now, the renderer sends RendererReady at the appropriate time,
and _only_ if it doesn't have paint permission.
The quadtree was checking to see if a window's position was within the clip region before drawing it. However, the window's position is in page-relative coordinates whereas the clip region is in window-relative coordinates. So, unless the iframe happened to fall in the clip range, it would never have tiles returned.
If an iframe had enough content that it spilled outside of its clip range, different logic was triggered that would cause it to receive a ReRenderMsg anyway, which circumvented all of this.
@eschweic, can you please review this if you have a minute? I believe that I've correctly captured the four checks we want to make (two each for ```x``` and ```y``` directions to determine if the window is in or out, but I'd appreciate another set of eyes on it.
For some example data, in a call to ```get_tile_rects``` for an iframe that is sized to 400x400 and is 428-ish pixels down the page, with a browser frame that is 600 total pixels tall, that function is called with:
window origin geom::point::Point2D<f32>{x: 9f32, y: 428.6000061f32}
window size geom::size::Size2D<f32>{width: 400f32, height: 171.3999939f32}
self origin geom::point::Point2D<f32>{x: 0f32, y: 0f32}
self size 512f32"
clip: size::Size2D<f32>{width: 400f32, height: 400f32}