Implement Document's 'body' attribute (getter and setter). Proper
implementation of setter requires Node::ReplaceChild(), which is
currently a stub and will be done on a later step.
This patch is for:
https://github.com/mozilla/servo/issues/1428
Implement Document's 'body' attribute (getter and setter). Proper
implementation of setter requires Node::ReplaceChild(), which is
currently a stub and will be done on a later step.
This patch is for:
https://github.com/mozilla/servo/issues/1428
This changeset gets rid of the `FooView` phantom type in favor of a more brute force approach that just whitelists methods that layout is allowed to call. The set is surprisingly small now that layout isn't going to the DOM for much.
If this approach turns out not to scale, we can do something fancier, but I'd rather just have it be safe and secure first and then refactor later for programmer happiness.
r? @kmcallister
Added a flags variable inside Node to represent boolean flags, with
is_in_doc being the first of them. It is updated whenever a node is
appended or removed from a parent.
This patch is for:
https://github.com/mozilla/servo/issues/1030
Added a flags variable inside Node to represent boolean flags, with
is_in_doc being the first of them. It is updated whenever a node is
appended or removed from a parent.
This patch is for:
https://github.com/mozilla/servo/issues/1030
Depends on https://github.com/mozilla-servo/rust-cssparser/pull/33 being merged.
Also (unrelated) pass around a base URL for stylesheets.
Adds a new dependency:
Upstream: https://github.com/lifthrasiir/rust-encoding
Servo’s fork: https://github.com/mozilla-servo/rust-encoding
As of this writing, upstream’s master branch targets Rust 0.8, and its rust-0.9-pre branch targets Rust master. Servo uses a Rust version in-between those. I pushed a rust-servo branch to our fork that backports from rust-0.9-pre, and also included some changes that have yet to be merged in upstream pull requests.
This shuts off all layout access to the DOM after flow tree construction, which will allow us to run script concurrently with layout during reflow and display list construction—even without the COW DOM. It also gets us closer to making `AbstractNode` noncopyable, which is important for safety because the JS GC will not trace layout.
r? @kmcallister
For #1406
Not really sure about some of my naming conventions, but offset was kinda taken in box.rs :/
Also this doesn't fully implement the offsets, but I'll do that alongside #782.
The rendergl::render_scene() function is being called more often than it needs to be, sometimes before the renderer has finished. This could result in PNG images that are drawn before the frame trees set in SetIds is rendered.
Pipeline now blocks on `Pipeline.exit()` and waits for confirmation that RenderTask and LayoutTask were successfully destructed (they're created inside a block which ensures they go out of scope before the message is sent.
Other notable changes include:
* The blocking recv in main/servo.rc that waits for a constellation exit confirmation was moved out of the spawn and into the main thread. `Constellation::start()` spawns a new task, so there's no need to block in that task once the ExitMsg is sent off.
* Application initialization was moved out of `run_compositor` and into `CompositorTask`, so it could be stored with the compositor task and not go out of scope until the program's main block finishes.
I had to use SharedPort<()> objects to work around the fact that pipelines get cloned, even though it feels like pipelines should probably be ref counted instead. I went down that route for a few hours but got bogged down trying to wrap my head around some region/lifetime issues; I would be happy to work on that part again, but would need some mentoring to help me figure out what I was doing wrong and possibly why. The current solution doesn't feel too bad though.
Fixes#1097.
The rendergl::render_scene() function is being called more often than
it needs to be, sometimes before the renderer has finished. This
could result in PNG images that are drawn before the frame trees set
in SetIds is rendered.
This should fix images produced by the -o flag.
The gl2::read_pixels call was asking for pixel data in RGB8 but was then telling the PNG encoder that the data was RGBA8. The value was originally set correctly, but was changed when support was added for drawing transparent PNGs.
We could instead adjust the gl2::read_pixels call to return RGBA8 so we can write transparent screenshots, but I'm not sure if there's a use case for that.