Commit Graph

110 Commits

Author SHA1 Message Date
Benjamin Otte
e683e915b8 css: Queue resize for properties that affect clip
This fixes shadows that are animated not updating the clip of the widget
they are drawn on. An example of this are the buttons in the CSS shadows
example in gtk-demo.

Reftest included
2014-10-03 06:18:04 +02:00
Benjamin Otte
7afac9670b image: Implement clipping support for icon-shadow
Testcase is attached.
2014-10-03 06:18:04 +02:00
Jasper St. Pierre
3b08ba24b3 reftests: Actually add a text-shadow to the text-shadow reftest
The reftest still passes, since the code still works, but we might as
well test what we claim to test.
2014-09-30 13:43:36 -06:00
Benjamin Otte
9d0ec409ff reftest: Build a shared lib on win32
Windows needs a shared library to link the modules against, otherwise
the undefined symbols make it not work.

So build a shared library on Windows.

We don't want a library elsewhere, as that just complicates things, so
we only make the library shared on Windows and keep it as a noinst
library otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=736338
2014-09-22 15:47:02 +02:00
Rico Tzschichholz
aa08b87ab6 reftest: Add missing include of reftest-snapshot.h 2014-09-22 15:19:51 +02:00
Benjamin Otte
ee9e708cf6 reftest: Build a private library for gtk-reftest
This is a noinst library for now, but the idea is to turn it into a
proper DLL on Windows, so that we can install it and properly link the
modules to it. Windows doesn't allow undefined symbols in modules.

https://bugzilla.gnome.org/show_bug.cgi?id=736338
2014-09-21 18:59:12 +02:00
Benjamin Otte
2e6dd4082f reftest: Split our more functionality
Split actually taking the snapshot into its own file.
2014-09-21 18:58:45 +02:00
Benjamin Otte
0182d1ed38 reftest: Split out some functionality into own file
Comparing two surfaces is something that can be nicely factored out.
2014-09-21 18:58:45 +02:00
Benjamin Otte
9a8a4a8b14 widget: Don't assume opacity is 100%
... just because there is no style context instantiated yet. Instead,
instantiate a style context during realize() and ask it.

Fixes problems with dim labels not being dimmed on first show.

Testcase included.

https://bugzilla.gnome.org/show_bug.cgi?id=735240
2014-09-07 01:57:10 +02:00
Benjamin Otte
95959ef470 overlay: Handle overlays when no main widget exists
Just pretend that the main widget is an empty widget the size of the
overlay.
Makes it possible to write testcases where no size requests are run on
overlay widgets before size_allocate() is called.

Testcase included.
2014-09-07 01:57:09 +02:00
Benjamin Otte
21d3701291 reftests: Fix Makefile
with non-installed tests the build would get an empty $(reftestdir)
which would screw up the LDFLAGS.

An rpath seems to be required to make libtool build a shared object.
Without an rpath line, it only builds a static object.

https://bugzilla.gnome.org/show_bug.cgi?id=735401
2014-08-27 18:02:52 +02:00
Benjamin Otte
0f0fc59fbd build: make reftests work without installed tests
The libreftest.so module needs to be built in all cases.
Without installed tests, it needs to not be installed though.

https://bugzilla.gnome.org/show_bug.cgi?id=735401
2014-08-26 20:05:49 -04:00
Benjamin Otte
2737c67cce css: Round shadow extents properly
Otherwise drawing will be clipped.

Testcase included
2014-08-21 00:54:07 +02:00
Benjamin Otte
67456304d4 roundedbox: Only grow border-radius if there is one
This is relevant for shadow spread and goes in line with the web.

Testcase included.
2014-08-21 00:54:07 +02:00
Benjamin Otte
1126a34353 label: Respect box-shadow when computing clip
Testclase included.

Also reorder headers to be alphabetic.
2014-08-21 00:54:07 +02:00
Benjamin Otte
b1ac4f91d3 reftests: Update for :active => :checked change 2014-08-16 20:41:32 +02:00
Benjamin Otte
9d2c3f5e68 reftests: Add reftest for statusbar fix
https://bugzilla.gnome.org/show_bug.cgi?id=724281
2014-08-14 19:52:59 +02:00
Benjamin Otte
2120ccfd5e reftests: Make gcc happy 2014-08-14 19:52:59 +02:00
Benjamin Otte
dff52f7a04 css: Match state in siblings properly
Previously, we always returned the state flags of the original widget
and did not consider the siblings' pseudoclasses.

Testcase is attached.
2014-08-13 16:51:16 +02:00
Alexander Larsson
f3b56261cb Fix symbolic-icon-translucent-color reftest
When using the pre-rendered png symbolics it seems that we're off a
tiny bit in a few of the pixels on the antialiased borders of a
stroke. To fix this we switch the icon to media-playback-stop-symbolic
which has no such antialiased borders.

I don't quite understand why the pixels are off, this needs more
research.

https://bugzilla.gnome.org/show_bug.cgi?id=734668
2014-08-12 15:51:36 +02:00
Matthias Clasen
80a8257302 Fix reftests for builddir != srcdir
Make gtk-reftest consult the REFTEST_MODULE_DIR environment
variable to find out where to look for modules, and fix the
libtool hack to construct the .libs subdirectory correctly.
2014-08-10 19:11:39 -04:00
Matthias Clasen
1185b9b29c Fix animation-direction reftest
This was another victim of clipping changes - the labels were
overdrawing each other, leading to test failure. Prevent this
by separating the grid columns.
2014-08-10 19:11:38 -04:00
Matthias Clasen
2d15c25d93 reftests: Make textview-margins pass in make check
I found that setting margins to zero makes the textview clip
away some overshooting pixels. So, instead of a 0/10 split,
do this test with a 2/8 split of margins, to avoid the clipping
issue.
2014-08-10 07:41:53 -04:00
Benjamin Otte
a3d1db608b label: Don't clip text shadows
The previous code for computing the clip rectangle forgot to respect
the text-shadow CSS property. This is usually not very visible because
text shadows usually don't extend the ink rectangle by very much.

See attached testcase for an example.
2014-07-31 17:50:24 +02:00
Benjamin Otte
386e59683a reftest: Add reftest for CSS sizing fix
The test uses a GtkBox for rendering the background, but it could use
any other widget that is not used in the reference.
2014-07-23 18:51:26 +02:00
Benjamin Otte
d66db441e3 reftests: Add a reftest for recent widget path fix
The widget path code copies elements only in gtk_widget_path_copy() -
which is essentially unused - and in
gtk_widget_path_append_with_siblings() - which is used by GtkBox.

So stuff the widget we are testing in a GtkBox to reroduce the problem.
2014-07-22 03:06:04 +02:00
Benjamin Otte
bed70f2bcf reftests: Add reftest for new pseudoclass support 2014-07-21 01:03:47 +02:00
Matthias Clasen
085fada849 Force the simple im module for reftests
I've seen reftests fail with IBus warnings. We should avoid that.
2014-07-14 18:22:40 -04:00
Benjamin Otte
9ae0b8ed27 reftests: Add test for latest fix
Ensure we draw the full backgorund on labels, not just where test
appears.
2014-07-12 07:13:28 +02:00
Benjamin Otte
e1112dce6d reftests: Add test for the recent label changes 2014-07-10 18:56:35 +02:00
Benjamin Otte
6a2ae1bb90 reftests: Improve workaround for GtkGrid bug
... so that it works with wide separators. Or rather: with separators
that don't request 1px size but any other number. Do that by making the
placeholder request the same size by indeed stuffing (hidden) separators
in it.
2014-07-10 18:56:34 +02:00
Benjamin Otte
a1bae4b389 reftests: Add a reftest for 'animation-direction'
It tests the latest two commits.
2014-07-07 20:06:47 +02:00
Jasper St. Pierre
ece9ae4bc5 gtkwindow: Remove resize grips
Resize grips were introduced for GNOME 3.0, before we had any of the
"new GNOME app" features like invisible borders and CSD. With OS X 10.6
and 10.7, Apple has replaced the classic grips in their applications
with invisible borders as well.

New GNOME app designs don't use resize grips anymore and the new
default theme for GTK+, Adwaita, disables them entirely by forcing their
width and height to 0.

They're past their time. Remove the code to support them. This can
always be reverted if some app relies on them.
2014-07-03 12:58:41 -04:00
Matthias Clasen
3da76c1e14 Disable deprecation warnings for installed reftests
Otherwise, these fail in continuous.
2014-06-28 11:13:17 -04:00
Matthias Clasen
b9bd7159c0 Disable deprecation warnings in tests
We want to test deprecated properties, so failing the tests with
warnings is not productive.
2014-06-25 16:29:08 -04:00
Richard Hughes
12e389dd3c Makefile: Actually dist the high-contrast and dark test files 2014-06-24 21:18:46 +01:00
Jasper St. Pierre
38a6a72a7f Makefile: Add a few more cleanfile / ignore rules 2014-06-16 14:03:53 -04:00
Paolo Borelli
715b8744f5 TextView: render the background of border windows
Set the .top, .left, etc css classes and render the background
of the border windows.
Change the reftest implementation accordingly.
2014-06-15 18:57:06 +02:00
Paolo Borelli
2eeff1eed6 Add a TextView reftests checking border-windows
TextView border windows are internal windows used to draw on the gutter
of the textview (e.g. line numbers). The test uses the gmodule hook to
programmatically draw on the border-windows at each side of the textview
and compares the result with 3x3 grid of labels.
2014-06-15 18:56:30 +02:00
Paolo Borelli
2c5be3b231 TextView margin reftest
add a reftest that checks GtkTextView text margin property comparing
with the normal margin added to the widget (they are the same when there
is nothing drawn in the gutter like line numbers etc).
2014-06-15 18:15:43 +02:00
Paolo Borelli
570653354a Dist recently added reftests 2014-06-15 12:05:40 +02:00
Paolo Borelli
c184458ab3 notebook: set tab position style class on the main frame
We want to have .top etc also on the notebook frame, not only on
the header frame.
The patch includes a reftest by Benjamin.
2014-06-14 21:37:07 +02:00
Benjamin Otte
bb3174c913 reftests: Fix random failures of reftest
The reftest is testing "transparent" works as expected by drawing a
purple background once with purple and once with transparent and
expecting the same result. This works fine unless anti-aliasing happens
at rounded corners. The overdraw of the 2nd background changes the
antialiased pixels.

Fix this by explicitly setting the border radius to 0.

Also reindent the file to make it more readable.
2014-06-09 19:18:48 +02:00
Matthias Clasen
c11b7e44a0 label-sizing reftest: Hardcode ltr
This reftest doesn't work in rtl.
2014-06-03 12:28:06 -04:00
Matthias Clasen
ac59f0ac08 reftests: Add a way to hardcode text direction
Some tests don't work in rtl, so add a way to hardcode
the expected text direction. This is in preparation for
running reftests in an rtl locale.
2014-06-03 12:28:06 -04:00
Benjamin Otte
45dbd84ff3 reftests: Use "all" property in inherit-and-inital test 2014-06-03 14:35:00 +02:00
Matthias Clasen
42945f0d74 Run reftests repeatedly
Install test files that run the reftests in the
Adwaita:dark and HighConstrast themes. It works,
so why not.
2014-06-02 22:46:23 -04:00
Matthias Clasen
7f8d0552f0 Drop debug spew from installed tests
This is no longer needed, we found the problem.
2014-06-02 22:37:29 -04:00
Matthias Clasen
5bebbb06fa Add an expander reftest
This test check that resizing the window when expanding
the expander yields the same end result as having the
expander expanded to begin with. The test uses the inhibit
mechanism introduced in the previous commit.
2014-06-02 22:36:01 -04:00
Matthias Clasen
b86f5a4086 Add a way to delay snapshots in reftests
This adds an inhibit api that code from the reftest module
can use to delay the taking of the snapshot. Also refactor
the code in gtk-reftest to use the inhibit mechanism for
its own delaying of the snapshot until after the first
expose.
2014-06-02 22:35:59 -04:00