Separate style+layout and layout-specific wrapper functionality.

This patch does a number of things, unfortunately all at once:
* Hoists a large subset of the layout wrapper functionality into the style system.
* Merges TElementAttributes into the newly-created TElement.
* Reorganizes LayoutData by style vs layout, and removes LayoutDataShared.
* Simplifies the API for borrowing style/layout data.

There's still more to do to make the style system usable standalone, but
this is a good start.
This commit is contained in:
Bobby Holley 2015-12-17 16:21:29 -08:00
parent 89ab368258
commit 47059d2d26
20 changed files with 657 additions and 706 deletions

View file

@ -7,7 +7,7 @@
//! the DOM to be placed in a separate crate from layout.
use app_units::Au;
use dom::node::LayoutData;
use dom::node::OpaqueStyleAndLayoutData;
use euclid::point::Point2D;
use euclid::rect::Rect;
use gfx_traits::LayerId;
@ -59,7 +59,7 @@ pub enum Msg {
/// Destroys layout data associated with a DOM node.
///
/// TODO(pcwalton): Maybe think about batching to avoid message traffic.
ReapLayoutData(LayoutData),
ReapStyleAndLayoutData(OpaqueStyleAndLayoutData),
/// Requests that the layout task measure its memory usage. The resulting reports are sent back
/// via the supplied channel.