mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Auto merge of #13651 - Manishearth:au-togeckostyle, r=emilio
impl GeckoStyleCoordConvertible for Au r? @heycam <!-- 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/13651) <!-- Reviewable:end -->
This commit is contained in:
commit
5955f4a754
2 changed files with 14 additions and 1 deletions
|
@ -51,6 +51,19 @@ impl GeckoStyleCoordConvertible for LengthOrPercentage {
|
|||
}
|
||||
}
|
||||
|
||||
impl GeckoStyleCoordConvertible for Au {
|
||||
fn to_gecko_style_coord<T: CoordDataMut>(&self, coord: &mut T) {
|
||||
coord.set_value(CoordDataValue::Coord(self.0));
|
||||
}
|
||||
|
||||
fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> {
|
||||
match coord.as_value() {
|
||||
CoordDataValue::Coord(coord) => Some(Au(coord)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl GeckoStyleCoordConvertible for LengthOrPercentageOrAuto {
|
||||
fn to_gecko_style_coord<T: CoordDataMut>(&self, coord: &mut T) {
|
||||
let value = match *self {
|
||||
|
|
|
@ -1837,7 +1837,7 @@ clip-path
|
|||
|
||||
pub fn set_column_width(&mut self, v: longhands::column_width::computed_value::T) {
|
||||
match v.0 {
|
||||
Some(au) => self.gecko.mColumnWidth.set_value(CoordDataValue::Coord(au.0)),
|
||||
Some(au) => self.gecko.mColumnWidth.set(au),
|
||||
None => self.gecko.mColumnWidth.set_value(CoordDataValue::Auto),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue