mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Move arc_ptr_eq to style.
This commit is contained in:
parent
8ded106186
commit
9f13278b77
6 changed files with 17 additions and 17 deletions
|
@ -103,6 +103,8 @@ pub mod values;
|
|||
pub mod viewport;
|
||||
pub mod workqueue;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
/// The CSS properties supported by the style system.
|
||||
// Generated from the properties.mako.rs template by build.rs
|
||||
#[macro_use]
|
||||
|
@ -126,3 +128,11 @@ macro_rules! reexport_computed_values {
|
|||
}
|
||||
}
|
||||
longhand_properties_idents!(reexport_computed_values);
|
||||
|
||||
/// Returns whether the two arguments point to the same value.
|
||||
#[inline]
|
||||
pub fn arc_ptr_eq<T: 'static>(a: &Arc<T>, b: &Arc<T>) -> bool {
|
||||
let a: &T = &**a;
|
||||
let b: &T = &**b;
|
||||
(a as *const T) == (b as *const T)
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#![allow(unsafe_code)]
|
||||
|
||||
use animation::{self, Animation};
|
||||
use arc_ptr_eq;
|
||||
use cache::{LRUCache, SimpleHashCache};
|
||||
use context::{StyleContext, SharedStyleContext};
|
||||
use data::PrivateStyleData;
|
||||
|
@ -25,7 +26,6 @@ use std::hash::{BuildHasherDefault, Hash, Hasher};
|
|||
use std::slice::Iter;
|
||||
use std::sync::Arc;
|
||||
use string_cache::{Atom, Namespace};
|
||||
use util::arc_ptr_eq;
|
||||
use util::opts;
|
||||
|
||||
fn create_common_style_affecting_attributes_from_element<E: TElement>(element: &E)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue