else
repeat_height = round (image_height);
+ fill_rect = clip->bounds;
if (hrepeat == GTK_CSS_REPEAT_STYLE_NO_REPEAT)
{
fill_rect.origin.x = _gtk_css_position_value_get_x (pos, width - image_width);
fill_rect.size.width = image_width;
}
- else
- {
- fill_rect.origin.x = 0;
- fill_rect.size.width = width;
- }
-
if (vrepeat == GTK_CSS_REPEAT_STYLE_NO_REPEAT)
{
fill_rect.origin.y = _gtk_css_position_value_get_y (pos, height - image_height);
fill_rect.size.height = image_height;
}
- else
- {
- fill_rect.origin.y = 0;
- fill_rect.size.height = height;
- }
gtk_snapshot_push_repeat (snapshot,
&fill_rect,
--- /dev/null
+* {
+ all: unset;
+}
+
+window {
+ background: pink;
+}
+
+grid {
+ background-image: linear-gradient(rebeccapurple, rebeccapurple);
+ background-size: 10px 10px;
+ padding: 10px;
+ background-repeat: repeat;
+ background-origin: content-box;
+ background-clip: border-box;
+}
+
+/* reference */
+box {
+ background: rebeccapurple;
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow">
+ <property name="width_request">100</property>
+ <property name="height_request">100</property>
+ <property name="decorated">0</property>
+ <property name="child">
+ <object class="GtkBox" />
+ </property>
+ </object>
+</interface>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <object class="GtkWindow">
+ <property name="width_request">100</property>
+ <property name="height_request">100</property>
+ <property name="decorated">0</property>
+ <property name="child">
+ <object class="GtkGrid" />
+ </property>
+ </object>
+</interface>
'background-position-simple.css',
'background-position-simple.ref.ui',
'background-position-simple.ui',
+ 'background-repeat-clip.css',
+ 'background-repeat-clip.ref.ui',
+ 'background-repeat-clip.ui',
'background-size.css',
'background-size.ref.ui',
'background-size.ui',