Merge branch 'wip/otte/for-main' into 'main'

widget: Don't queue an allocate on a nonexisting parent

See merge request GNOME/gtk!4288
This commit is contained in:
Benjamin Otte 2021-12-26 23:20:34 +00:00
commit df8588e9b7
6 changed files with 10 additions and 2 deletions

View File

@ -942,7 +942,7 @@ _gtk_css_transform_value_parse (GtkCssParser *parser)
while (TRUE)
{
GtkCssTransform transform;
GtkCssTransform transform = { 0, };
if (gtk_css_parser_has_function (parser, "matrix"))
{

View File

@ -4971,7 +4971,8 @@ gtk_widget_real_css_changed (GtkWidget *widget,
{
gtk_widget_queue_resize (widget);
}
else if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TRANSFORM))
else if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TRANSFORM) &&
priv->parent)
{
gtk_widget_queue_allocate (priv->parent);
}

View File

@ -452,6 +452,9 @@ test_data = [
'radial-positions.errors',
'radial-positions.ref.css',
'radial.ref.css',
'rotate3d-crash.css',
'rotate3d-crash.errors',
'rotate3d-crash.ref.css',
'selector.css',
'selector.ref.css',
'selector-original.css',

View File

@ -0,0 +1,3 @@
* {
transform: rotate3d(90,90,90);
}

View File

@ -0,0 +1 @@
rotate3d-crash.css:2:31-32: error: GTK_CSS_PARSER_ERROR_SYNTAX