aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ports/geckolib/data.rs5
-rw-r--r--ports/geckolib/properties.mako.rs2
-rw-r--r--ports/geckolib/selector_impl.rs1
-rw-r--r--ports/geckolib/string_cache/lib.rs10
4 files changed, 15 insertions, 3 deletions
diff --git a/ports/geckolib/data.rs b/ports/geckolib/data.rs
index dd0fa4dc18d..0f07ef83c57 100644
--- a/ports/geckolib/data.rs
+++ b/ports/geckolib/data.rs
@@ -6,12 +6,11 @@ use euclid::Size2D;
use euclid::size::TypedSize2D;
use gecko_bindings::bindings::RawServoStyleSet;
use num_cpus;
-use selector_impl::{Stylist, Stylesheet, SharedStyleContext};
+use selector_impl::{GeckoSelectorImpl, Stylist, Stylesheet, SharedStyleContext};
use std::cmp;
use std::collections::HashMap;
use std::sync::mpsc::{channel, Receiver, Sender};
use std::sync::{Arc, RwLock};
-use style::animation::Animation;
use style::dom::OpaqueNode;
use style::media_queries::{Device, MediaType};
use style::parallel::WorkQueueData;
@@ -19,6 +18,8 @@ use util::geometry::ViewportPx;
use util::thread_state;
use util::workqueue::WorkQueue;
+pub type Animation = ::style::animation::Animation<GeckoSelectorImpl>;
+
pub struct PerDocumentStyleData {
/// Rule processor.
pub stylist: Arc<Stylist>,
diff --git a/ports/geckolib/properties.mako.rs b/ports/geckolib/properties.mako.rs
index 79b200d0f1b..6493a399ea9 100644
--- a/ports/geckolib/properties.mako.rs
+++ b/ports/geckolib/properties.mako.rs
@@ -39,7 +39,7 @@ use values::{StyleCoordHelpers, ToGeckoStyleCoord, convert_nscolor_to_rgba};
use values::{convert_rgba_to_nscolor, debug_assert_unit_is_safe_to_copy};
use values::round_border_to_device_pixels;
-#[derive(Clone)]
+#[derive(Clone, Debug)]
pub struct GeckoComputedValues {
% for style_struct in data.style_structs:
${style_struct.ident}: Arc<${style_struct.gecko_struct_name}>,
diff --git a/ports/geckolib/selector_impl.rs b/ports/geckolib/selector_impl.rs
index dda81ecec06..5c5e1731b3b 100644
--- a/ports/geckolib/selector_impl.rs
+++ b/ports/geckolib/selector_impl.rs
@@ -16,6 +16,7 @@ pub type PrivateStyleData = style::data::PrivateStyleData<GeckoSelectorImpl, Gec
#[cfg(feature = "servo_features")]
known_heap_size!(0, GeckoSelectorImpl, PseudoElement, NonTSPseudoClass);
+#[derive(Debug, Clone)]
pub struct GeckoSelectorImpl;
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
diff --git a/ports/geckolib/string_cache/lib.rs b/ports/geckolib/string_cache/lib.rs
index 91f81697dbf..0486e7efb7b 100644
--- a/ports/geckolib/string_cache/lib.rs
+++ b/ports/geckolib/string_cache/lib.rs
@@ -15,6 +15,7 @@ use gecko_bindings::structs::nsIAtom;
use heapsize::HeapSizeOf;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::borrow::Cow;
+use std::char;
use std::fmt;
use std::hash::{Hash, Hasher};
use std::marker::PhantomData;
@@ -206,6 +207,15 @@ impl fmt::Debug for Atom {
}
}
+impl fmt::Display for Atom {
+ fn fmt(&self, w: &mut fmt::Formatter) -> fmt::Result {
+ for c in char::decode_utf16(self.as_slice().iter().cloned()) {
+ try!(write!(w, "{}", c.unwrap_or(char::REPLACEMENT_CHARACTER)))
+ }
+ Ok(())
+ }
+}
+
impl<'a> From<&'a str> for Atom {
#[inline]
fn from(string: &str) -> Atom {