diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-05-15 15:00:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-15 15:00:19 -0500 |
commit | fa251ec96b445b9ba8439d76e05870a88c2caa0f (patch) | |
tree | d4fe49b542c7585a7f9acec508082c8e82f391ef /components/layout/query.rs | |
parent | dfb939629616490af4248c58ec3675244dc10e27 (diff) | |
parent | b0bf2b4bad636acfba66d55571b417ebae795408 (diff) | |
download | servo-fa251ec96b445b9ba8439d76e05870a88c2caa0f.tar.gz servo-fa251ec96b445b9ba8439d76e05870a88c2caa0f.zip |
Auto merge of #16295 - jdm:transition-safety, r=nox
Root nodes for the duration of their CSS transitions
This ensures that we can pass a node address as part of the asynchronous
transition end notification, making it safe to fire the corresponding
DOM event on the node from the script thread. Without explicitly rooting
this node when the transition starts, we risk the node being GCed before
the transition is complete.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14972
- [X] There are tests for these changes
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16295)
<!-- Reviewable:end -->
Diffstat (limited to 'components/layout/query.rs')
-rw-r--r-- | components/layout/query.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/components/layout/query.rs b/components/layout/query.rs index c12a2b7f63d..476a68afafe 100644 --- a/components/layout/query.rs +++ b/components/layout/query.rs @@ -17,7 +17,6 @@ use inline::LAST_FRAGMENT_OF_ELEMENT; use ipc_channel::ipc::IpcSender; use msg::constellation_msg::PipelineId; use opaque_node::OpaqueNodeMethods; -use script_layout_interface::PendingImage; use script_layout_interface::rpc::{ContentBoxResponse, ContentBoxesResponse}; use script_layout_interface::rpc::{HitTestResponse, LayoutRPC}; use script_layout_interface::rpc::{MarginStyleResponse, NodeGeometryResponse}; @@ -28,7 +27,6 @@ use script_traits::LayoutMsg as ConstellationMsg; use script_traits::UntrustedNodeAddress; use sequential; use std::cmp::{min, max}; -use std::mem; use std::ops::Deref; use std::sync::{Arc, Mutex}; use style::computed_values; @@ -89,9 +87,6 @@ pub struct LayoutThreadData { /// Index in a text fragment. We need this do determine the insertion point. pub text_index_response: TextIndexResponse, - /// A list of images requests that need to be initiated. - pub pending_images: Vec<PendingImage>, - /// A queued response for the list of nodes at a given point. pub nodes_from_point_response: Vec<UntrustedNodeAddress>, } @@ -198,12 +193,6 @@ impl LayoutRPC for LayoutRPCImpl { let rw_data = rw_data.lock().unwrap(); rw_data.text_index_response.clone() } - - fn pending_images(&self) -> Vec<PendingImage> { - let &LayoutRPCImpl(ref rw_data) = self; - let mut rw_data = rw_data.lock().unwrap(); - mem::replace(&mut rw_data.pending_images, vec![]) - } } struct UnioningFragmentBorderBoxIterator { |