summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-12-24 07:13:22 +0000
committerMatthias Clasen <mclasen@redhat.com>2020-12-24 07:13:22 +0000
commit7e579bb59a650e61f21e9bf13fe3ded3f6b571dc (patch)
tree3a622e8c0c81bb756be5d37d3f2f270603a7c939
parent7d6877ec80f6351541ca1bcac6ae21569954db98 (diff)
parent96e1b85c2cfec83961b2a667833155cef3a4b073 (diff)
downloadgtk+-7e579bb59a650e61f21e9bf13fe3ded3f6b571dc.tar.gz
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master See merge request GNOME/gtk!2997
-rw-r--r--demos/gtk-demo/main.ui42
-rw-r--r--docs/reference/gsk/gsk4-sections.txt27
-rw-r--r--gdk/gdkarrayimpl.c11
-rw-r--r--gsk/gskrendernodeimpl.c10
-rw-r--r--gtk/gtkactionmuxer.c2
-rw-r--r--gtk/gtkcssselector.c2
-rw-r--r--gtk/gtklistview.c5
-rw-r--r--gtk/gtkmultifilter.c2
-rw-r--r--gtk/gtkmultisorter.c2
-rw-r--r--gtk/gtkpicture.c2
-rw-r--r--gtk/gtkroundedbox.c142
-rw-r--r--gtk/gtkroundedboxprivate.h16
-rw-r--r--gtk/gtksnapshot.c4
-rw-r--r--gtk/gtkstringlist.c2
-rw-r--r--gtk/gtkvideo.c5
-rw-r--r--testsuite/gdk/arrayimpl.c2
-rw-r--r--testsuite/gsk/compare/invalid-transform.node16
-rw-r--r--testsuite/gsk/compare/invalid-transform.pngbin0 -> 86 bytes
-rw-r--r--testsuite/gsk/meson.build1
19 files changed, 95 insertions, 198 deletions
diff --git a/demos/gtk-demo/main.ui b/demos/gtk-demo/main.ui
index b4161c9519..b602c9a246 100644
--- a/demos/gtk-demo/main.ui
+++ b/demos/gtk-demo/main.ui
@@ -53,31 +53,30 @@
<child>
<object class="GtkBox">
<child>
- <object class="GtkScrolledWindow">
- <style>
- <class name="sidebar"/>
- </style>
- <property name="width-request">120</property>
- <property name="hscrollbar-policy">never</property>
- <property name="min-content-width">150</property>
+ <object class="GtkBox">
+ <property name="width-request">220</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkBox">
- <property name="width-request">220</property>
- <property name="orientation">vertical</property>
-
+ <object class="GtkSearchBar" id="searchbar">
+ <property name="key-capture-widget">window</property>
<child>
- <object class="GtkSearchBar" id="searchbar">
- <property name="key-capture-widget">window</property>
- <child>
- <object class="GtkSearchEntry" id="search-entry">
- <accessibility>
- <relation name="controls">listview</relation>
- </accessibility>
- </object>
- </child>
+ <object class="GtkSearchEntry" id="search-entry">
+ <accessibility>
+ <relation name="controls">listview</relation>
+ </accessibility>
</object>
</child>
-
+ </object>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow">
+ <style>
+ <class name="sidebar"/>
+ </style>
+ <property name="width-request">120</property>
+ <property name="hscrollbar-policy">never</property>
+ <property name="min-content-width">150</property>
+ <property name="vexpand">1</property>
<child>
<object class="GtkListView" id="listview">
<style>
@@ -94,7 +93,6 @@
</accessibility>
</object>
</child>
-
</object>
</child>
</object>
diff --git a/docs/reference/gsk/gsk4-sections.txt b/docs/reference/gsk/gsk4-sections.txt
index 78d5bb0a10..e4a10930ae 100644
--- a/docs/reference/gsk/gsk4-sections.txt
+++ b/docs/reference/gsk/gsk4-sections.txt
@@ -98,19 +98,22 @@ gsk_render_node_write_to_file
GskScalingFilter
gsk_render_node_get_bounds
-<SUBSECTION Nodes>
+<SUBSECTION>
gsk_color_node_new
gsk_color_node_get_color
gsk_texture_node_new
gsk_texture_node_get_texture
+<SUBSECTION>
GskColorStop
gsk_linear_gradient_node_new
+gsk_repeating_linear_gradient_node_new
gsk_linear_gradient_node_get_start
gsk_linear_gradient_node_get_end
gsk_linear_gradient_node_get_n_color_stops
gsk_linear_gradient_node_get_color_stops
-gsk_repeating_linear_gradient_node_new
+<SUBSECTION>
gsk_radial_gradient_node_new
+gsk_repeating_radial_gradient_node_new
gsk_radial_gradient_node_get_n_color_stops
gsk_radial_gradient_node_get_color_stops
gsk_radial_gradient_node_get_start
@@ -118,16 +121,18 @@ gsk_radial_gradient_node_get_end
gsk_radial_gradient_node_get_hradius
gsk_radial_gradient_node_get_vradius
gsk_radial_gradient_node_get_center
-gsk_repeating_radial_gradient_node_new
+<SUBSECTION>
gsk_conic_gradient_node_new
gsk_conic_gradient_node_get_n_color_stops
gsk_conic_gradient_node_get_color_stops
gsk_conic_gradient_node_get_center
gsk_conic_gradient_node_get_rotation
+<SUBSECTION>
gsk_border_node_new
gsk_border_node_get_outline
gsk_border_node_get_widths
gsk_border_node_get_colors
+<SUBSECTION>
gsk_inset_shadow_node_new
gsk_inset_shadow_node_get_outline
gsk_inset_shadow_node_get_color
@@ -135,6 +140,7 @@ gsk_inset_shadow_node_get_dx
gsk_inset_shadow_node_get_dy
gsk_inset_shadow_node_get_spread
gsk_inset_shadow_node_get_blur_radius
+<SUBSECTION>
gsk_outset_shadow_node_new
gsk_outset_shadow_node_get_outline
gsk_outset_shadow_node_get_color
@@ -142,45 +148,57 @@ gsk_outset_shadow_node_get_dx
gsk_outset_shadow_node_get_dy
gsk_outset_shadow_node_get_spread
gsk_outset_shadow_node_get_blur_radius
+<SUBSECTION>
gsk_cairo_node_new
gsk_cairo_node_get_draw_context
gsk_cairo_node_get_surface
+<SUBSECTION>
gsk_container_node_new
gsk_container_node_get_n_children
gsk_container_node_get_child
+<SUBSECTION>
gsk_transform_node_new
gsk_transform_node_get_child
gsk_transform_node_get_transform
+<SUBSECTION>
gsk_opacity_node_new
gsk_opacity_node_get_child
gsk_opacity_node_get_opacity
+<SUBSECTION>
gsk_color_matrix_node_new
gsk_color_matrix_node_get_child
gsk_color_matrix_node_get_color_matrix
gsk_color_matrix_node_get_color_offset
+<SUBSECTION>
gsk_repeat_node_new
gsk_repeat_node_get_child
gsk_repeat_node_get_child_bounds
+<SUBSECTION>
gsk_clip_node_new
gsk_clip_node_get_child
gsk_clip_node_get_clip
+<SUBSECTION>
gsk_rounded_clip_node_new
gsk_rounded_clip_node_get_child
gsk_rounded_clip_node_get_clip
+<SUBSECTION>
GskShadow
gsk_shadow_node_new
gsk_shadow_node_get_shadow
gsk_shadow_node_get_n_shadows
gsk_shadow_node_get_child
+<SUBSECTION>
GskBlendMode
gsk_blend_node_new
gsk_blend_node_get_bottom_child
gsk_blend_node_get_top_child
gsk_blend_node_get_blend_mode
+<SUBSECTION>
gsk_cross_fade_node_new
gsk_cross_fade_node_get_start_child
gsk_cross_fade_node_get_end_child
gsk_cross_fade_node_get_progress
+<SUBSECTION>
gsk_text_node_new
gsk_text_node_get_font
gsk_text_node_get_glyphs
@@ -188,12 +206,15 @@ gsk_text_node_get_color
gsk_text_node_has_color_glyphs
gsk_text_node_get_num_glyphs
gsk_text_node_get_offset
+<SUBSECTION>
gsk_blur_node_new
gsk_blur_node_get_child
gsk_blur_node_get_radius
+<SUBSECTION>
gsk_debug_node_new
gsk_debug_node_get_child
gsk_debug_node_get_message
+<SUBSECTION>
gsk_gl_shader_node_new
gsk_gl_shader_node_get_n_children
gsk_gl_shader_node_get_child
diff --git a/gdk/gdkarrayimpl.c b/gdk/gdkarrayimpl.c
index 003c67fd59..a18ab5e33d 100644
--- a/gdk/gdkarrayimpl.c
+++ b/gdk/gdkarrayimpl.c
@@ -182,6 +182,7 @@ G_GNUC_UNUSED static inline void
gdk_array(splice) (GdkArray *self,
gsize pos,
gsize removed,
+ gboolean stolen,
_T_ *additions,
gsize added)
{
@@ -192,8 +193,9 @@ gdk_array(splice) (GdkArray *self,
g_assert (pos + removed <= size);
remaining = size - pos - removed;
- gdk_array(free_elements) (gdk_array(index) (self, pos),
- gdk_array(index) (self, pos + removed));
+ if (!stolen)
+ gdk_array(free_elements) (gdk_array(index) (self, pos),
+ gdk_array(index) (self, pos + removed));
gdk_array(reserve) (self, size - removed + added);
@@ -225,9 +227,9 @@ gdk_array(set_size) (GdkArray *self,
{
gsize old_size = gdk_array(get_size) (self);
if (new_size > old_size)
- gdk_array(splice) (self, old_size, 0, NULL, new_size - old_size);
+ gdk_array(splice) (self, old_size, 0, FALSE, NULL, new_size - old_size);
else
- gdk_array(splice) (self, new_size, old_size - new_size, NULL, 0);
+ gdk_array(splice) (self, new_size, old_size - new_size, FALSE, NULL, 0);
}
G_GNUC_UNUSED static void
@@ -241,6 +243,7 @@ gdk_array(append) (GdkArray *self,
gdk_array(splice) (self,
gdk_array(get_size) (self),
0,
+ FALSE,
#ifdef GDK_ARRAY_BY_VALUE
value,
#else
diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c
index 8606faf857..acc6f529a1 100644
--- a/gsk/gskrendernodeimpl.c
+++ b/gsk/gskrendernodeimpl.c
@@ -2762,6 +2762,16 @@ gsk_transform_node_draw (GskRenderNode *node,
ctm.xx, ctm.yx,
ctm.xy, ctm.yy,
ctm.x0, ctm.y0));
+ if (xx * yy == xy * yx)
+ {
+ /* broken matrix here. This can happen during transitions
+ * (like when flipping an axis at the point where scale == 0)
+ * and just means that nothing should be drawn.
+ * But Cairo thows lots of ugly errors instead of silently
+ * going on. So We silently go on.
+ */
+ return;
+ }
cairo_transform (cr, &ctm);
gsk_render_node_draw (self->child, cr);
diff --git a/gtk/gtkactionmuxer.c b/gtk/gtkactionmuxer.c
index fad926ceaf..fb3c4fb5a3 100644
--- a/gtk/gtkactionmuxer.c
+++ b/gtk/gtkactionmuxer.c
@@ -100,7 +100,7 @@ gtk_accels_remove (GtkAccels *accels,
position = gtk_accels_find (accels, action_and_target);
if (position < gtk_accels_get_size (accels))
- gtk_accels_splice (accels, position, 1, NULL, 0);
+ gtk_accels_splice (accels, position, 1, FALSE, NULL, 0);
}
/*< private >
diff --git a/gtk/gtkcssselector.c b/gtk/gtkcssselector.c
index b8ef92a9ae..f04a6fe7c5 100644
--- a/gtk/gtkcssselector.c
+++ b/gtk/gtkcssselector.c
@@ -167,7 +167,7 @@ gtk_css_selector_matches_insert_sorted (GtkCssSelectorMatches *matches,
break;
}
- gtk_css_selector_matches_splice (matches, i, 0, (gpointer[1]) { data }, 1);
+ gtk_css_selector_matches_splice (matches, i, 0, FALSE, (gpointer[1]) { data }, 1);
}
static inline gboolean
diff --git a/gtk/gtklistview.c b/gtk/gtklistview.c
index 6d1eb3413b..7a3fe101b3 100644
--- a/gtk/gtklistview.c
+++ b/gtk/gtklistview.c
@@ -587,11 +587,12 @@ gtk_list_view_size_allocate (GtkWidget *widget,
int min, nat, row_height;
int x, y;
GtkOrientation orientation, opposite_orientation;
- GtkScrollablePolicy scroll_policy;
+ GtkScrollablePolicy scroll_policy, opposite_scroll_policy;
orientation = gtk_list_base_get_orientation (GTK_LIST_BASE (self));
opposite_orientation = OPPOSITE_ORIENTATION (orientation);
scroll_policy = gtk_list_base_get_scroll_policy (GTK_LIST_BASE (self), orientation);
+ opposite_scroll_policy = gtk_list_base_get_scroll_policy (GTK_LIST_BASE (self), opposite_orientation);
/* step 0: exit early if list is empty */
if (gtk_list_item_manager_get_root (self->item_manager) == NULL)
@@ -602,7 +603,7 @@ gtk_list_view_size_allocate (GtkWidget *widget,
-1,
&min, &nat, NULL, NULL);
self->list_width = orientation == GTK_ORIENTATION_VERTICAL ? width : height;
- if (scroll_policy == GTK_SCROLL_MINIMUM)
+ if (opposite_scroll_policy == GTK_SCROLL_MINIMUM)
self->list_width = MAX (min, self->list_width);
else
self->list_width = MAX (nat, self->list_width);
diff --git a/gtk/gtkmultifilter.c b/gtk/gtkmultifilter.c
index 8211295fb2..3550d90c58 100644
--- a/gtk/gtkmultifilter.c
+++ b/gtk/gtkmultifilter.c
@@ -206,7 +206,7 @@ gtk_multi_filter_remove (GtkMultiFilter *self,
filter = gtk_filters_get (&self->filters, position);
g_signal_handlers_disconnect_by_func (filter, gtk_multi_filter_changed_cb, self);
- gtk_filters_splice (&self->filters, position, 1, NULL, 0);
+ gtk_filters_splice (&self->filters, position, 1, FALSE, NULL, 0);
gtk_filter_changed (GTK_FILTER (self),
GTK_MULTI_FILTER_GET_CLASS (self)->removal_change);
diff --git a/gtk/gtkmultisorter.c b/gtk/gtkmultisorter.c
index 5690d6d1d0..a733f5a275 100644
--- a/gtk/gtkmultisorter.c
+++ b/gtk/gtkmultisorter.c
@@ -432,7 +432,7 @@ gtk_multi_sorter_remove (GtkMultiSorter *self,
sorter = gtk_sorters_get (&self->sorters, position);
g_signal_handlers_disconnect_by_func (sorter, gtk_multi_sorter_changed_cb, self);
- gtk_sorters_splice (&self->sorters, position, 1, NULL, 0);
+ gtk_sorters_splice (&self->sorters, position, 1, FALSE, NULL, 0);
gtk_sorter_changed_with_keys (GTK_SORTER (self),
GTK_SORTER_CHANGE_LESS_STRICT,
diff --git a/gtk/gtkpicture.c b/gtk/gtkpicture.c
index 9431b57120..6f0eb83240 100644
--- a/gtk/gtkpicture.c
+++ b/gtk/gtkpicture.c
@@ -516,7 +516,7 @@ gtk_picture_new_for_filename (const char *filename)
* gtk_picture_new_for_resource:
* @resource_path: (nullable): resource path to play back
*
- * Creates a new #GtkPicture displaying the file @filename.
+ * Creates a new #GtkPicture displaying the resource at @resource_path.
*
* This is a utility function that calls gtk_picture_new_for_file().
* See that function for details.
diff --git a/gtk/gtkroundedbox.c b/gtk/gtkroundedbox.c
index c068c8587d..9ea6782573 100644
--- a/gtk/gtkroundedbox.c
+++ b/gtk/gtkroundedbox.c
@@ -26,139 +26,6 @@
#include <string.h>
-/**
- * _gtk_rounded_box_init_rect:
- * @box: box to initialize
- * @x: x coordinate of box
- * @y: y coordinate of box
- * @width: width of box
- * @height: height of box
- *
- * Initializes the given @box to represent the given rectangle.
- * The
- **/
-void
-_gtk_rounded_box_init_rect (GskRoundedRect *box,
- double x,
- double y,
- double width,
- double height)
-{
- memset (box, 0, sizeof (GskRoundedRect));
-
- box->bounds.origin.x = x;
- box->bounds.origin.y = y;
- box->bounds.size.width = width;
- box->bounds.size.height = height;
-}
-
-/* clamp border radius, following CSS specs */
-static void
-gtk_rounded_box_clamp_border_radius (GskRoundedRect *box)
-{
- double factor = 1.0;
- double corners;
-
- corners = box->corner[GSK_CORNER_TOP_LEFT].width + box->corner[GSK_CORNER_TOP_RIGHT].width;
- if (corners != 0)
- factor = MIN (factor, box->bounds.size.width / corners);
-
- corners = box->corner[GSK_CORNER_TOP_RIGHT].height + box->corner[GSK_CORNER_BOTTOM_RIGHT].height;
- if (corners != 0)
- factor = MIN (factor, box->bounds.size.height / corners);
-
- corners = box->corner[GSK_CORNER_BOTTOM_RIGHT].width + box->corner[GSK_CORNER_BOTTOM_LEFT].width;
- if (corners != 0)
- factor = MIN (factor, box->bounds.size.width / corners);
-
- corners = box->corner[GSK_CORNER_TOP_LEFT].height + box->corner[GSK_CORNER_BOTTOM_LEFT].height;
- if (corners != 0)
- factor = MIN (factor, box->bounds.size.height / corners);
-
- box->corner[GSK_CORNER_TOP_LEFT].width *= factor;
- box->corner[GSK_CORNER_TOP_LEFT].height *= factor;
- box->corner[GSK_CORNER_TOP_RIGHT].width *= factor;
- box->corner[GSK_CORNER_TOP_RIGHT].height *= factor;
- box->corner[GSK_CORNER_BOTTOM_RIGHT].width *= factor;
- box->corner[GSK_CORNER_BOTTOM_RIGHT].height *= factor;
- box->corner[GSK_CORNER_BOTTOM_LEFT].width *= factor;
- box->corner[GSK_CORNER_BOTTOM_LEFT].height *= factor;
-}
-
-static void
-_gtk_rounded_box_apply_border_radius (GskRoundedRect *box,
- const GtkCssValue * const corner[4])
-{
- box->corner[GSK_CORNER_TOP_LEFT].width = _gtk_css_corner_value_get_x (corner[GSK_CORNER_TOP_LEFT],
- box->bounds.size.width);
- box->corner[GSK_CORNER_TOP_LEFT].height = _gtk_css_corner_value_get_y (corner[GSK_CORNER_TOP_LEFT],
- box->bounds.size.height);
-
- box->corner[GSK_CORNER_TOP_RIGHT].width = _gtk_css_corner_value_get_x (corner[GSK_CORNER_TOP_RIGHT],
- box->bounds.size.width);
- box->corner[GSK_CORNER_TOP_RIGHT].height = _gtk_css_corner_value_get_y (corner[GSK_CORNER_TOP_RIGHT],
- box->bounds.size.height);
-
- box->corner[GSK_CORNER_BOTTOM_RIGHT].width = _gtk_css_corner_value_get_x (corner[GSK_CORNER_BOTTOM_RIGHT],
- box->bounds.size.width);
- box->corner[GSK_CORNER_BOTTOM_RIGHT].height = _gtk_css_corner_value_get_y (corner[GSK_CORNER_BOTTOM_RIGHT],
- box->bounds.size.height);
-
- box->corner[GSK_CORNER_BOTTOM_LEFT].width = _gtk_css_corner_value_get_x (corner[GSK_CORNER_BOTTOM_LEFT],
- box->bounds.size.width);
- box->corner[GSK_CORNER_BOTTOM_LEFT].height = _gtk_css_corner_value_get_y (corner[GSK_CORNER_BOTTOM_LEFT],
- box->bounds.size.height);
-
- gtk_rounded_box_clamp_border_radius (box);
-}
-
-void
-gtk_rounded_boxes_init_for_style (GskRoundedRect *border_box,
- GskRoundedRect *padding_box,
- GskRoundedRect *content_box,
- GtkCssStyle *style,
- double x,
- double y,
- double width,
- double height)
-{
- const GtkCssValue *corner[4];
- GskRoundedRect box;
-
- gsk_rounded_rect_init_from_rect (&box, &GRAPHENE_RECT_INIT (x, y, width, height), 0);
-
- corner[GSK_CORNER_TOP_LEFT] = style->border->border_top_left_radius;
- corner[GSK_CORNER_TOP_RIGHT] = style->border->border_top_right_radius;
- corner[GSK_CORNER_BOTTOM_LEFT] = style->border->border_bottom_left_radius;
- corner[GSK_CORNER_BOTTOM_RIGHT] = style->border->border_bottom_right_radius;
-
- _gtk_rounded_box_apply_border_radius (&box, corner);
-
- if (border_box)
- gsk_rounded_rect_init_copy (border_box, &box);
-
- if (padding_box || content_box)
- {
- gsk_rounded_rect_shrink (&box,
- _gtk_css_number_value_get (style->border->border_top_width, 100),
- _gtk_css_number_value_get (style->border->border_right_width, 100),
- _gtk_css_number_value_get (style->border->border_bottom_width, 100),
- _gtk_css_number_value_get (style->border->border_left_width, 100));
- if (padding_box)
- gsk_rounded_rect_init_copy (padding_box, &box);
-
- if (content_box)
- {
- gsk_rounded_rect_shrink (&box,
- _gtk_css_number_value_get (style->size->padding_top, 100),
- _gtk_css_number_value_get (style->size->padding_right, 100),
- _gtk_css_number_value_get (style->size->padding_bottom, 100),
- _gtk_css_number_value_get (style->size->padding_left, 100));
- gsk_rounded_rect_init_copy (content_box, &box);
- }
- }
-}
-
typedef struct {
double angle1;
double angle2;
@@ -591,12 +458,3 @@ _gtk_rounded_box_path_left (const GskRoundedRect *outer,
cairo_close_path (cr);
}
-void
-_gtk_rounded_box_clip_path (const GskRoundedRect *box,
- cairo_t *cr)
-{
- cairo_rectangle (cr,
- box->bounds.origin.x, box->bounds.origin.y,
- box->bounds.size.width, box->bounds.size.height);
-}
-
diff --git a/gtk/gtkroundedboxprivate.h b/gtk/gtkroundedboxprivate.h
index 4bf2c2fb72..208d30c302 100644
--- a/gtk/gtkroundedboxprivate.h
+++ b/gtk/gtkroundedboxprivate.h
@@ -28,20 +28,6 @@
G_BEGIN_DECLS
-void _gtk_rounded_box_init_rect (GskRoundedRect *box,
- double x,
- double y,
- double width,
- double height);
-void gtk_rounded_boxes_init_for_style (GskRoundedRect *border_box,
- GskRoundedRect *padding_box,
- GskRoundedRect *content_box,
- GtkCssStyle *style,
- double x,
- double y,
- double width,
- double height);
-
double _gtk_rounded_box_guess_length (const GskRoundedRect *box,
GtkCssSide side);
@@ -60,8 +46,6 @@ void _gtk_rounded_box_path_bottom (const GskRounde
void _gtk_rounded_box_path_left (const GskRoundedRect *outer,
const GskRoundedRect *inner,
cairo_t *cr);
-void _gtk_rounded_box_clip_path (const GskRoundedRect *box,
- cairo_t *cr);
G_END_DECLS
diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c
index 7c5c744842..e01ce5ec68 100644
--- a/gtk/gtksnapshot.c
+++ b/gtk/gtksnapshot.c
@@ -1386,7 +1386,7 @@ gtk_snapshot_pop_one (GtkSnapshot *snapshot)
/* Remove all the state's nodes from the list of nodes */
g_assert (state->start_node_index + state->n_nodes == gtk_snapshot_nodes_get_size (&snapshot->nodes));
- gtk_snapshot_nodes_splice (&snapshot->nodes, state->start_node_index, state->n_nodes, NULL, 0);
+ gtk_snapshot_nodes_splice (&snapshot->nodes, state->start_node_index, state->n_nodes, FALSE, NULL, 0);
}
else
{
@@ -1400,7 +1400,7 @@ gtk_snapshot_pop_one (GtkSnapshot *snapshot)
g_assert (previous_state->start_node_index + previous_state->n_nodes == gtk_snapshot_nodes_get_size (&snapshot->nodes));
}
- gtk_snapshot_states_splice (&snapshot->state_stack, state_index, 1, NULL, 0);
+ gtk_snapshot_states_splice (&snapshot->state_stack, state_index, 1, FALSE, NULL, 0);
return node;
}
diff --git a/gtk/gtkstringlist.c b/gtk/gtkstringlist.c
index 64e2e56155..c271ed91c1 100644
--- a/gtk/gtkstringlist.c
+++ b/gtk/gtkstringlist.c
@@ -471,7 +471,7 @@ gtk_string_list_splice (GtkStringList *self,
else
n_additions = 0;
- objects_splice (&self->items, position, n_removals, NULL, n_additions);
+ objects_splice (&self->items, position, n_removals, FALSE, NULL, n_additions);
for (i = 0; i < n_additions; i++)
{
diff --git a/gtk/gtkvideo.c b/gtk/gtkvideo.c
index 9f3eb43d94..d2cb23321a 100644
--- a/gtk/gtkvideo.c
+++ b/gtk/gtkvideo.c
@@ -545,6 +545,11 @@ gtk_video_notify_cb (GtkMediaStream *stream,
gtk_video_update_error (self);
if (g_str_equal (pspec->name, "playing"))
gtk_video_update_playing (self);
+ if (g_str_equal (pspec->name, "prepared"))
+ {
+ if (self->autoplay && gtk_media_stream_is_prepared (stream))
+ gtk_media_stream_play (stream);
+ }
}
/**
diff --git a/testsuite/gdk/arrayimpl.c b/testsuite/gdk/arrayimpl.c
index 286f64d678..77494fbf70 100644
--- a/testsuite/gdk/arrayimpl.c
+++ b/testsuite/gdk/arrayimpl.c
@@ -77,7 +77,7 @@ gdk_array(test_splice) (void)
for (j = 0; j < add; j++)
sum += ++additions[j];
- gdk_array(splice) (&v, pos, remove, additions, add);
+ gdk_array(splice) (&v, pos, remove, FALSE, additions, add);
{
gsize total = 0;
for (j = 0; j < gdk_array(get_size) (&v); j++)
diff --git a/testsuite/gsk/compare/invalid-transform.node b/testsuite/gsk/compare/invalid-transform.node
new file mode 100644
index 0000000000..3e34173c92
--- /dev/null
+++ b/testsuite/gsk/compare/invalid-transform.node
@@ -0,0 +1,16 @@
+transform {
+ /* break the transform on purpose, because
+ this is valid in GSK and should result
+ in nothing being drawn. */
+ transform: scale(0);
+ child: color {
+ color: red;
+ bounds: 0 0 100 100;
+ }
+}
+
+/* make sure the rendering has a size */
+color {
+ color: transparent;
+ bounds: 0 0 1 1;
+} \ No newline at end of file
diff --git a/testsuite/gsk/compare/invalid-transform.png b/testsuite/gsk/compare/invalid-transform.png
new file mode 100644
index 0000000000..7238a64657
--- /dev/null
+++ b/testsuite/gsk/compare/invalid-transform.png
Binary files differ
diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build
index ccd29dff5b..c23d371e3e 100644
--- a/testsuite/gsk/meson.build
+++ b/testsuite/gsk/meson.build
@@ -48,6 +48,7 @@ compare_render_tests = [
'empty-shadow',
'empty-texture',
'empty-transform',
+ 'invalid-transform',
'opacity_clip',
'outset_shadow_offset_both',
'outset_shadow_offset_x',