diff options
author | bors-servo <servo-ops@mozilla.com> | 2020-04-04 09:35:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-04 09:35:34 -0400 |
commit | d64f7d427a8dc56bbfc92183f57588e7eb1d56c2 (patch) | |
tree | 5f07578a53872c2d23da16f2d052cda7ff4ef1e4 /components/script_layout_interface/wrapper_traits.rs | |
parent | 9972aee81f0e80d34157325a5e13b3b1a7ef417a (diff) | |
parent | 185a402d9cc41d3e680b99564f5fc8b519ecf129 (diff) | |
download | servo-d64f7d427a8dc56bbfc92183f57588e7eb1d56c2.tar.gz servo-d64f7d427a8dc56bbfc92183f57588e7eb1d56c2.zip |
Auto merge of #26105 - servo:layout-2020-less-opaque, r=emilio
Make DOM own the style and layout data, in an UnsafeCell
Diffstat (limited to 'components/script_layout_interface/wrapper_traits.rs')
-rw-r--r-- | components/script_layout_interface/wrapper_traits.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script_layout_interface/wrapper_traits.rs b/components/script_layout_interface/wrapper_traits.rs index 462d11f2c7e..671dd1c8230 100644 --- a/components/script_layout_interface/wrapper_traits.rs +++ b/components/script_layout_interface/wrapper_traits.rs @@ -80,7 +80,7 @@ impl PseudoElementType { /// Trait to abstract access to layout data across various data structures. pub trait GetLayoutData<'dom> { - fn get_style_and_layout_data(&self) -> Option<OpaqueStyleAndLayoutData>; + fn get_style_and_layout_data(self) -> Option<&'dom OpaqueStyleAndLayoutData>; } /// A wrapper so that layout can access only the methods that it should have access to. Layout must @@ -224,7 +224,7 @@ pub trait ThreadSafeLayoutNode<'dom>: .map_or(PseudoElementType::Normal, |el| el.get_pseudo_element_type()) } - fn get_style_and_layout_data(&self) -> Option<OpaqueStyleAndLayoutData>; + fn get_style_and_layout_data(self) -> Option<&'dom OpaqueStyleAndLayoutData>; fn style(&self, context: &SharedStyleContext) -> Arc<ComputedValues> { if let Some(el) = self.as_element() { |