mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1861739 - Add getter for the color interpolation method of a gradient r=layout-reviewers,emilio
Add a simple getter for the color interpolation method with is stored on each of the structs in the union. This just makes it easier to get. Differential Revision: https://phabricator.services.mozilla.com/D192105
This commit is contained in:
parent
44fa80ec1a
commit
1b8d896689
@ -461,6 +461,18 @@ inline bool StyleGradient::Repeating() const {
|
||||
template <>
|
||||
bool StyleGradient::IsOpaque() const;
|
||||
|
||||
template <>
|
||||
inline const StyleColorInterpolationMethod&
|
||||
StyleGradient::ColorInterpolationMethod() const {
|
||||
if (IsLinear()) {
|
||||
return AsLinear().color_interpolation_method;
|
||||
}
|
||||
if (IsRadial()) {
|
||||
return AsRadial().color_interpolation_method;
|
||||
}
|
||||
return AsConic().color_interpolation_method;
|
||||
}
|
||||
|
||||
template <typename Integer>
|
||||
inline StyleGenericGridLine<Integer>::StyleGenericGridLine()
|
||||
: ident(do_AddRef(static_cast<nsAtom*>(nsGkAtoms::_empty))),
|
||||
|
@ -823,6 +823,9 @@ renaming_overrides_prefixing = true
|
||||
"GenericGradient" = """
|
||||
inline bool Repeating() const;
|
||||
bool IsOpaque() const;
|
||||
|
||||
// Return the color interpolation method of the gradient.
|
||||
inline const StyleColorInterpolationMethod& ColorInterpolationMethod() const;
|
||||
"""
|
||||
|
||||
"GenericGridLine" = """
|
||||
|
Loading…
Reference in New Issue
Block a user