Skip to content

Commit

Permalink
Bug 1576703 - Update cbindgen. r=boris
Browse files Browse the repository at this point in the history
This cleans up the pattern of "Use a private dtor so that the helper functions
do the right thing" by enabling it everywhere using:

  mozilla/cbindgen#377

It also caught some uninitialized value issues.

I think they're mostly harmless since we zero-initialize our structs:

https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/servo/components/style/properties/gecko.mako.rs#632

And since we override the clip rect, which is the other bit of code that was
failing to build with this change.

Differential Revision: https://phabricator.services.mozilla.com/D43491

UltraBlame original commit: 6c3f50c6f6662291139bc292fb9dd77aa64331ee
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent f35d54a commit aab5756
Show file tree
Hide file tree
Showing 19 changed files with 83 additions and 918 deletions.
2 changes: 1 addition & 1 deletion build/moz.configure/bindgen.configure
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Version
.
9
.
0
1
'
)
#
Expand Down
9 changes: 8 additions & 1 deletion layout/style/FontFace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3786,8 +3786,15 @@ GetFontStyle
)
const
{
StyleComputedFontStyleDescriptor
auto
descriptor
=
StyleComputedFontStyleDescriptor
:
:
Normal
(
)
;
if
(
Expand Down
9 changes: 8 additions & 1 deletion layout/style/FontFaceSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1535,8 +1535,15 @@ ErrorResult
aRv
)
{
StyleComputedFontStyleDescriptor
auto
style
=
StyleComputedFontStyleDescriptor
:
:
Normal
(
)
;
float
stretch
Expand Down
21 changes: 21 additions & 0 deletions layout/style/GeckoBindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7130,6 +7130,17 @@ MOZ_ASSERT
aImage
)
;
auto
zero
=
StyleNumberOrPercentage
:
:
Number
(
0
)
;
aImage
-
>
Expand All @@ -7143,6 +7154,16 @@ nsStyleImage
CropRect
>
(
nsStyleImage
:
:
CropRect
{
zero
zero
zero
zero
}
)
)
;
Expand Down
36 changes: 36 additions & 0 deletions layout/style/nsStyleStruct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3681,6 +3681,15 @@ Auto
(
)
)
mImageRegion
(
StyleClipRectOrAuto
:
:
Auto
(
)
)
mMozListReversed
(
StyleMozListReversed
Expand Down Expand Up @@ -17709,6 +17718,33 @@ mLineClamp
(
0
)
mRotate
(
StyleRotate
:
:
None
(
)
)
mTranslate
(
StyleTranslate
:
:
None
(
)
)
mScale
(
StyleScale
:
:
None
(
)
)
mBackfaceVisibility
(
NS_STYLE_BACKFACE_VISIBILITY_VISIBLE
Expand Down
19 changes: 0 additions & 19 deletions servo/components/style/values/computed/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1464,25 +1464,6 @@ emphasis
-
style
property
/
/
/
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
derive
Expand Down
19 changes: 0 additions & 19 deletions servo/components/style/values/generics/effects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,25 +193,6 @@ a
single
filter
.
/
/
/
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
cfg_attr
Expand Down
76 changes: 0 additions & 76 deletions servo/components/style/values/generics/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1461,25 +1461,6 @@ track
-
breadth
>
/
/
/
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
derive
Expand Down Expand Up @@ -1749,25 +1730,6 @@ track
-
size
>
/
/
/
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
derive
Expand Down Expand Up @@ -3649,25 +3611,6 @@ track
-
repeat
>
/
/
/
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
derive
Expand Down Expand Up @@ -5216,25 +5159,6 @@ template
-
columns
>
/
/
/
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
derive
Expand Down
54 changes: 0 additions & 54 deletions servo/components/style/values/generics/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,6 @@ paint
server
value
.
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
derive
Expand Down Expand Up @@ -244,25 +228,6 @@ html
#
SpecifyingPaint
>
/
/
/
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
animation
Expand Down Expand Up @@ -425,25 +390,6 @@ fallback
as
well
.
/
/
/
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
animation
Expand Down
16 changes: 0 additions & 16 deletions servo/components/style/values/generics/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -929,22 +929,6 @@ of
a
transform
value
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
pub
enum
GenericTransformOperation
Expand Down
Loading

0 comments on commit aab5756

Please sign in to comment.