We probably leak some threads and resources, e.g. when the script task crashes
and doesn't get a chance to send layout data back to layout to be deallocated.
Not tested with iframes yet.
which can then inform the compositor (and anyone else, later) about
the completion of loading a page. This is important for ref tests,
which should not emit a PNG until load has completed, even if we
perform a composite before then.
The old code was used by both layout and script, but was erroneously
borrowing for the layout case (which causes parallelism
problems). script now uses only `value_ref()` or `get_attribute()`, and
layout now has its own unsafe version that dances around the borrows of
`@mut Attr`.
normally.
The old code made the mistake of attempting to shutdown the associated
pipelines itself, which caused race conditions with the constellation and
compositor, as they expect to be able to drain their message queues
before exiting.
Pointers to DOM nodes from layout could go stale if incremental reflow
does not correctly destroy dead nodes. Therefore, we ask the JavaScript
garbage collector to verify that each DOM node is indeed a valid pointer
before calling event handlers on it, and fail otherwise.
* add servo_util::task::{spawn_named,spawn_with_named} functions
* add name param for spawn_listener and spawn_conversation functions
this should resolve#1169
This will allow us to stop going to the DOM in order to handle iframe
sizing. Instead we can just store the pipeline and frame IDs of iframes
inside the flow tree itself.
Instead we do selector matching again, then diff the style structs to set the
"restyle damage" bits which are used to prune reflow traversals.
Also don't force a reflow when timers finish, because individual DOM methods
should already take care of that.
This replaces flow construction with a strict bottom-up tree traversal,
allowing for parallelism. Each step of the traversal creates a flow or
a `ConstructionItem`, similar to how Gecko works. {ib} splits are
handled by not creating `InlineFlow`s until the containing block is
reached.
This should be able to be incrementalized by storing the `Flow` from
layout to layout, and performing fixups during flow construction
and/or wiping containing blocks in a previous pass.
We were parsing URLs like
//bits.wikimedia.org/static-1.22wmf22/skins/vector/images/search-ltr.png?303-4
as local filenames because HTMLImageElement::update_image didn't have a
current_url to pass to make_url().
This was a very old (May 2012) testing feature which used
std::io::read_whole_file rather than our normal resource-loader mechanism.
We can implement javascript: URLs later.