mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +01:00
Add set and copy functions for caret_color
This commit is contained in:
parent
0aa20be89c
commit
c483f078cc
1 changed files with 18 additions and 1 deletions
|
@ -3096,7 +3096,7 @@ clip-path
|
|||
</%self:impl_trait>
|
||||
|
||||
<%self:impl_trait style_struct_name="Pointing"
|
||||
skip_longhands="cursor">
|
||||
skip_longhands="cursor caret-color">
|
||||
pub fn set_cursor(&mut self, v: longhands::cursor::computed_value::T) {
|
||||
use properties::longhands::cursor::computed_value::Keyword;
|
||||
use style_traits::cursor::Cursor;
|
||||
|
@ -3171,6 +3171,23 @@ clip-path
|
|||
Gecko_CopyCursorArrayFrom(&mut self.gecko, &other.gecko);
|
||||
}
|
||||
}
|
||||
|
||||
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 = color;
|
||||
}
|
||||
Either::Second(_auto) => {
|
||||
self.gecko.mCaretColor.auto();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn copy_caret_color_from(&mut self, other: &Self){
|
||||
self.gecko.mCaretColor = other.gecko.mCaretColor;
|
||||
}
|
||||
</%self:impl_trait>
|
||||
|
||||
<%self:impl_trait style_struct_name="Column"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue