Changeset 268444 in webkit
- Timestamp:
- Oct 14, 2020 12:17:43 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r268441 r268444 1 2020-10-13 Antoine Quint <graouts@webkit.org> 2 3 transform-origin is applied on top of invidivual CSS transform properties on composited layers 4 https://bugs.webkit.org/show_bug.cgi?id=217661 5 <rdar://problem/70259960> 6 7 Reviewed by Simon Fraser. 8 9 Add new tests checking that individual CSS properties render the same as the single transform property 10 when applied to a composited element. 11 12 * transforms/2d/rotate-composited-expected.html: Added. 13 * transforms/2d/rotate-composited.html: Added. 14 * transforms/2d/scale-composited-expected.html: Added. 15 * transforms/2d/scale-composited.html: Added. 16 * transforms/2d/translate-composited-expected.html: Added. 17 * transforms/2d/translate-composited.html: Added. 18 1 19 2020-10-13 Karl Rackler <rackler@apple.com> 2 20 -
trunk/Source/WebCore/ChangeLog
r268436 r268444 1 2020-10-13 Antoine Quint <graouts@webkit.org> 2 3 transform-origin is applied on top of invidivual CSS transform properties on composited layers 4 https://bugs.webkit.org/show_bug.cgi?id=217661 5 <rdar://problem/70259960> 6 7 Reviewed by Simon Fraser. 8 9 Ensure that transform origin is only applied when the RenderStyle::applyTransform() call site would 10 opt into it. This caused the call under RenderLayerBacking::updateTransform() to apply the transform 11 origin even though the resulting CALayer already relies on the anchorPoint property. 12 13 Tests: transforms/2d/rotate-composited.html 14 transforms/2d/scale-composited.html 15 transforms/2d/translate-composited.html 16 17 * rendering/style/RenderStyle.cpp: 18 (WebCore::RenderStyle::applyTransform const): 19 (WebCore::requireTransformOrigin): Deleted. 20 1 21 2020-10-13 Megan Gardner <megan_gardner@apple.com> 2 22 -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r268263 r268444 1380 1380 } 1381 1381 1382 static inline bool requireTransformOrigin(const TransformOperations& transformOperations, OptionSet<RenderStyle::TransformOperationOption> options)1383 {1384 // The transform-origin property brackets the transform with translate operations.1385 // When the only transform is a translation, the transform-origin is irrelevant.1386 return options.contains(RenderStyle::TransformOperationOption::TransformOrigin) && transformOperations.affectedByTransformOrigin();1387 }1388 1389 1382 void RenderStyle::applyTransform(TransformationMatrix& transform, const FloatRect& boundingBox, OptionSet<RenderStyle::TransformOperationOption> options) const 1390 1383 { … … 1394 1387 1395 1388 auto& transformOperations = m_rareNonInheritedData->transform->operations; 1396 bool applyTransformOrigin = m_rareNonInheritedData->rotate || m_rareNonInheritedData->scale || requireTransformOrigin(transformOperations, options);1389 bool applyTransformOrigin = options.contains(RenderStyle::TransformOperationOption::TransformOrigin) && ((m_rareNonInheritedData->rotate && !m_rareNonInheritedData->rotate->isIdentity()) || (m_rareNonInheritedData->scale && !m_rareNonInheritedData->scale->isIdentity()) || transformOperations.affectedByTransformOrigin()); 1397 1390 1398 1391 // 2. Translate by the computed X, Y, and Z values of transform-origin.
Note: See TracChangeset
for help on using the changeset viewer.