diff options
author | Martin Robinson <mrobinson@igalia.com> | 2023-05-02 08:35:33 +0200 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2023-05-05 17:16:38 +0200 |
commit | 2d31d4301d66bce4678af848e80905a35b9c02aa (patch) | |
tree | d6386d2c0984ea74b733e3393a187aff6065ad1f /components/script/lib.rs | |
parent | ab0d462c83b6a13d64f664e09276d6c8decb5a02 (diff) | |
download | servo-2d31d4301d66bce4678af848e80905a35b9c02aa.tar.gz servo-2d31d4301d66bce4678af848e80905a35b9c02aa.zip |
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.
Diffstat (limited to 'components/script/lib.rs')
-rw-r--r-- | components/script/lib.rs | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/components/script/lib.rs b/components/script/lib.rs index b34b1fb11ee..66c878dbbde 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -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; -} |