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 4afff98 commit b59b2e0
Show file tree
Hide file tree
Showing 19 changed files with 83 additions and 882 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 @@ -2840,8 +2840,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 @@ -1193,8 +1193,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 @@ -6317,6 +6317,17 @@ MOZ_ASSERT
aImage
)
;
auto
zero
=
StyleNumberOrPercentage
:
:
Number
(
0
)
;
aImage
-
>
Expand All @@ -6330,6 +6341,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 @@ -2717,6 +2717,15 @@ Auto
(
)
)
mImageRegion
(
StyleClipRectOrAuto
:
:
Auto
(
)
)
mMozListReversed
(
StyleMozListReversed
Expand Down Expand Up @@ -13857,6 +13866,33 @@ mLineClamp
(
0
)
mRotate
(
StyleRotate
:
:
None
(
)
)
mTranslate
(
StyleTranslate
:
:
None
(
)
)
mScale
(
StyleScale
:
:
None
(
)
)
mBackfaceVisibility
(
NS_STYLE_BACKFACE_VISIBILITY_VISIBLE
Expand Down
16 changes: 0 additions & 16 deletions servo/components/style/values/computed/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,22 +941,6 @@ LINE_THROUGH
result
}
}
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
derive
Expand Down
16 changes: 0 additions & 16 deletions servo/components/style/values/generics/effects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,6 @@ GenericBoxShadow
as
BoxShadow
;
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
cfg_attr
Expand Down
64 changes: 0 additions & 64 deletions servo/components/style/values/generics/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -896,22 +896,6 @@ grid_line
)
}
}
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
derive
Expand Down Expand Up @@ -1011,22 +995,6 @@ Breadth
)
}
}
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
derive
Expand Down Expand Up @@ -2189,22 +2157,6 @@ Ok
)
}
}
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
derive
Expand Down Expand Up @@ -3308,22 +3260,6 @@ Ok
)
}
}
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
derive
Expand Down
48 changes: 0 additions & 48 deletions servo/components/style/values/generics/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,6 @@ style_traits
:
ParseError
;
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
derive
Expand Down Expand Up @@ -96,22 +80,6 @@ GenericSVGPaintFallback
as
SVGPaintFallback
;
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
animation
Expand Down Expand Up @@ -219,22 +187,6 @@ Unset
}
}
}
/
/
/
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 @@ -798,22 +798,6 @@ C
u8
)
]
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
pub
enum
GenericTransformOperation
Expand Down
16 changes: 0 additions & 16 deletions servo/components/style/values/generics/url.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/
/
/
cbindgen
:
derive
-
tagged
-
enum
-
copy
-
constructor
=
true
#
[
derive
Expand Down
Loading

0 comments on commit b59b2e0

Please sign in to comment.