mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Simplify caret-color conversion.
This commit is contained in:
parent
c62935577a
commit
5c643adb98
2 changed files with 22 additions and 33 deletions
|
@ -42,7 +42,7 @@ use gecko_bindings::bindings::Gecko_SetNullImageValue;
|
|||
use gecko_bindings::bindings::ServoComputedValuesBorrowedOrNull;
|
||||
use gecko_bindings::bindings::{Gecko_ResetFilters, Gecko_CopyFiltersFrom};
|
||||
use gecko_bindings::bindings::RawGeckoPresContextBorrowed;
|
||||
use gecko_bindings::structs::{self, StyleComplexColor};
|
||||
use gecko_bindings::structs;
|
||||
use gecko_bindings::structs::nsCSSPropertyID;
|
||||
use gecko_bindings::structs::nsStyleVariables;
|
||||
use gecko_bindings::sugar::ns_style_coord::{CoordDataValue, CoordData, CoordDataMut};
|
||||
|
@ -4259,25 +4259,7 @@ clip-path
|
|||
}
|
||||
}
|
||||
|
||||
pub fn set_caret_color(&mut self, v: longhands::caret_color::computed_value::T){
|
||||
use values::Either;
|
||||
|
||||
match v {
|
||||
Either::First(color) => {
|
||||
self.gecko.mCaretColor = StyleComplexColor::from(color);
|
||||
}
|
||||
Either::Second(_auto) => {
|
||||
self.gecko.mCaretColor = StyleComplexColor::auto();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn copy_caret_color_from(&mut self, other: &Self){
|
||||
self.gecko.mCaretColor = other.gecko.mCaretColor;
|
||||
}
|
||||
|
||||
<%call expr="impl_color_clone('caret_color', 'mCaretColor')"></%call>
|
||||
|
||||
<%call expr="impl_color('caret_color', 'mCaretColor', need_clone=True)"></%call>
|
||||
</%self:impl_trait>
|
||||
|
||||
<%self:impl_trait style_struct_name="Column"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue