diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2015-12-02 10:22:35 -0800 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2015-12-23 12:05:25 -0700 |
commit | 6637626e02f30d2c476eba96d117f77575eaacb6 (patch) | |
tree | 83ed1bc42b5dc856ef5fa6612e47c1ce4a48b210 /components/layout/wrapper.rs | |
parent | da8952b7023a92b7a69bd4423905594f4baa8f29 (diff) | |
download | servo-6637626e02f30d2c476eba96d117f77575eaacb6.tar.gz servo-6637626e02f30d2c476eba96d117f77575eaacb6.zip |
Make DangerousThreadSafeLayoutNode public. :-(
I'm open to suggestions on how to do this better.
Diffstat (limited to 'components/layout/wrapper.rs')
-rw-r--r-- | components/layout/wrapper.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs index 5ad91dbcbc0..40b362980e2 100644 --- a/components/layout/wrapper.rs +++ b/components/layout/wrapper.rs @@ -975,8 +975,9 @@ pub trait ThreadSafeLayoutNode<'ln> : Clone + Copy + Sized { fn get_colspan(&self) -> u32; } -// These can violate the thread-safety and therefore are not public. -trait DangerousThreadSafeLayoutNode<'ln> : ThreadSafeLayoutNode<'ln> { +// This trait is only public so that it can be implemented by the gecko wrapper. +// It can be used to violate thread-safety, so don't use it elsewhere in layout! +pub trait DangerousThreadSafeLayoutNode<'ln> : ThreadSafeLayoutNode<'ln> { unsafe fn dangerous_first_child(&self) -> Option<Self>; unsafe fn dangerous_next_sibling(&self) -> Option<Self>; } |