aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/values/resolved/mod.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-05-10 21:20:50 -0400
committerGitHub <noreply@github.com>2019-05-10 21:20:50 -0400
commit887f43b65bacad5490365f14d54bf25af4d3234b (patch)
tree2c34539b60750aab59c068959cdc6fc8389a90c0 /components/style/values/resolved/mod.rs
parent81f750afa770f9bf6f2b0fff8052e5ccf047e4ed (diff)
parentdb2f6aa8ca1f23f78a497cb7cc960ff99f23ac04 (diff)
downloadservo-887f43b65bacad5490365f14d54bf25af4d3234b.tar.gz
servo-887f43b65bacad5490365f14d54bf25af4d3234b.zip
Auto merge of #23353 - emilio:gecko-sync, r=emilio
style: Sync changes from mozilla-central. See each individual commit for details. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23353) <!-- Reviewable:end -->
Diffstat (limited to 'components/style/values/resolved/mod.rs')
-rw-r--r--components/style/values/resolved/mod.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/components/style/values/resolved/mod.rs b/components/style/values/resolved/mod.rs
index 4003060148c..379ea83ec6b 100644
--- a/components/style/values/resolved/mod.rs
+++ b/components/style/values/resolved/mod.rs
@@ -193,3 +193,20 @@ where
Vec::from_resolved_value(Vec::from(resolved)).into_boxed_slice()
}
}
+
+impl<T> ToResolvedValue for crate::OwnedSlice<T>
+where
+ T: ToResolvedValue,
+{
+ type ResolvedValue = crate::OwnedSlice<<T as ToResolvedValue>::ResolvedValue>;
+
+ #[inline]
+ fn to_resolved_value(self, context: &Context) -> Self::ResolvedValue {
+ self.into_box().to_resolved_value(context).into()
+ }
+
+ #[inline]
+ fn from_resolved_value(resolved: Self::ResolvedValue) -> Self {
+ Self::from(Box::from_resolved_value(resolved.into_box()))
+ }
+}