Fix reftests
I want to enable reftests in CI, but that requires fixing things first. However, there's a few missing that haven't been obvious fixes, so they're not done yet.
For everyone not familiar with how to run reftests: I either run all of them via meson test -C build --suite reftest
or a single one via meson test -C build --verbose reftest\ background-color-transparent.ui
- and of course replace the testname as needed.
-
background-color-transparent.ui
This is a rendering bug where we do something wrong on the edge when drawing rectangles that causes an off-by-1 color ifference. I haven't tracked down what it is, but I've had a similar thing in the color matrix code where we didn't round. So I suppose it's something similar.
Note that the tests draw with the Cairo renderer - or rather, they call gsk_render_node_draw()
- so this is not GL related.
-
background-image-multiple.ui
The reference uses GtkFixed
and the recent changes to GtkFixedLayout
make that not work anymore. I'm not entirely sure what @ebassi thinks is the best way forward here, because when ui files are expected to set properties of the Layout, then I will be able to set transforms that aren't translations and then we should probably make gtk_fixed_get_child_position()
return a GskTransform
instead of having x/y out parameters.
Once there's a plan, this should be an easy fix.
-
background-origin.ui
GtkWindow
doesn't draw its background over the padding. That needs to be changed. But the whole code is a mess.
-
border-half-pixel.ui
I supposed that's a result of the GtkCssBoxes
introduction and the boxes should properly round()
, but haven't looked into it.
-
border-image-url.ui
This is the same as background-color-transparent I think.
-
box-shadow-changes-modify-clip.ui -
box-shadow-spec-inset.ui -
fixed-widget-stacking.ui
Those 3 tests use GtkFixed
, so same as background-image-multiple.ui. They used to work before.
-
label-shadows.ui
This is a test that text-shadow
for rotated labels is drawn properly. Is there a way to get rotated labels done inside a UI file yet?
-
label-sizing.ui
This fails on CI only. It works locally on Wayland, XWayland and inside xvfb. Maybe it has something to do with font availability, in particular monospace?
Any CI guru has an idea?
-
label-wrap-justify.ui
Fails on CI only. Same as label-sizing.ui I suppose.
-
messagedialog-secondarytext.ui
Succeeds on CI but fails sporadically locally. No idea why.
-
sizegroups-evolution-identity-page.ui
The bottom grid has 3 columns (the entries span 2 grid columns) while the other grids don't. For some reason this causes a different size allocation behavior. I wonder if @matthiasc has an idea what could be causing this.
Afaics the sizes should come out equal because the entries have the same size requests everywhere and so do the labels, because they are in a size group.
Oh, and somebody needs to turn off transitions in that test because the focus border transitions causes artifacts.
-
toplevel-vs-popup.ui
This only fails on Wayland because TOPLEVEL
windows get decorations on Wayland, even though reftests run with GTK_CSD=0.
-
window-show-contents-on-map.ui
This is a (re)sizing issue where the window doesn't properly resize after the child becomes visible. I have no idea what the proper behavior should be for layouting wrapping labels, so I haven't attempted a fix yet. There's multiple ways to change the reftest to be correct - like just setting max-width-chars on the label. But should that be necessary?