Summary: | Improve blending of Length and other Length-related types | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antoine Quint <graouts> | ||||||||
Component: | Animations | Assignee: | Antoine Quint <graouts> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | dino, graouts, koivisto, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=228811 | ||||||||||
Attachments: |
|
Description
Antoine Quint
2021-03-05 12:25:32 PST
Created attachment 422394 [details]
Patch for EWS
Created attachment 422482 [details]
Patch for EWS
Created attachment 422490 [details]
Patch
*** Bug 222514 has been marked as a duplicate of this bug. *** Comment on attachment 422490 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=422490&action=review > Source/WebCore/animation/CSSPropertyAnimation.cpp:703 > class LengthPropertyWrapper : public PropertyWrapperGetter<const Length&> { > WTF_MAKE_FAST_ALLOCATED; > public: > - LengthPropertyWrapper(CSSPropertyID prop, const Length& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(Length&&)) > + enum class Flags { > + IsLengthPercentage = 1 << 0, > + NegativeLengthsAreInvalid = 1 << 1, > + }; > + LengthPropertyWrapper(CSSPropertyID prop, const Length& (RenderStyle::*getter)() const, void (RenderStyle::*setter)(Length&&), OptionSet<Flags> flags = { }) I think you could make the flags a template argument instead as they are fixed for a given property type. Not sure if this has much practical significance though and could be done separately. > Source/WebCore/animation/CSSPropertyAnimation.cpp:712 > - return !this->value(a).isAuto() && !this->value(b).isAuto(); > + return canInterpolateLengths(this->value(a), this->value(b), m_flags.contains(Flags::IsLengthPercentage)); Then canInterpolateLengths would also take IsLengthPercentage as template argument. Committed r274038: <https://commits.webkit.org/r274038> All reviewed patches have been landed. Closing bug and clearing flags on attachment 422490 [details]. |