Commit graph

3 commits

Author SHA1 Message Date
Patrick Walton
bf82bc54f3 Separate the DOM and layout into separate crates. 2013-05-28 17:13:40 -07:00
Patrick Walton
4f3ca373d4 Introduce a phantom type to prevent script from accessing the layout data directly.
Nodes are now parameterized over a "View" type. The particular View type
determines which methods can be called. Layout data accessors and mutators are
only accessible to nodes with a LayoutView. The only way to convert a
`Node<ScriptView>` to a `Node<LayoutView>` is through a transmutation, which is
done at the moment the layout task receives nodes. (This should be factored
better to contain the unsafety.)

We should also lock down DOM node mutation to the ScriptView to forbid data
races, but this patch doesn't do that.

This also reduces coupling between DOM and layout. Soon I would like to move
the DOM into its own crate, and this is a step on the way of doing that.
2013-05-28 15:40:47 -07:00
Patrick Walton
c7bce98236 Remove the servo- prefix from core components. 2013-05-28 15:40:47 -07:00
Renamed from src/components/servo/dom/bindings/codegen/CodegenRust.py (Browse further)