From 00677e27fd884d46c9737385780666d7fd231155 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Fri, 29 Jul 2016 11:12:28 +0800 Subject: [PATCH] Pull UrlExtraData up to values.rs. --- components/style/properties/longhand/box.mako.rs | 9 +-------- components/style/values.rs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/components/style/properties/longhand/box.mako.rs b/components/style/properties/longhand/box.mako.rs index 87af34df33e..a00f0c01393 100644 --- a/components/style/properties/longhand/box.mako.rs +++ b/components/style/properties/longhand/box.mako.rs @@ -914,17 +914,10 @@ ${helpers.single_keyword("-moz-appearance", use gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI}; use std::fmt::{self, Write}; use url::Url; + use values::specified::UrlExtraData; use values::computed::ComputedValueAsSpecified; use values::NoViewportPercentage; - #[derive(PartialEq, Clone, Debug)] - #[cfg_attr(feature = "servo", derive(HeapSizeOf))] - pub struct UrlExtraData { - pub base: GeckoArcURI, - pub referrer: GeckoArcURI, - pub principal: GeckoArcPrincipal, - } - #[derive(PartialEq, Clone, Debug)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub enum SpecifiedValue { diff --git a/components/style/values.rs b/components/style/values.rs index 35063977aa6..a0d32cba5ee 100644 --- a/components/style/values.rs +++ b/components/style/values.rs @@ -98,6 +98,8 @@ pub mod specified { use app_units::Au; use cssparser::{self, Parser, ToCss, Token}; use euclid::size::Size2D; + #[cfg(feature = "gecko")] + use gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI}; use parser::ParserContext; use std::ascii::AsciiExt; use std::cmp; @@ -1317,6 +1319,17 @@ pub mod specified { } } + #[derive(PartialEq, Clone, Debug)] + #[cfg_attr(feature = "servo", derive(HeapSizeOf))] + pub struct UrlExtraData { + #[cfg(feature = "gecko")] + pub base: GeckoArcURI, + #[cfg(feature = "gecko")] + pub referrer: GeckoArcURI, + #[cfg(feature = "gecko")] + pub principal: GeckoArcPrincipal, + } + /// Specified values for an image according to CSS-IMAGES. #[derive(Clone, PartialEq, Debug)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))]