Changeset 268547 in webkit
- Timestamp:
- Oct 15, 2020 12:49:00 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r268545 r268547 1 2020-10-15 Antoine Quint <graouts@webkit.org> 2 3 Updating an individual transform CSS property has no visual change when composited 4 https://bugs.webkit.org/show_bug.cgi?id=217769 5 <rdar://problem/70344280> 6 7 Reviewed by Simon Fraser. 8 9 Add new tests that check that changing the value of one of the individual transform 10 CSS properties when the element is composited yields a visual change. 11 12 * transforms/2d/rotate-change-composited-expected.html: Added. 13 * transforms/2d/rotate-change-composited.html: Added. 14 * transforms/2d/scale-change-composited-expected.html: Added. 15 * transforms/2d/scale-change-composited.html: Added. 16 * transforms/2d/translate-change-composited-expected.html: Added. 17 * transforms/2d/translate-change-composited.html: Added. 18 1 19 2020-10-15 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 20 -
trunk/Source/WebCore/ChangeLog
r268546 r268547 1 2020-10-15 Antoine Quint <graouts@webkit.org> 2 3 Updating an individual transform CSS property has no visual change when composited 4 https://bugs.webkit.org/show_bug.cgi?id=217769 5 <rdar://problem/70344280> 6 7 Reviewed by Simon Fraser. 8 9 Ensure that changes to the translate, scale and rotate CSS properties have the same 10 effect than when the transform property is changed for composited elements. 11 12 Tests: transforms/2d/rotate-change-composited.html 13 transforms/2d/scale-change-composited.html 14 transforms/2d/translate-change-composited.html 15 16 * platform/graphics/transforms/RotateTransformOperation.h: 17 * platform/graphics/transforms/ScaleTransformOperation.h: 18 * platform/graphics/transforms/TranslateTransformOperation.h: 19 * rendering/RenderLayerCompositor.cpp: 20 (WebCore::recompositeChangeRequiresGeometryUpdate): 21 (WebCore::styleHas3DTransformOperation): 22 (WebCore::styleTransformOperationsAreRepresentableIn2D): 23 (WebCore::RenderLayerCompositor::requiresCompositingForTransform const): 24 (WebCore::RenderLayerCompositor::layerHas3DContent const): 25 1 26 2020-10-15 Fujii Hironori <Hironori.Fujii@sony.com> 2 27 -
trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.h
r268173 r268547 58 58 bool isIdentity() const final { return !m_angle; } 59 59 60 bool isRepresentableIn2D() const final { return (!m_x && !m_y) || !m_angle; } 61 60 62 private: 61 63 bool isAffectedByTransformOrigin() const override { return !isIdentity(); } 62 bool isRepresentableIn2D() const final { return (!m_x && !m_y) || !m_angle; }63 64 64 65 bool apply(TransformationMatrix& transform, const FloatSize& /*borderBoxSize*/) const override -
trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.h
r268173 r268547 57 57 bool isIdentity() const final { return m_x == 1 && m_y == 1 && m_z == 1; } 58 58 59 bool isRepresentableIn2D() const final { return m_z == 1; } 60 59 61 private: 60 62 bool isAffectedByTransformOrigin() const override { return !isIdentity(); } 61 bool isRepresentableIn2D() const final { return m_z == 1; }62 63 63 64 bool apply(TransformationMatrix& transform, const FloatSize&) const override -
trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h
r268173 r268547 69 69 Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) final; 70 70 71 bool isRepresentableIn2D() const final { return m_z.isZero(); } 72 71 73 private: 72 bool isRepresentableIn2D() const final { return m_z.isZero(); }73 74 74 75 void dump(WTF::TextStream&) const final; -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r268075 r268547 1596 1596 { 1597 1597 return oldStyle.transform() != newStyle.transform() 1598 || oldStyle.translate() != newStyle.translate() 1599 || oldStyle.scale() != newStyle.scale() 1600 || oldStyle.rotate() != newStyle.rotate() 1598 1601 || oldStyle.transformOriginX() != newStyle.transformOriginX() 1599 1602 || oldStyle.transformOriginY() != newStyle.transformOriginY() … … 2977 2980 } 2978 2981 2982 static bool styleHas3DTransformOperation(const RenderStyle& style) 2983 { 2984 return style.transform().has3DOperation() 2985 || (style.translate() && style.translate()->is3DOperation()) 2986 || (style.scale() && style.scale()->is3DOperation()) 2987 || (style.rotate() && style.rotate()->is3DOperation()); 2988 } 2989 2990 static bool styleTransformOperationsAreRepresentableIn2D(const RenderStyle& style) 2991 { 2992 return style.transform().isRepresentableIn2D() 2993 && (!style.translate() || style.translate()->isRepresentableIn2D()) 2994 && (!style.scale() || style.scale()->isRepresentableIn2D()) 2995 && (!style.rotate() || style.rotate()->isRepresentableIn2D()); 2996 } 2997 2979 2998 bool RenderLayerCompositor::requiresCompositingForTransform(RenderLayerModelObject& renderer) const 2980 2999 { … … 2989 3008 switch (m_compositingPolicy) { 2990 3009 case CompositingPolicy::Normal: 2991 return renderer.style().transform().has3DOperation();3010 return styleHas3DTransformOperation(renderer.style()); 2992 3011 case CompositingPolicy::Conservative: 2993 3012 // Continue to allow pages to avoid the very slow software filter path. 2994 if ( renderer.style().transform().has3DOperation() && renderer.hasFilter())3013 if (styleHas3DTransformOperation(renderer.style()) && renderer.hasFilter()) 2995 3014 return true; 2996 return renderer.style().transform().isRepresentableIn2D() ? false : true;3015 return styleTransformOperationsAreRepresentableIn2D(renderer.style()) ? false : true; 2997 3016 } 2998 3017 return false; … … 4269 4288 const RenderStyle& style = layer.renderer().style(); 4270 4289 4271 if (style.transformStyle3D() == TransformStyle3D::Preserve3D || style.hasPerspective() || style .transform().has3DOperation())4290 if (style.transformStyle3D() == TransformStyle3D::Preserve3D || style.hasPerspective() || styleHas3DTransformOperation(style)) 4272 4291 return true; 4273 4292
Note: See TracChangeset
for help on using the changeset viewer.