mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
Move OpaqueNode
to style_traits
This commit is contained in:
parent
d988b4c943
commit
cbcf83fc65
4 changed files with 34 additions and 20 deletions
|
@ -90,6 +90,12 @@ malloc_size_of_is_0!(UntrustedNodeAddress);
|
|||
#[allow(unsafe_code)]
|
||||
unsafe impl Send for UntrustedNodeAddress {}
|
||||
|
||||
impl From<style_traits::dom::OpaqueNode> for UntrustedNodeAddress {
|
||||
fn from(o: style_traits::dom::OpaqueNode) -> Self {
|
||||
UntrustedNodeAddress(o.0 as *const c_void)
|
||||
}
|
||||
}
|
||||
|
||||
impl Serialize for UntrustedNodeAddress {
|
||||
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
|
||||
(self.0 as usize).serialize(s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue