Bug 1552587 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

We use cbindgen to generate the c++ types of `transform property`, `individual transforms`, and `motion-path`, and all the transform-like properties (including will-change:transform) are stored in `nsStyleDisplay` (so it's easier to check whether we have transform style or not).

Recently, the size of `nsStyleDisplay` is almost _512_ bytes (after I use cbindgen for offset-path, D31164 [1]), so it's pretty hard to add new data members in `nsStyleDisplay`.

Perhaps we should move all the transform properties outside nsStyleDisplay? Not sure if there are any issues after adding a new style struct.

[1] https://phabricator.services.mozilla.com/D31164
We use cbindgen to generate the c++ types of `transform property`, `individual transforms`, and `motion-path`, and all the transform-like properties (including will-change:transform) are stored in `nsStyleDisplay` (so it's easier to check whether we have transform style or not [1]).

Recently, the size of `nsStyleDisplay` is almost _512_ bytes (after I use cbindgen for offset-path, D31164 [2]), so it's pretty hard to add new data members in `nsStyleDisplay`.

Perhaps we should move all the transform properties outside nsStyleDisplay? Not sure if there are any issues after adding a new style struct.

[1] https://searchfox.org/mozilla-central/rev/0078b9e7d42c366b102d7aec918caf64fed1d574/layout/style/nsStyleStruct.h#2114-2122
[2] https://phabricator.services.mozilla.com/D31164
Recently, the size of `nsStyleDisplay` is almost _512_ bytes (because we start to use cbindgen to generate a lot of style types to replace some UniquePtr<...>s and RefPtr<...>s), so it's pretty hard to add new data members in `nsStyleDisplay`.

Perhaps we should move all the animations/transitions/transform properties outside nsStyleDisplay? Not sure if there are any issues after adding a new style struct.

Back to Bug 1552587 Comment 0