Matthias Clasen
0249bd4f8a
listbox: Add a ::show-separators property
...
This is getting translated into a .separators style
class on the list box css node.
2019-04-12 20:24:40 -04:00
Matthias Clasen
9a1da43890
inspector: Fix editing in the property list
...
The type-to-search was interfering with using
entries in the list. Avoid that by watching
where the focus is.
2019-04-12 19:48:23 -04:00
Matthias Clasen
7d9a8a6ec0
Merge branch 'gtkcomposetable-checked-mul' into 'master'
...
gtkcomposetable: use g_size_checked_mul() for overflow checking
See merge request GNOME/gtk!745
2019-04-12 22:19:31 +00:00
Christoph Reiter
b66e4cd64c
gtkcomposetable: use g_size_checked_mul() for overflow checking
...
The check was added in !741 , this replaces it with g_size_checked_mul()
2019-04-12 22:41:58 +02:00
Benjamin Otte
254feda16b
Revert "reftests: Fix textview-margins test"
...
This reverts commit c6471ee874
.
Doesn't work on CI.
2019-04-12 22:38:11 +02:00
Benjamin Otte
c6471ee874
reftests: Fix textview-margins test
...
The text is wider now that we changed the font properties, so account
for that.
2019-04-12 22:15:00 +02:00
Emmanuele Bassi
261b8c7ee6
Merge branch 'cache-reftest-images' into 'master'
...
ci: Cache the reftest artifacts
See merge request GNOME/gtk!744
2019-04-12 20:09:50 +00:00
Emmanuele Bassi
f58f0732c2
ci: Cache the reftest artifacts
...
Keeping the reftest output images as artifacts of a job allows us to
browse them and download them straight from GitLab.
2019-04-12 20:58:29 +01:00
Emmanuele Bassi
c5a4a26f06
Merge branch 'ci-update' into 'master'
...
ci: Install Monospace fonts
See merge request GNOME/gtk!742
2019-04-12 19:30:31 +00:00
Emmanuele Bassi
faff08193a
Merge branch 'fix-meson-on-macos-2' into 'master'
...
reftests: Use shared_library, not shared_module
See merge request GNOME/gtk!743
2019-04-12 19:30:19 +00:00
Emmanuele Bassi
3046358d38
ci: Update list of xfail tests
...
The label tests do not fail any more, because the CI image has Monospace
fonts; the textview-margins test started to fail on the CI image,
though.
2019-04-12 20:21:29 +01:00
Matthias Clasen
e81f033ece
Merge branch 'validate-alloc-size' into 'master'
...
Check the size of the g_new arguments
See merge request GNOME/gtk!741
2019-04-12 19:11:30 +00:00
Emmanuele Bassi
5c608fe070
ci: Install Monospace fonts
...
The reftests require them.
2019-04-12 20:09:10 +01:00
Matthias Clasen
a2db956492
inspector: Show readonly property values
2019-04-12 15:08:01 -04:00
Matthias Clasen
8d51038cb1
inspector: Cosmetics
2019-04-12 15:08:01 -04:00
Matthias Clasen
86c86e0860
inspector: Revamp attribute and action info
...
This also needs to be turned into single-line data.
2019-04-12 15:08:01 -04:00
Matthias Clasen
324f5472a2
Fix a crash
...
We had a signal handler with a wrong signature, causing
a crash when looking at the GtkSettings properties in
the inspector.
2019-04-12 15:08:01 -04:00
James Westman
c20360dd98
reftests: Use shared_library, not shared_module
...
This allows Meson to run on macOS, where shared modules cannot be linked
against.
2019-04-12 14:04:01 -05:00
Emmanuele Bassi
1b6252ebf0
Merge branch 'default-request-mode' into 'master'
...
Add default GtkLayoutManagerClass.get_request_mode()
See merge request GNOME/gtk!738
2019-04-12 17:59:04 +00:00
Emmanuele Bassi
b4c8ba4de7
Check the size of the g_new arguments
...
We're passing integers without validating their size, and newer GCC are
very cross about it, with warnings like:
warning: argument 1 range [18446744071562067968, 18446744073709551615]
exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
We should check we're not overflowing the allocation size, by limiting
the range of values we can use.
First of all, we need to use `gsize` instead of a random `int`, since we're
allocating data.
Additionally, we need to check that the multiplication that computes the
size of the allocation doesn't overflow the maximum value of a `gsize`.
2019-04-12 18:58:34 +01:00
Benjamin Otte
ad34f731e9
CI: Turn on reftests
2019-04-12 19:34:29 +02:00
Benjamin Otte
198207f1ff
reftests: Mark the currently unfixed failures as XFAIL
...
They should be fixeed before 4.0 but the fixes are more involved. And we
want to start running the existing tests on CI, because they break
regularly and we want to catch that.
2019-04-12 19:34:29 +02:00
Benjamin Otte
6120f11ed3
reftests: Fix GtkFixed layout properties
...
GtkFixed was still using "x" and "y", when it should have been using
"position".
2019-04-12 19:34:29 +02:00
Benjamin Otte
0a440a804f
reftests: Fix CSS for various tests
...
* :nth-child(first) => :first-child
* :nth-child(last) => :last-child
* Add semicolons at end of declarations
* Remove spaces between color functions (shade, alpha, ...) and args
2019-04-12 19:34:29 +02:00
Benjamin Otte
117fc68195
tests: Remove testboxcss
...
That test was cool in 2011, but hasn't been updated or used since then
because its features are now part of widget-factory and the inspector.
So let's remove it.
2019-04-12 19:34:29 +02:00
Benjamin Otte
f310609a66
builder: Parse GskTransform properties
...
In particular, this allows parsing the GtkFixed position properties.
2019-04-12 19:34:29 +02:00
Benjamin Otte
8001c7d972
transform: Add gsk_transform_parse()
...
It uses the new CSS parser.
2019-04-12 19:34:29 +02:00
Benjamin Otte
023b695422
testsuite: Fix stylecontext test
...
Update the test to the stricter interpretation of the CSS specification
and the removal of custom additions.
2019-04-12 19:34:29 +02:00
Benjamin Otte
ec6ce0707a
testsuite: Update references for style test
...
We have more accurate section printouts now and they are used here.
2019-04-12 19:34:29 +02:00
Benjamin Otte
f37573f8dc
testsuite: Check errors not just for line, but for full range
...
Instead of just checking that the line of the error message is correct,
assert that start and end position are on the correct character offset.
Also fix all the tests to conform to this.
2019-04-12 19:34:29 +02:00
Benjamin Otte
49f8b571b9
testsuite: Update integer test
...
Make the test use an actual integer property that accepts negative
numbers (opacity) instead of one that wants units (margin-top) or
can't deal with negative numbers (everything else).
2019-04-12 19:34:29 +02:00
Benjamin Otte
e1cd996617
selector: Inlcude : sign when reporting errors
2019-04-12 19:34:28 +02:00
Benjamin Otte
24cc721bc6
cssprovider: Mark whole @import statement on import error
2019-04-12 19:34:28 +02:00
Benjamin Otte
d41580adfc
calc: Have better error location range
2019-04-12 19:34:28 +02:00
Benjamin Otte
3ab65b7da2
csspositionvalue: Redo the parser
...
The old one incorrectly rejected "center left" and "center right".
2019-04-12 19:34:28 +02:00
Benjamin Otte
79238b0d8f
cssparser: Add error functions that take locations
...
... and use them to report better error locations for the warning when
blocks aren't terminated properly.
2019-04-12 19:34:28 +02:00
Benjamin Otte
2e0a56665a
css: Move gtkcsssection.[ch] into gtk/css
2019-04-12 19:34:28 +02:00
Benjamin Otte
76826cfa2f
cssparser: Pass in error locations explicitly
...
And for the quick function, use the start/end location of the current
token.
2019-04-12 19:34:28 +02:00
Benjamin Otte
37671d2bd0
cssprovider: Redo error emission
...
Emit all errors via the parser, don't try to have a custom error
handling machinery.
The only exception is the initial file load error - we need to do that
one directly, because there is no parser.
2019-04-12 19:34:28 +02:00
Benjamin Otte
04d24b7cd2
csssection: Make printing functions public
2019-04-12 19:34:28 +02:00
Benjamin Otte
085d34cbb0
cssprovider: Advance parser to start of declaration
...
This way, the block will reference the right location.
2019-04-12 19:34:28 +02:00
Benjamin Otte
46143492a2
cssprovider: Change section handling
...
Instead of building a full tree of sections that then nobody cares
about, just create sections as necessary for when we use it in the
inspector.
2019-04-12 19:34:28 +02:00
Benjamin Otte
a475d72d47
cssparser: Improve location APIs
...
1. Export multiple locations
2. Return the location instead of passing one in
2019-04-12 19:34:28 +02:00
Benjamin Otte
a8f712b09a
cssection: Return locations, not numbers
...
Now that we have GtkCssLocation, actually use it.
2019-04-12 19:34:28 +02:00
Benjamin Otte
2fb202187c
css: Remove GtkCssSectionType
...
It's unused.
2019-04-12 19:34:28 +02:00
Benjamin Otte
207c0b32b4
csssection: Redo constructors
...
Remove the unused one and rename the old one to new_from_parser().
2019-04-12 19:34:28 +02:00
Benjamin Otte
35f60dc918
csssection: Store a GtkCssLocation
2019-04-12 19:34:28 +02:00
Benjamin Otte
1cd9396154
css: Review error messages
...
... and move them from _gtk_css_parser_error() to the proper new error
message.
2019-04-12 19:34:28 +02:00
Benjamin Otte
de73ac980f
css: Use gtk_css_parser_consume_any() for transition shorthand
2019-04-12 19:34:28 +02:00
Benjamin Otte
acaec5f186
testsuite: Update parser tests to new errors
...
Some errors are now properly detected as unknown values when previously
they were just treated as syntax errors.
2019-04-12 19:34:28 +02:00