aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread/lib.rs
diff options
context:
space:
mode:
authorbors-servo <servo-ops@mozilla.com>2020-04-04 09:35:34 -0400
committerGitHub <noreply@github.com>2020-04-04 09:35:34 -0400
commitd64f7d427a8dc56bbfc92183f57588e7eb1d56c2 (patch)
tree5f07578a53872c2d23da16f2d052cda7ff4ef1e4 /components/layout_thread/lib.rs
parent9972aee81f0e80d34157325a5e13b3b1a7ef417a (diff)
parent185a402d9cc41d3e680b99564f5fc8b519ecf129 (diff)
downloadservo-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/layout_thread/lib.rs')
-rw-r--r--components/layout_thread/lib.rs12
1 files changed, 1 insertions, 11 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs
index 54f1ec8d656..4c458065986 100644
--- a/components/layout_thread/lib.rs
+++ b/components/layout_thread/lib.rs
@@ -23,7 +23,6 @@ extern crate profile_traits;
mod dom_wrapper;
-use crate::dom_wrapper::drop_style_and_layout_data;
use crate::dom_wrapper::{ServoLayoutDocument, ServoLayoutElement, ServoLayoutNode};
use app_units::Au;
use crossbeam_channel::{unbounded, Receiver, Sender};
@@ -692,7 +691,6 @@ impl LayoutThread {
Msg::GetRPC(..) => LayoutHangAnnotation::GetRPC,
Msg::TickAnimations(..) => LayoutHangAnnotation::TickAnimations,
Msg::AdvanceClockMs(..) => LayoutHangAnnotation::AdvanceClockMs,
- Msg::ReapStyleAndLayoutData(..) => LayoutHangAnnotation::ReapStyleAndLayoutData,
Msg::CollectReports(..) => LayoutHangAnnotation::CollectReports,
Msg::PrepareToExit(..) => LayoutHangAnnotation::PrepareToExit,
Msg::ExitNow => LayoutHangAnnotation::ExitNow,
@@ -833,9 +831,6 @@ impl LayoutThread {
webrender_api::ScrollClamping::ToContentBounds,
);
},
- Msg::ReapStyleAndLayoutData(dead_data) => unsafe {
- drop_style_and_layout_data(dead_data)
- },
Msg::CollectReports(reports_chan) => {
self.collect_reports(reports_chan, possibly_locked_rw_data);
},
@@ -967,9 +962,6 @@ impl LayoutThread {
response_chan.send(()).unwrap();
loop {
match self.port.recv().unwrap() {
- Msg::ReapStyleAndLayoutData(dead_data) => unsafe {
- drop_style_and_layout_data(dead_data)
- },
Msg::ExitNow => {
debug!("layout thread is exiting...");
self.exit_now();
@@ -1472,7 +1464,7 @@ impl LayoutThread {
// If we haven't styled this node yet, we don't need to track a
// restyle.
- let style_data = match el.get_data() {
+ let mut style_data = match el.mutate_data() {
Some(d) => d,
None => {
unsafe { el.unset_snapshot_flags() };
@@ -1485,8 +1477,6 @@ impl LayoutThread {
map.insert(el.as_node().opaque(), s);
}
- let mut style_data = style_data.borrow_mut();
-
// Stash the data on the element for processing by the style system.
style_data.hint.insert(restyle.hint.into());
style_data.damage = restyle.damage;