gtk4.git
5 years agoicon theme: Make GtkIconInfo cached data threadsafe
Alexander Larsson [Fri, 24 Jan 2020 16:46:57 +0000 (17:46 +0100)]
icon theme: Make GtkIconInfo cached data threadsafe

Whenever this is accessed or updated we just grab a lock, thus
blocking on whoever is currenly updating it.

5 years agoGtkIconTheme: Make the base GtkIconTheme threadsafe
Alexander Larsson [Fri, 24 Jan 2020 15:22:26 +0000 (16:22 +0100)]
GtkIconTheme: Make the base GtkIconTheme threadsafe

This makes the core icon theme object threadsafe, however its
not yet very useful because the IconInfo objects are not threadsafe.

5 years agoUpdate POTFILES.skip
Piotr Drąg [Wed, 29 Jan 2020 16:20:23 +0000 (17:20 +0100)]
Update POTFILES.skip

5 years agoMerge branch 'wip/muktupavels/work-areas' into 'master'
Emmanuele Bassi [Wed, 29 Jan 2020 13:38:31 +0000 (13:38 +0000)]
Merge branch 'wip/muktupavels/work-areas' into 'master'

per-monitor work areas

Closes #1086 and #980

See merge request GNOME/gtk!1300

5 years agoanimatedstyle: Fix the debug build
Matthias Clasen [Wed, 29 Jan 2020 13:02:30 +0000 (14:02 +0100)]
animatedstyle: Fix the debug build

This wasn't caught by our ci.

5 years agox11: add support for _GTK_WORKAREAS_Dn
Alberts Muktupāvels [Sun, 12 Jan 2020 22:38:12 +0000 (00:38 +0200)]
x11: add support for _GTK_WORKAREAS_Dn

If window manager supports _GTK_WORKAREAS use per-monitor work areas.

https://mail.gnome.org/archives/wm-spec-list/2018-December/msg00000.html
https://gitlab.freedesktop.org/xdg/xdg-specs/merge_requests/22

https://gitlab.gnome.org/GNOME/gtk/merge_requests/1300

5 years agoMerge branch 'gtk-4-im-wayland-controller-focus-in' into 'master'
Carlos Garnacho [Wed, 29 Jan 2020 11:22:11 +0000 (11:22 +0000)]
Merge branch 'gtk-4-im-wayland-controller-focus-in' into 'master'

imwayland: Connect gtk_im_context_focus_in/out to GtkEventControllerKey

See merge request GNOME/gtk!1349

5 years agoMerge branch 'gdk-device-leak-fix' into 'master'
Matthias Clasen [Wed, 29 Jan 2020 10:44:42 +0000 (10:44 +0000)]
Merge branch 'gdk-device-leak-fix' into 'master'

GdkDevice leak fix

See merge request GNOME/gtk!1358

5 years agoMerge branch 'css-style-split-2' into 'master'
Matthias Clasen [Wed, 29 Jan 2020 10:39:43 +0000 (10:39 +0000)]
Merge branch 'css-style-split-2' into 'master'

css: Split styles into groups

See merge request GNOME/gtk!1362

5 years agoMerge branch 'reset-with-click' into 'master'
Matthias Clasen [Wed, 29 Jan 2020 10:39:22 +0000 (10:39 +0000)]
Merge branch 'reset-with-click' into 'master'

Always emit reset for IM preedit with mouse click

Closes #1534

See merge request GNOME/gtk!460

5 years agoMerge branch 'robertroth/shortcuts-overlay-accel' into 'master'
Matthias Clasen [Wed, 29 Jan 2020 10:25:40 +0000 (10:25 +0000)]
Merge branch 'robertroth/shortcuts-overlay-accel' into 'master'

Application: Do not reuse Ctrl+F1 for help-overlay

See merge request GNOME/gtk!307

5 years agoUse style values directly
Matthias Clasen [Tue, 28 Jan 2020 07:38:25 +0000 (07:38 +0000)]
Use style values directly

Replace uses of gtk_css_style_get_value with direct access,
throughout the tree. We don't replace all uses, just those
where we are dealing with a fixed property. Be careful to
handle the currentColor special case for color properties.

5 years agoCompute style change based on values structs
Matthias Clasen [Tue, 28 Jan 2020 17:13:37 +0000 (18:13 +0100)]
Compute style change based on values structs

We can save some time here by comparing struct by
struct and avoiding individual values comparisons
as much as possible.

5 years agocss: Split styles into groups
Matthias Clasen [Sun, 26 Jan 2020 04:16:06 +0000 (23:16 -0500)]
css: Split styles into groups

Introduce refcounted structs for groups of related css properties,
and use them to store the style values. Both GtkCssStaticStyle and
GtkCssAnimatedStyle fill in the structs in GtkCssStyle, and we
can avoid vfuncs for value access, which should be much faster.
We can even start accessing style->core->color directly.

5 years agoperformance test: Produce better numbers
Matthias Clasen [Wed, 29 Jan 2020 10:05:24 +0000 (11:05 +0100)]
performance test: Produce better numbers

Try to isolate the test runs from each other in the
eyes of the kernel scheduler, by sleeping a bit. And
ignore the first run, to avoid cache effects.

5 years agoMerge branch 'wip/baedert/widget-add-style-class' into 'master'
Matthias Clasen [Wed, 29 Jan 2020 09:46:36 +0000 (09:46 +0000)]
Merge branch 'wip/baedert/widget-add-style-class' into 'master'

widget: Add style class API

See merge request GNOME/gtk!1366

5 years agoSilence a compiler warning
Matthias Clasen [Wed, 29 Jan 2020 09:44:25 +0000 (10:44 +0100)]
Silence a compiler warning

5 years agoMerge branch 'gtk-doc-ci' into 'master'
Emmanuele Bassi [Wed, 29 Jan 2020 09:11:15 +0000 (09:11 +0000)]
Merge branch 'gtk-doc-ci' into 'master'

Publish the API reference

See merge request GNOME/gtk!1367

5 years agoRemove reftests from expected-fail list
Emmanuele Bassi [Wed, 29 Jan 2020 09:02:02 +0000 (10:02 +0100)]
Remove reftests from expected-fail list

With an updated version of the base CI image it seems some tests that
were failing have started to pass again.

5 years agoci: Deploy the API reference on our GitLab pages
Emmanuele Bassi [Wed, 29 Jan 2020 08:16:57 +0000 (09:16 +0100)]
ci: Deploy the API reference on our GitLab pages

Now that we can build gtk-doc as a sub-project, we can go back to
publishing the API reference for the master branch every time we
build it.

5 years agoci: Update the version of Meson in the CI image
Emmanuele Bassi [Tue, 28 Jan 2020 15:52:42 +0000 (16:52 +0100)]
ci: Update the version of Meson in the CI image

We need at least 0.52.1 to be able to use gtk-doc as a sub-project.

5 years agoAdd gtk-doc as a subproject
Emmanuele Bassi [Tue, 28 Jan 2020 15:50:53 +0000 (16:50 +0100)]
Add gtk-doc as a subproject

We rely on a specific minimum version of gtk-doc to be able to build the
GTK API reference for the new API. In order to be able to use gtk-doc as
a subproject, though, we need to use a recent version of Meson.

5 years agowidget: Add style class API
Timm Bäder [Wed, 29 Jan 2020 07:33:41 +0000 (08:33 +0100)]
widget: Add style class API

Add GtkWidget API for adding and removing style classes, as well as
checking whether a widget has a style class applied.

Everyone has to go through GtkStyleContext for this these days but with
GtkStyleContext eventually going away, it makse sense for GtkWidget to
have API for this.

5 years agoMerge branch 'fix-doc-typo' into 'master'
Timm Bäder [Wed, 29 Jan 2020 07:49:13 +0000 (07:49 +0000)]
Merge branch 'fix-doc-typo' into 'master'

Fix a doc typo

See merge request GNOME/gtk!1364

5 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Wed, 29 Jan 2020 04:35:56 +0000 (04:35 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

Wip/otte/for master

See merge request GNOME/gtk!1365

5 years agocssselector: Rework how we handle the bloom filter
Benjamin Otte [Wed, 29 Jan 2020 03:20:47 +0000 (04:20 +0100)]
cssselector: Rework how we handle the bloom filter

Instead of foreaching through all the previous selectors every time we
bloom-filter, just bloom-filter the current element and return a special
value if that filter fails (FALSE). If that happens, don't try
filter-matching more nodes in the caller as we know it's an abort.

5 years agoFix a doc typo
Luca Bacci [Tue, 28 Jan 2020 20:42:03 +0000 (20:42 +0000)]
Fix a doc typo

5 years agocssselector: Reorder functions
Benjamin Otte [Tue, 28 Jan 2020 17:28:32 +0000 (18:28 +0100)]
cssselector: Reorder functions

This just changes the order of functions in the source code in
preparation for the next commit.

5 years agocss: Don't do the "all set" test
Benjamin Otte [Tue, 28 Jan 2020 16:49:37 +0000 (17:49 +0100)]
css: Don't do the "all set" test

We have so many properties that it is basically impossible that all of
them are set and the time spent checking is higher than the time saved
if it does indeed happen.

5 years agoMerge branch 'wip/otte/for-master' into 'master'
Benjamin Otte [Tue, 28 Jan 2020 16:43:33 +0000 (16:43 +0000)]
Merge branch 'wip/otte/for-master' into 'master'

popover: Do not validate the css node on show()

See merge request GNOME/gtk!1363

5 years agopopover: Do not validate the css node on show()
Benjamin Otte [Tue, 28 Jan 2020 16:15:04 +0000 (17:15 +0100)]
popover: Do not validate the css node on show()

This was a good idea back in GTK3 when popovers were toplevels, but now
they're regular child widgets, so they should behave that way.

Also, with the introduction of the bloom filter, gtk_css_node_validate()
now assumes it's only called on root nodes, so assert that that is the
case.

5 years agoimwayland: Connect gtk_im_context_focus_in/out to GtkEventControllerKey
Takao Fujiwara [Tue, 28 Jan 2020 14:47:16 +0000 (23:47 +0900)]
imwayland: Connect gtk_im_context_focus_in/out to GtkEventControllerKey

GtkEventControllerKey can handle GDK_FOCUS_CHANGE and call
gtk_im_context_focus_in/out directly.

https://gitlab.gnome.org/GNOME/gtk/issues/2390

5 years agoMerge branch 'wip/otte/css' into 'master'
Benjamin Otte [Tue, 28 Jan 2020 03:56:49 +0000 (03:56 +0000)]
Merge branch 'wip/otte/css' into 'master'

selector: Rework iterating over subnodes

See merge request GNOME/gtk!1361

5 years agoselector: Rework iterating over subnodes
Benjamin Otte [Tue, 28 Jan 2020 02:53:48 +0000 (03:53 +0100)]
selector: Rework iterating over subnodes

Instead of a foreach() function, introduce an iterator, so that the
caller can drive the iteration.

This allows doing stuff inbetween callbacks and avoids closures when
more than one data object should be passed.

As a side effect I even get a small, but noticeable performance
improvement in the 2-10% range depending on benchmark, I guess that's
because there's no function pointer passing going on anymore.

5 years agoMerge branch 'wip/otte/css' into 'master'
Benjamin Otte [Tue, 28 Jan 2020 02:47:25 +0000 (02:47 +0000)]
Merge branch 'wip/otte/css' into 'master'

CSS improvements

See merge request GNOME/gtk!1360

5 years agostyleproperty: Remove ability to query properties
Benjamin Otte [Mon, 27 Jan 2020 23:46:43 +0000 (00:46 +0100)]
styleproperty: Remove ability to query properties

With gtk_style_context_get() gone, this is no longer used.

5 years agostylecontext: Get rid of gtk_style_context_get()
Benjamin Otte [Mon, 27 Jan 2020 23:27:36 +0000 (00:27 +0100)]
stylecontext: Get rid of gtk_style_context_get()

... and replace all the calls to it with
gtk_style_context_peek_property().

All the calls are hacks that need to go away btw.

5 years agotestcalendar: Don't do dumb stuff with font sizes.
Benjamin Otte [Mon, 27 Jan 2020 22:04:15 +0000 (23:04 +0100)]
testcalendar: Don't do dumb stuff with font sizes.

If you want to test font stuff, it's 2020 and we have an inspector.

5 years agofilechooser: Remove default size machinery
Benjamin Otte [Mon, 27 Jan 2020 21:58:15 +0000 (22:58 +0100)]
filechooser: Remove default size machinery

The FileChooser ToolKit (fctk) had its own machinery to handle default
sizes which was completely busted and trying to marshal random numbers
through the widget hierarchy that maybe made sense in 2012 but don't do
now.

Get rid of it, just keep the dialog's GSetting - which funnily enough
used to be written by the dialog but written by the widget.
But that's fctk for you.

5 years agocellrenderertoggle: size based on -gtk-icon-size
Benjamin Otte [Mon, 27 Jan 2020 16:13:04 +0000 (17:13 +0100)]
cellrenderertoggle: size based on -gtk-icon-size

Instead of hardcoding 16px.

5 years agostylecontext: Remove gtk_style_context_get_section()
Benjamin Otte [Mon, 27 Jan 2020 15:13:25 +0000 (16:13 +0100)]
stylecontext: Remove gtk_style_context_get_section()

The inspectors gets values differently these days.

5 years agostylecontext: Remove GTK_STYLE_PROPERTY_* defines
Benjamin Otte [Mon, 27 Jan 2020 14:07:37 +0000 (15:07 +0100)]
stylecontext: Remove GTK_STYLE_PROPERTY_* defines

They shouldn't be (and aren't) used anymore.

5 years agocss: Use the bloom filter for change matching
Benjamin Otte [Mon, 27 Jan 2020 02:26:39 +0000 (03:26 +0100)]
css: Use the bloom filter for change matching

Instead of just doing radical change matching on the node itself, also
consider the parent nodes via the bloom filter.

This means a radical change is now also one where the parent
name/id/classes change, but since that's considered a radical change on
the parent already, those things are slow anyway.

Improves the benchmark times for CSS validation during backdrop
transitions in widget-factory from 45ms to 35ms on my machine.

5 years agoselector: Make :not() selectors not radical
Benjamin Otte [Mon, 27 Jan 2020 01:49:36 +0000 (02:49 +0100)]
selector: Make :not() selectors not radical

:not() selectors cannot be radical because the bloomfilter only knows if
a value is set in any of the nodes, but cannot determine the opposite
(if a value is not set in at least one node), but that would be required
for:not() selectors.
However, this is very unlikely to happen in the real world, so it's not
worth optimizing.

Unfortunately, change tracking could know this, so by excluding the
:not() selectors from radical changes, the change tracking will now pick
them up. If that turns out to be a performance problem, we need to add a
special category for radical not filters, so change tracking and bloom
filters can deal with them.

The testcase demonstrating the problem in widget-factory has been
extrated and added.

5 years agotestsuite: Improve diff_with_file() function
Benjamin Otte [Mon, 27 Jan 2020 01:15:06 +0000 (02:15 +0100)]
testsuite: Improve diff_with_file() function

Properly handle diff(1) failing.

In this particular case, the test passed a NULL input file to the diff
(that was fixed, too) and then diff only found one input file and
aborted.

But without this fix, we'd also not catch other abortion reasons for
diff() - as long as it exited in any way, we were happy.

5 years agocss: Add fast-path for parent selector matching
Benjamin Otte [Sun, 26 Jan 2020 03:37:17 +0000 (04:37 +0100)]
css: Add fast-path for parent selector matching

Add a fast path for parent selector matching that uses a bloom filter to
quickly discard selectors that can't possibly match.

Keep in mind that we match using a bloom filter, so we might
accidentally include too many selectors when hash/bucket collisions
occur.
That's not a correctness problem though, because we'll do a real check
afterwards.

The idea for this change is taken from browsers, in particular WebKit.

5 years agocssnodedeclaration: C99-ify the code
Benjamin Otte [Sun, 26 Jan 2020 03:17:17 +0000 (04:17 +0100)]
cssnodedeclaration: C99-ify the code

zero-sized arrays are allowed now.

5 years agoselector: Hash differently
Benjamin Otte [Fri, 24 Jan 2020 16:56:53 +0000 (17:56 +0100)]
selector: Hash differently

This will be relevant for a bloom filter. And bloom filters want 12bit
hashes, so we try to produce hash values < 4096.

5 years agocssnode: Convert name + id from interned string to GQuark
Benjamin Otte [Thu, 23 Jan 2020 23:43:26 +0000 (00:43 +0100)]
cssnode: Convert name + id from interned string to GQuark

The reason for this is simply that I want to get hash functions that
have their values close together, so they can fit in a smaller range
(the goal here is 12 bits). By using GQuark, we get consecutive numbers
starting with 1 (and applications have <1000 quarks usually), whereas
interned strings can be all over the place.

As a side effect we also save 64 bytes per declaration.

5 years agocss: Get rid of GtkCssMatcher
Benjamin Otte [Thu, 23 Jan 2020 02:34:25 +0000 (03:34 +0100)]
css: Get rid of GtkCssMatcher

5 years agocss: Pass node through the lookup code
Benjamin Otte [Thu, 23 Jan 2020 01:42:01 +0000 (02:42 +0100)]
css: Pass node through the lookup code

... instead of passing a matcher.

The matcher code is now local to the CssProvider/CssSelector machinery.

5 years agocssnode: Remove init_matcher() vfunc
Benjamin Otte [Thu, 23 Jan 2020 01:28:46 +0000 (02:28 +0100)]
cssnode: Remove init_matcher() vfunc

It's unused.

5 years agocssnode: Remove ability to set GType as fallback name
Benjamin Otte [Thu, 23 Jan 2020 01:22:30 +0000 (02:22 +0100)]
cssnode: Remove ability to set GType as fallback name

5 years agoRemove GtkWidgetPath
Benjamin Otte [Wed, 22 Jan 2020 23:45:27 +0000 (00:45 +0100)]
Remove GtkWidgetPath

... and all associated demos and tests.

5 years agoRemove gtkwidgetpath.h include where no longer needed
Benjamin Otte [Wed, 22 Jan 2020 23:45:01 +0000 (00:45 +0100)]
Remove gtkwidgetpath.h include where no longer needed

5 years agoRevert "cssmatcher: Inline node values into matcher"
Benjamin Otte [Wed, 22 Jan 2020 21:49:27 +0000 (22:49 +0100)]
Revert "cssmatcher: Inline node values into matcher"

This reverts commit a75529f3c00736856fa20f19e920614be5a48fbb.

It just complicates code and there are no performance numbers that would
warrant such a commit.

5 years agocss: Move utility function
Benjamin Otte [Mon, 27 Jan 2020 02:44:05 +0000 (03:44 +0100)]
css: Move utility function

The function was not selector-specific, so putting it with all the other
utility functions makes more sense.

Also use the utility function in the node declaration printing.

5 years agogdk/x11: Properly unref removed device in XI2 device manager
Sebastian Keller [Mon, 27 Jan 2020 00:02:29 +0000 (01:02 +0100)]
gdk/x11: Properly unref removed device in XI2 device manager

When a device is added, there are two references to it by the device
manager, the initial one and the one used for the id_table. Removing a
device only removed the reference added by the id_table resulting in the
GdkDevice being leaked.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/1358

5 years agotextutil: Stop using GtkStyleContext
Matthias Clasen [Mon, 27 Jan 2020 14:35:09 +0000 (09:35 -0500)]
textutil: Stop using GtkStyleContext

We can just use the css style directly.

5 years agogskpango: Don't free rgba's we don't own
Matthias Clasen [Mon, 27 Jan 2020 18:34:21 +0000 (13:34 -0500)]
gskpango: Don't free rgba's we don't own

We don't copy them anymore, so don't free them.

5 years agofilechooser: Stop using gtk_style_context_get
Matthias Clasen [Mon, 27 Jan 2020 14:10:47 +0000 (09:10 -0500)]
filechooser: Stop using gtk_style_context_get

Just go to the css style directly.

5 years agoUpdate Brazilian Portuguese translation
Rafael Fontenelle [Mon, 27 Jan 2020 17:09:32 +0000 (17:09 +0000)]
Update Brazilian Portuguese translation

5 years agopopover: Fix an oversight in gap coord computation
Timm Bäder [Mon, 27 Jan 2020 12:01:37 +0000 (13:01 +0100)]
popover: Fix an oversight in gap coord computation

This caused a border to show up between the popover arrow and the
contents.

5 years agocalendar: Use widgets for the header
Timm Bäder [Mon, 27 Jan 2020 09:28:42 +0000 (10:28 +0100)]
calendar: Use widgets for the header

This is not meant to be a full GtkCalendar conversion to use widgets
instead of custom drawing, but we lost the arrows in the calendar header
when builtin icons were removed. Using proper button for the year/month
buttons brings them back.

5 years agoUpdate Malay translation
Umarzuki Bin Mochlis Moktar [Mon, 27 Jan 2020 12:25:12 +0000 (12:25 +0000)]
Update Malay translation

5 years agoUpdate Malay translation
Umarzuki Bin Mochlis Moktar [Mon, 27 Jan 2020 12:22:47 +0000 (12:22 +0000)]
Update Malay translation

5 years agoUpdate Friulian translation
Fabio Tomat [Mon, 27 Jan 2020 08:56:42 +0000 (08:56 +0000)]
Update Friulian translation

5 years agoUpdate Slovak translation
Dušan Kazik [Mon, 27 Jan 2020 07:01:51 +0000 (07:01 +0000)]
Update Slovak translation

5 years agocss: Don't lose inset when computing shadows
Matthias Clasen [Mon, 27 Jan 2020 01:16:16 +0000 (20:16 -0500)]
css: Don't lose inset when computing shadows

This was showing up as reftest failures,
sporadically

5 years agogdkseatdefault: Unref removed slave devices
Sebastian Keller [Sun, 26 Jan 2020 23:59:56 +0000 (00:59 +0100)]
gdkseatdefault: Unref removed slave devices

Adding a slave device adds a ref, but removing it does not unref it.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/1358

5 years agogsk: Remove some unused defines
Timm Bäder [Sun, 26 Jan 2020 16:39:26 +0000 (17:39 +0100)]
gsk: Remove some unused defines

These are from the GVariant days of render nodes.

5 years agocssdimensionvalue: Remove an outdated comment
Timm Bäder [Sat, 25 Jan 2020 18:59:12 +0000 (19:59 +0100)]
cssdimensionvalue: Remove an outdated comment

It's actually implemented in gtkcssdimensionvalue.c these days.

5 years agocssboxes: Try to avoid doing work for rectangular boxes
Timm Bäder [Sat, 25 Jan 2020 18:40:54 +0000 (19:40 +0100)]
cssboxes: Try to avoid doing work for rectangular boxes

Use the new gtk_css_dimension_value_is_zero() to check if we really need
to e.g. apply a border radius at all.
We compute css boxes a lot so this makes sense here, it especially shows
up during pick(), where we need the border box.

5 years agodimensionvalue: Add gtk_css_{dimension,corner}_value_is_zero()
Timm Bäder [Sat, 25 Jan 2020 18:40:13 +0000 (19:40 +0100)]
dimensionvalue: Add gtk_css_{dimension,corner}_value_is_zero()

We can usually omit computations when the dimension value ends up being
zero anyway.

5 years agowidget: Restructure pick() a bit
Timm Bäder [Sat, 25 Jan 2020 18:39:28 +0000 (19:39 +0100)]
widget: Restructure pick() a bit

Don't even invert transforms if we can do it easily ourselves. This also
fixes a small GtkTransform memory leak.

5 years agorenderbackground: Avoid unnecessary work in snapshot_background()
Timm Bäder [Sat, 25 Jan 2020 15:21:00 +0000 (16:21 +0100)]
renderbackground: Avoid unnecessary work in snapshot_background()

5 years agoAdd pure and const annotations to various functions
Timm Bäder [Fri, 24 Jan 2020 12:17:09 +0000 (13:17 +0100)]
Add pure and const annotations to various functions

5 years agorender: Remove gtk_render_background_get_clip
Timm Bäder [Sat, 25 Jan 2020 15:20:00 +0000 (16:20 +0100)]
render: Remove gtk_render_background_get_clip

5 years agoRemove gtkutils{.c,private.h}
Timm Bäder [Sat, 25 Jan 2020 14:40:53 +0000 (15:40 +0100)]
Remove gtkutils{.c,private.h}

All but one functions are unused. Move the remaining one into
gtkmodules.c, its only caller.

5 years agocssparser: make a few local variables const
Timm Bäder [Sat, 25 Jan 2020 07:40:40 +0000 (08:40 +0100)]
cssparser: make a few local variables const

5 years agocssprovider: Parse selectors without a GList
Timm Bäder [Sat, 25 Jan 2020 07:33:51 +0000 (08:33 +0100)]
cssprovider: Parse selectors without a GList

The maximum length of this list in Adwaita is 18, so use a generous
maximum length of 64 for the selector list of a ruleset.

5 years agoGtkCssImageUrl: Implement is_computed()
Timm Bäder [Fri, 24 Jan 2020 15:02:34 +0000 (16:02 +0100)]
GtkCssImageUrl: Implement is_computed()

5 years agogl renderer: Avoid some work when rendering border nodes
Timm Bäder [Fri, 24 Jan 2020 10:29:43 +0000 (11:29 +0100)]
gl renderer: Avoid some work when rendering border nodes

5 years agocssimage: Add gtk_css_image_to_string()
Timm Bäder [Fri, 24 Jan 2020 10:21:38 +0000 (11:21 +0100)]
cssimage: Add gtk_css_image_to_string()

In line with all the other _to_string() implementations

5 years agowindow: Replace GtkStyleContext use to get surface transform
Timm Bäder [Fri, 24 Jan 2020 06:55:17 +0000 (07:55 +0100)]
window: Replace GtkStyleContext use to get surface transform

We have GtkCssBoxes for this these days.

5 years agoRevert "lookup stats"
Matthias Clasen [Sun, 26 Jan 2020 04:49:33 +0000 (23:49 -0500)]
Revert "lookup stats"

This reverts commit 3d9e3390f167a220e8775d08356259f420e045ce.

5 years agoRevert "css: Split style into groups"
Matthias Clasen [Sun, 26 Jan 2020 04:49:17 +0000 (23:49 -0500)]
Revert "css: Split style into groups"

This reverts commit 0df0de0b5db87248ad1371ee1bfc8a733ec079e4.

5 years agocss: Split style into groups
Matthias Clasen [Sun, 26 Jan 2020 04:16:06 +0000 (23:16 -0500)]
css: Split style into groups

5 years agoAdwaita: take out an unnecessary rule
Matthias Clasen [Sat, 25 Jan 2020 23:38:42 +0000 (18:38 -0500)]
Adwaita: take out an unnecessary rule

The comment says setting caret-color to currentColor
shouldn't be necessary, and it is right.

5 years agoAdwaita: drop the *
Matthias Clasen [Sat, 25 Jan 2020 23:20:40 +0000 (18:20 -0500)]
Adwaita: drop the *

5 years agolookup stats
Matthias Clasen [Sat, 25 Jan 2020 23:20:26 +0000 (18:20 -0500)]
lookup stats

5 years agoFix a scrollbar sizing issue
Matthias Clasen [Sat, 25 Jan 2020 20:05:14 +0000 (15:05 -0500)]
Fix a scrollbar sizing issue

The recent Adwaita changes inadvertendly made scrollbars
resize on hover. Fix that, by reinstating some lost rules.

5 years agoRevert "Ensure icon themes are loaded with other themes"
Matthias Clasen [Sat, 25 Jan 2020 19:30:25 +0000 (14:30 -0500)]
Revert "Ensure icon themes are loaded with other themes"

This reverts commit 88d26b75491c9a329a836c0d91a8f85ee3bc77d1.

This change caused GtkShortcutWindow to not work anymore,
and we are fixing icon themes differently, anyway.

5 years agoMerge branch 'style-context-redux' into 'master'
Matthias Clasen [Sat, 25 Jan 2020 19:29:20 +0000 (19:29 +0000)]
Merge branch 'style-context-redux' into 'master'

Stop using GtkStyleContext internally

See merge request GNOME/gtk!1353

5 years agopopover: Stop using style context getters
Matthias Clasen [Sat, 18 Jan 2020 16:48:30 +0000 (11:48 -0500)]
popover: Stop using style context getters

5 years agodrag icon: Stop using style context getters
Matthias Clasen [Sat, 18 Jan 2020 14:57:13 +0000 (09:57 -0500)]
drag icon: Stop using style context getters

Just go to the css node directly.

5 years agogskpango: Stop using style context getters
Matthias Clasen [Sat, 18 Jan 2020 14:50:04 +0000 (09:50 -0500)]
gskpango: Stop using style context getters

Just go to the css nodes directly.

5 years agowidget: Stop using style context internally
Matthias Clasen [Sat, 18 Jan 2020 08:12:01 +0000 (03:12 -0500)]
widget: Stop using style context internally

5 years agoAdd a profiler mark around renderer realization
Matthias Clasen [Sat, 25 Jan 2020 06:28:24 +0000 (01:28 -0500)]
Add a profiler mark around renderer realization

This takes time that is worth calling out.

5 years agoAdwaita: Fix some entry styling
Matthias Clasen [Sat, 25 Jan 2020 02:01:42 +0000 (21:01 -0500)]
Adwaita: Fix some entry styling

This was accidentally broken when parent selectors
were introduced here.