mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Support outline-width in geckolib.
This commit is contained in:
parent
4c249968d9
commit
0c92350479
2 changed files with 6 additions and 3 deletions
|
@ -4700,7 +4700,7 @@ pub struct nsStyleOutline {
|
||||||
pub mOutlineRadius: nsStyleCorners,
|
pub mOutlineRadius: nsStyleCorners,
|
||||||
pub mOutlineWidth: nsStyleCoord,
|
pub mOutlineWidth: nsStyleCoord,
|
||||||
pub mOutlineOffset: nscoord,
|
pub mOutlineOffset: nscoord,
|
||||||
pub mCachedOutlineWidth: nscoord,
|
pub mActualOutlineWidth: nscoord,
|
||||||
pub mOutlineColor: nscolor,
|
pub mOutlineColor: nscolor,
|
||||||
pub mOutlineStyle: u8,
|
pub mOutlineStyle: u8,
|
||||||
pub mTwipsPerPixel: nscoord,
|
pub mTwipsPerPixel: nscoord,
|
||||||
|
|
|
@ -555,7 +555,7 @@ fn static_assert() {
|
||||||
% endfor
|
% endfor
|
||||||
</%self:impl_trait>
|
</%self:impl_trait>
|
||||||
|
|
||||||
<% skip_outline_longhands = " ".join("outline-color outline-style".split() +
|
<% skip_outline_longhands = " ".join("outline-color outline-style outline-width".split() +
|
||||||
["-moz-outline-radius-{0}".format(x.ident.replace("_", ""))
|
["-moz-outline-radius-{0}".format(x.ident.replace("_", ""))
|
||||||
for x in CORNERS]) %>
|
for x in CORNERS]) %>
|
||||||
<%self:impl_trait style_struct_name="Outline"
|
<%self:impl_trait style_struct_name="Outline"
|
||||||
|
@ -566,6 +566,9 @@ fn static_assert() {
|
||||||
|
|
||||||
<% impl_color("outline_color", "mOutlineColor", color_flags_ffi_name="mOutlineStyle") %>
|
<% impl_color("outline_color", "mOutlineColor", color_flags_ffi_name="mOutlineStyle") %>
|
||||||
|
|
||||||
|
<% impl_app_units("outline_width", "mActualOutlineWidth", need_clone=False,
|
||||||
|
round_to_pixels=True) %>
|
||||||
|
|
||||||
% for corner in CORNERS:
|
% for corner in CORNERS:
|
||||||
<% impl_corner_style_coord("_moz_outline_radius_%s" % corner.ident.replace("_", ""),
|
<% impl_corner_style_coord("_moz_outline_radius_%s" % corner.ident.replace("_", ""),
|
||||||
"mOutlineRadius.mUnits[%s]" % corner.x_index,
|
"mOutlineRadius.mUnits[%s]" % corner.x_index,
|
||||||
|
@ -575,7 +578,7 @@ fn static_assert() {
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
fn outline_has_nonzero_width(&self) -> bool {
|
fn outline_has_nonzero_width(&self) -> bool {
|
||||||
self.gecko.mCachedOutlineWidth != 0
|
self.gecko.mActualOutlineWidth != 0
|
||||||
}
|
}
|
||||||
</%self:impl_trait>
|
</%self:impl_trait>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue