Bug 1549593 - Move OwnedSlice to style_traits. r=heycam
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 09 May 2019 10:49:50 +0000
changeset 532021 f419e689abf08b654c99ec258f2118b0523628cf
parent 532020 fe11fc11ec5b0ee0111351c01cf601109798ca85
child 532022 34b343ca6c2a44e1fd4402a0d7eb247cc2c6df2e
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1549593
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1549593 - Move OwnedSlice to style_traits. r=heycam Differential Revision: https://phabricator.services.mozilla.com/D30126
servo/components/style/lib.rs
servo/components/style/owned_slice.rs
servo/components/style_traits/lib.rs
servo/components/style_traits/owned_slice.rs
--- a/servo/components/style/lib.rs
+++ b/servo/components/style/lib.rs
@@ -138,17 +138,16 @@ pub mod gecko_bindings;
 pub mod global_style_data;
 pub mod hash;
 pub mod invalidation;
 #[allow(missing_docs)] // TODO.
 pub mod logical_geometry;
 pub mod matching;
 #[macro_use]
 pub mod media_queries;
-pub mod owned_slice;
 pub mod parallel;
 pub mod parser;
 pub mod rule_cache;
 pub mod rule_collector;
 pub mod rule_tree;
 pub mod scoped_tls;
 pub mod selector_map;
 pub mod selector_parser;
@@ -184,17 +183,17 @@ pub use crate::gecko_string_cache::Names
 pub use html5ever::LocalName;
 #[cfg(feature = "servo")]
 pub use html5ever::Namespace;
 #[cfg(feature = "servo")]
 pub use html5ever::Prefix;
 #[cfg(feature = "servo")]
 pub use servo_atoms::Atom;
 
-pub use owned_slice::OwnedSlice;
+pub use style_traits::owned_slice::OwnedSlice;
 
 /// The CSS properties supported by the style system.
 /// Generated from the properties.mako.rs template by build.rs
 #[macro_use]
 #[allow(unsafe_code)]
 #[deny(missing_docs)]
 pub mod properties {
     include!(concat!(env!("OUT_DIR"), "/properties.rs"));
--- a/servo/components/style_traits/lib.rs
+++ b/servo/components/style_traits/lib.rs
@@ -84,16 +84,17 @@ pub enum CSSPixel {}
 //   / hidpi_ratio => DeviceIndependentPixel
 //     / desktop_zoom => CSSPixel
 
 pub mod specified_value_info;
 #[macro_use]
 pub mod values;
 #[macro_use]
 pub mod viewport;
+pub mod owned_slice;
 
 pub use crate::specified_value_info::{CssType, KeywordsCollectFn, SpecifiedValueInfo};
 pub use crate::values::{
     Comma, CommaWithSpace, CssWriter, OneOrMoreSeparated, Separator, Space, ToCss,
 };
 
 /// The error type for all CSS parsing routines.
 pub type ParseError<'i> = cssparser::ParseError<'i, StyleParseErrorKind<'i>>;
rename from servo/components/style/owned_slice.rs
rename to servo/components/style_traits/owned_slice.rs
--- a/servo/components/style/owned_slice.rs
+++ b/servo/components/style_traits/owned_slice.rs
@@ -1,12 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
+#![allow(unsafe_code)]
+
 //! A replacement for `Box<[T]>` that cbindgen can understand.
 
 use std::marker::PhantomData;
 use std::{fmt, mem, slice};
 use std::ptr::NonNull;
 use std::ops::{Deref, DerefMut};
 use malloc_size_of::{MallocSizeOf, MallocShallowSizeOf, MallocSizeOfOps};
 use to_shmem::{SharedMemoryBuilder, ToShmem};