Fix interpolation of perspective property
Created attachment 423018 [details] Patch
Comment on attachment 423018 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423018&action=review > Source/WebCore/rendering/style/RenderStyle.h:719 > + bool hasPerspective() const { return m_rareNonInheritedData->perspective != -1; } Maybe this could compare against initialPerspective() instead of -1 to be less magical. > Source/WebCore/style/StyleBuilderConverter.h:1229 > - return 0.f; > + return -1; Similarly this could return RenderStyle::initialPerspective().
(In reply to Antti Koivisto from comment #2) > Comment on attachment 423018 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=423018&action=review > > > Source/WebCore/rendering/style/RenderStyle.h:719 > > + bool hasPerspective() const { return m_rareNonInheritedData->perspective != -1; } > > Maybe this could compare against initialPerspective() instead of -1 to be > less magical. > > > Source/WebCore/style/StyleBuilderConverter.h:1229 > > - return 0.f; > > + return -1; > > Similarly this could return RenderStyle::initialPerspective(). Yes, good points. Even though the initial value could be something other than "none", it's unlikely to change and it'd be more explicit than -1.
Committed r274329 (235217@main): <https://commits.webkit.org/235217@main>
<rdar://problem/75353982>