[gtk/matthiasc/for-main: 4/5] css: Fix handling of transform values




commit 6ef39682270685a078f292f1f2e02b0a90f9c399
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jul 18 06:59:39 2022 -0500

    css: Fix handling of transform values
    
    When computing a transform value, there is nothing
    to do, but we still need to copy the matrix from
    src to dest, since it depends on the other transforms
    in the array whether we are using the src or the
    dest in the end.
    
    This fixes cases like
    -gtk-icon-transform: perspective(100px) matrix(1,2,...);
    which would otherwise end up with a zero matrix.

 gtk/gtkcsstransformvalue.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gtk/gtkcsstransformvalue.c b/gtk/gtkcsstransformvalue.c
index 0b59cdee87..636fd553cf 100644
--- a/gtk/gtkcsstransformvalue.c
+++ b/gtk/gtkcsstransformvalue.c
@@ -287,6 +287,7 @@ gtk_css_transform_compute (GtkCssTransform  *dest,
   switch (src->type)
     {
     case GTK_CSS_TRANSFORM_MATRIX:
+      memcpy (dest, src, sizeof (GtkCssTransform));
       return TRUE;
     case GTK_CSS_TRANSFORM_TRANSLATE:
       dest->translate.x = _gtk_css_value_compute (src->translate.x, property_id, provider, style, 
parent_style);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]