mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Eliminate duplicate Layout DOM wrappers
There are duplicate sets of Layout DOM wrappers: one for Layout 2013 and one for Layout 2020. As part of cleaning up and simplifying the wrappers, this change parameterizes them on the specific layout data they contain. This allows them to be shared again. In addition, various small cleanups are included. Fixes #29691.
This commit is contained in:
parent
ab0d462c83
commit
2d31d4301d
14 changed files with 1035 additions and 2362 deletions
|
@ -73,6 +73,8 @@ mod image_listener;
|
|||
mod init;
|
||||
#[warn(deprecated)]
|
||||
mod layout_image;
|
||||
|
||||
pub mod layout_dom;
|
||||
#[warn(deprecated)]
|
||||
mod mem;
|
||||
#[warn(deprecated)]
|
||||
|
@ -115,23 +117,3 @@ mod window_named_properties;
|
|||
|
||||
pub use init::init;
|
||||
pub use script_runtime::JSEngineSetup;
|
||||
|
||||
/// A module with everything layout can use from script.
|
||||
///
|
||||
/// Try to keep this small!
|
||||
///
|
||||
/// TODO(emilio): A few of the FooHelpers can go away, presumably...
|
||||
pub mod layout_exports {
|
||||
pub use crate::dom::bindings::inheritance::{
|
||||
CharacterDataTypeId, DocumentFragmentTypeId, ElementTypeId,
|
||||
};
|
||||
pub use crate::dom::bindings::inheritance::{HTMLElementTypeId, NodeTypeId, TextTypeId};
|
||||
pub use crate::dom::bindings::root::LayoutDom;
|
||||
pub use crate::dom::characterdata::LayoutCharacterDataHelpers;
|
||||
pub use crate::dom::document::{Document, LayoutDocumentHelpers};
|
||||
pub use crate::dom::element::{Element, LayoutElementHelpers};
|
||||
pub use crate::dom::node::NodeFlags;
|
||||
pub use crate::dom::node::{LayoutNodeHelpers, Node};
|
||||
pub use crate::dom::shadowroot::{LayoutShadowRootHelpers, ShadowRoot};
|
||||
pub use crate::dom::text::Text;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue