aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/gecko/values.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/style/gecko/values.rs')
-rw-r--r--components/style/gecko/values.rs33
1 files changed, 1 insertions, 32 deletions
diff --git a/components/style/gecko/values.rs b/components/style/gecko/values.rs
index 8b05e1520b4..ba2074d8fdc 100644
--- a/components/style/gecko/values.rs
+++ b/components/style/gecko/values.rs
@@ -8,12 +8,10 @@
use crate::counter_style::{Symbol, Symbols};
use crate::gecko_bindings::structs::{nsStyleCoord, CounterStylePtr};
-use crate::gecko_bindings::structs::{StyleGridTrackBreadth, StyleShapeRadius};
+use crate::gecko_bindings::structs::StyleGridTrackBreadth;
use crate::gecko_bindings::sugar::ns_style_coord::{CoordData, CoordDataMut, CoordDataValue};
-use crate::values::computed::basic_shape::ShapeRadius as ComputedShapeRadius;
use crate::values::computed::{Angle, Length, LengthPercentage};
use crate::values::computed::{Number, NumberOrPercentage, Percentage};
-use crate::values::generics::basic_shape::ShapeRadius;
use crate::values::generics::gecko::ScrollSnapPoint;
use crate::values::generics::grid::{TrackBreadth, TrackKeyword};
use crate::values::generics::length::LengthPercentageOrAuto;
@@ -192,35 +190,6 @@ impl<L: GeckoStyleCoordConvertible> GeckoStyleCoordConvertible for TrackBreadth<
}
}
-impl GeckoStyleCoordConvertible for ComputedShapeRadius {
- fn to_gecko_style_coord<T: CoordDataMut>(&self, coord: &mut T) {
- match *self {
- ShapeRadius::ClosestSide => coord.set_value(CoordDataValue::Enumerated(
- StyleShapeRadius::ClosestSide as u32,
- )),
- ShapeRadius::FarthestSide => coord.set_value(CoordDataValue::Enumerated(
- StyleShapeRadius::FarthestSide as u32,
- )),
- ShapeRadius::Length(lp) => lp.to_gecko_style_coord(coord),
- }
- }
-
- fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> {
- match coord.as_value() {
- CoordDataValue::Enumerated(v) => {
- if v == StyleShapeRadius::ClosestSide as u32 {
- Some(ShapeRadius::ClosestSide)
- } else if v == StyleShapeRadius::FarthestSide as u32 {
- Some(ShapeRadius::FarthestSide)
- } else {
- None
- }
- },
- _ => GeckoStyleCoordConvertible::from_gecko_style_coord(coord).map(ShapeRadius::Length),
- }
- }
-}
-
impl<T: GeckoStyleCoordConvertible> GeckoStyleCoordConvertible for Option<T> {
fn to_gecko_style_coord<U: CoordDataMut>(&self, coord: &mut U) {
if let Some(ref me) = *self {