mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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 mOutlineWidth: nsStyleCoord,
|
||||
pub mOutlineOffset: nscoord,
|
||||
pub mCachedOutlineWidth: nscoord,
|
||||
pub mActualOutlineWidth: nscoord,
|
||||
pub mOutlineColor: nscolor,
|
||||
pub mOutlineStyle: u8,
|
||||
pub mTwipsPerPixel: nscoord,
|
||||
|
|
|
@ -555,7 +555,7 @@ fn static_assert() {
|
|||
% endfor
|
||||
</%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("_", ""))
|
||||
for x in CORNERS]) %>
|
||||
<%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_app_units("outline_width", "mActualOutlineWidth", need_clone=False,
|
||||
round_to_pixels=True) %>
|
||||
|
||||
% for corner in CORNERS:
|
||||
<% impl_corner_style_coord("_moz_outline_radius_%s" % corner.ident.replace("_", ""),
|
||||
"mOutlineRadius.mUnits[%s]" % corner.x_index,
|
||||
|
@ -575,7 +578,7 @@ fn static_assert() {
|
|||
% endfor
|
||||
|
||||
fn outline_has_nonzero_width(&self) -> bool {
|
||||
self.gecko.mCachedOutlineWidth != 0
|
||||
self.gecko.mActualOutlineWidth != 0
|
||||
}
|
||||
</%self:impl_trait>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue