mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 00:11:29 +00:00
Merge branch 'css-variables-crash' into 'main'
css: Fix a crash in variables Closes #6935 See merge request GNOME/gtk!7615
This commit is contained in:
commit
7da4844dcc
@ -139,6 +139,10 @@ check_references (GtkCssVariableSet *self,
|
|||||||
|
|
||||||
ref_value = g_hash_table_lookup (self->variables, GINT_TO_POINTER (ref_id));
|
ref_value = g_hash_table_lookup (self->variables, GINT_TO_POINTER (ref_id));
|
||||||
|
|
||||||
|
/* This variable was already removed, no point in checking further */
|
||||||
|
if (!ref_value)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (check_variable (self, unvisited_variables, stack, ref_id, ref_value))
|
if (check_variable (self, unvisited_variables, stack, ref_id, ref_value))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
11
testsuite/css/style/variables2.css
Normal file
11
testsuite/css/style/variables2.css
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
:root {
|
||||||
|
--b: var(--a);
|
||||||
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--a: var(--a, red);
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
background: var(--b);
|
||||||
|
}
|
9
testsuite/css/style/variables2.nodes
Normal file
9
testsuite/css/style/variables2.nodes
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
window.background:dir(ltr)
|
||||||
|
background-color: rgba(0,0,0,0); /* variables2.css:10:2-23 */
|
||||||
|
background-clip: border-box; /* variables2.css:10:2-23 */
|
||||||
|
background-origin: padding-box; /* variables2.css:10:2-23 */
|
||||||
|
background-size: auto; /* variables2.css:10:2-23 */
|
||||||
|
background-position: left top; /* variables2.css:10:2-23 */
|
||||||
|
background-repeat: repeat; /* variables2.css:10:2-23 */
|
||||||
|
background-image: none; /* variables2.css:10:2-23 */
|
||||||
|
--b: var(--a); /* variables2.css:2:8-16 */
|
7
testsuite/css/style/variables2.ui
Normal file
7
testsuite/css/style/variables2.ui
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<interface>
|
||||||
|
<object class="GtkWindow" id="window1">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="decorated">0</property>
|
||||||
|
</object>
|
||||||
|
</interface>
|
Loading…
Reference in New Issue
Block a user