mirror of
https://github.com/servo/servo.git
synced 2025-08-27 16:18:21 +01:00
Support {flood,lighting,stop,text-decoration}-color in geckolib.
This commit is contained in:
parent
174680f98c
commit
330c47f78e
4 changed files with 54 additions and 0 deletions
|
@ -546,6 +546,39 @@ fn static_assert() {
|
|||
|
||||
</%self:impl_trait>
|
||||
|
||||
<%self:impl_trait style_struct_name="Text"
|
||||
skip_longhands="text-decoration-color"
|
||||
skip_additionals="*">
|
||||
|
||||
<% impl_color("text_decoration_color", "mTextDecorationColor",
|
||||
color_flags_ffi_name="mTextDecorationStyle") %>
|
||||
|
||||
fn has_underline(&self) -> bool {
|
||||
use gecko_style_structs as gss;
|
||||
(self.gecko.mTextDecorationStyle & (gss::NS_STYLE_TEXT_DECORATION_LINE_UNDERLINE as u8)) != 0
|
||||
}
|
||||
fn has_overline(&self) -> bool {
|
||||
use gecko_style_structs as gss;
|
||||
(self.gecko.mTextDecorationStyle & (gss::NS_STYLE_TEXT_DECORATION_LINE_OVERLINE as u8)) != 0
|
||||
}
|
||||
fn has_line_through(&self) -> bool {
|
||||
use gecko_style_structs as gss;
|
||||
(self.gecko.mTextDecorationStyle & (gss::NS_STYLE_TEXT_DECORATION_LINE_LINE_THROUGH as u8)) != 0
|
||||
}
|
||||
</%self:impl_trait>
|
||||
|
||||
<%self:impl_trait style_struct_name="SVG"
|
||||
skip_longhands="flood-color lighting-color stop-color"
|
||||
skip_additionals="*">
|
||||
|
||||
<% impl_color("flood_color", "mFloodColor") %>
|
||||
|
||||
<% impl_color("lighting_color", "mLightingColor") %>
|
||||
|
||||
<% impl_color("stop_color", "mStopColor") %>
|
||||
|
||||
</%self:impl_trait>
|
||||
|
||||
<%def name="define_ffi_struct_accessor(style_struct)">
|
||||
#[no_mangle]
|
||||
#[allow(non_snake_case, unused_variables)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue