mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Fix nsStyleBorder::mBorderColor for GCC.
GCC doesn't like StyleComplexColor with constructor in an anonymous struct in an anonymous union. Replace the use of a union to access `mBorder[..]Color` fields as an array with an accessor methods. Bug: 1465307 Reviewed-by: xidorn MozReview-Commit-ID: 1Wulh1qKYCZ
This commit is contained in:
parent
cdbc409759
commit
314b14d46e
1 changed files with 1 additions and 9 deletions
|
@ -388,17 +388,9 @@ impl ${style_struct.gecko_struct_name} {
|
|||
|
||||
<%!
|
||||
def get_gecko_property(ffi_name, self_param = "self"):
|
||||
if "mBorderColor" in ffi_name:
|
||||
return ffi_name.replace("mBorderColor",
|
||||
"unsafe { *%s.gecko.__bindgen_anon_1.mBorderColor.as_ref() }"
|
||||
% self_param)
|
||||
return "%s.gecko.%s" % (self_param, ffi_name)
|
||||
|
||||
def set_gecko_property(ffi_name, expr):
|
||||
if "mBorderColor" in ffi_name:
|
||||
ffi_name = ffi_name.replace("mBorderColor",
|
||||
"*self.gecko.__bindgen_anon_1.mBorderColor.as_mut()")
|
||||
return "unsafe { %s = %s };" % (ffi_name, expr)
|
||||
return "self.gecko.%s = %s;" % (ffi_name, expr)
|
||||
%>
|
||||
|
||||
|
@ -1594,7 +1586,7 @@ fn static_assert() {
|
|||
self.gecko.mComputedBorder.${side.ident} = self.gecko.mBorder.${side.ident};
|
||||
}
|
||||
|
||||
<% impl_color("border_%s_color" % side.ident, "(mBorderColor)[%s]" % side.index) %>
|
||||
<% impl_color("border_%s_color" % side.ident, "mBorder%sColor" % side.name) %>
|
||||
|
||||
<% impl_non_negative_length("border_%s_width" % side.ident,
|
||||
"mComputedBorder.%s" % side.ident,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue