Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
perspective calc() values aren't clipped to 0
https://bugs.webkit.org/show_bug.cgi?id=249151 Reviewed by Simon Fraser and Dean Jackson. The "perspective" property is specified to only allow non-negative values, see https://www.w3.org/TR/css-transforms-2/#perspective-property. However, we don't clip values that are computed to less than 0, for instance using a calc() expression. Instead, we deem them invalid internally and thus consider as if "none" was provided, which has implications when blending. Indeed, when interpolating between a valid value and "none", we use discrete interpolation. We now correctly clip values below 0. Note that the relevant WPT test still fails, because the test itself is not valid. It is being addressed in a dedicated WPT PR and will be imported back into WebKit yielding a PASS result. See web-platform-tests/wpt#37457. * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/perspective-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/perspective-expected.txt: * Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp: (WebCore::CSSPropertyParserHelpers::consumePerspective): Canonical link: https://commits.webkit.org/257779@main
- Loading branch information