Split has_custom_compare_and_copy in ComputedStyleExtraFields.json5.
There are some fields in ComputedStyleBase that do not appear in
CopyNonInheritedFromCached and NonInheritedEqual. The way we prevented
these fields from being generated in these functions is through a
parameter called has_custom_compare_and_copy in ComputedStyleExtraFields
.json5. When it is true, we do not generate code for these fields
inside those functions.
However, some fields, such as HasViewportUnits, do not appear in
NonInheritedEqual but appear in CopyNonInheritedFromCached, or vice
versa. Setting has_custom_compare_and_copy to true would've removed
generated code for both functions, which is not ideal.
This patch splits has_custom_compare_and_copy into custom_copy and
custom_compare. This allows a field to have no generated compare or
copy, or have neither.
This patch also sets the fields HasViewportUnits and HasRemUnits
to have generated copy but not compare, allowing us to remove the
corresponding handwritten code in ComputedStyle.
Diff of generated files:
5 files changed