Commit Graph

51 Commits

Author SHA1 Message Date
Karl Tomlinson
d9a76a0fbd bug 1320860 adjust textarea style contexts for GTK 3.20 theming ABI changes r=stransky+263117+263117
MozReview-Commit-ID: JTQO5bK5Yvv
2016-12-30 13:44:55 +13:00
Karl Tomlinson
8f181fea80 bug 1320860 introduce MOZ_GTK_TEXT_VIEW_TEXT and move MOZ_GTK_RESIZER to WidgetStyleCache r=stransky+263117+263117
The style context for MOZ_GTK_TEXT_VIEW is now created by copying from the
widget instead of caching a widget and using its context.

No rendering changes are expected, unless themes are animating GtkTextView
backgrounds.

MozReview-Commit-ID: 9aW61kMkKcb
2016-12-30 13:37:51 +13:00
Karl Tomlinson
65b8ca084e bug 1320860 Back out changeset a6aabcb07a6e for causing bug 1322120 or bug 1324262 2016-12-29 18:05:42 +13:00
Karl Tomlinson
963c750761 bug 1323860 implement pre-3.20 MOZ_GTK_PROGRESS_CHUNK in WidgetStyleCache r=stransky
MozReview-Commit-ID: 1VOZKRw3gj4
2016-11-25 17:51:13 +13:00
Sebastian Hengst
ad85257172 Backed out changeset 83021e7eb511 (bug 1319650) for various form styling issues on Linux. r=backout 2016-12-01 22:39:20 +01:00
Sebastian Hengst
b7113b347f Backed out changeset 70d7c1534715 (bug 1319650) 2016-12-01 22:38:36 +01:00
Karl Tomlinson
21c1158c78 bug 1319650 mimic gtk_style_context_save() in WidgetStyleCache with a new context r=stransky+263117
This makes balancing with gtk_style_context_restore()/ReleaseStyleContext()
unnecessary, and the style resolution cached in the style contexts is not
invalidated so frequently.

MozReview-Commit-ID: BKwyqoQsjv2
2016-11-23 16:41:57 +13:00
Karl Tomlinson
e3fb1b16a8 bug 1319650 implement pre-3.20 MOZ_GTK_PROGRESS_CHUNK in WidgetStyleCache r=stransky+263117
MozReview-Commit-ID: 1VOZKRw3gj4
2016-11-25 17:51:13 +13:00
Karl Tomlinson
e88b7b9354 bug 1320860 adjust textarea style contexts for GTK 3.20 theming ABI changes r=stransky+263117
MozReview-Commit-ID: 9aW61kMkKcb
2016-11-29 17:58:00 +13:00
Phil Ringnalda
8e037f5d9e Backed out changeset eb4be9ed211e (bug 1319650) for reftest and chrome bustage
CLOSED TREE
2016-11-24 19:30:48 -08:00
Karl Tomlinson
bc19bf8a4a bug 1319650 mimic gtk_style_context_save() in WidgetStyleCache with a new context r=stransky+263117
This makes balancing with gtk_style_context_restore()/ReleaseStyleContext()
unnecessary, and the style resolution cached in the style contexts is not
invalidated so frequently.

MozReview-Commit-ID: BKwyqoQsjv2
2016-11-23 16:41:57 +13:00
Karl Tomlinson
4f292064c0 bug 1319957 don't realize widgets for their style r=stransky+263117
This was needed in GTK2 to get the style of the widget, but styles are almost
independent of widgets with GTK3, where realizing is not necessary to get the
style context.

MozReview-Commit-ID: GtL2FLDl9uA
2016-06-21 19:07:45 +12:00
Martin Stransky
52e97a953d Bug 1319066 - Move complete GtkTooltip stack to WidgetCache. r=karlt 2016-11-23 21:14:58 -05:00
Karl Tomlinson
9f7da10abd bug 1319355 remove unused MOZ_GTK_IMAGEMENUITEM r=stransky+263117
Unused since e7680c5fead3.

MozReview-Commit-ID: DYgeoJDxna9
2016-11-22 09:17:34 +13:00
Karl Tomlinson
f6af52b923 bug 1319353 CreateCSSNode: Copy classes from the parent style context to its corresponding node in the path r=stransky+263117
This is necessary for GTK to match CSS rules against classes on ancestor nodes
of style contexts constructed from paths.

It can be tested with the following in ~/.config/gtk-3.0/gtk.css

tooltip.background label {padding: 100px;}

MozReview-Commit-ID: EUQ9ndeSl1Z
2016-11-16 16:55:13 +13:00
Karl Tomlinson
25a4e92e9d bug 1317574 rename radio/check menuitem and indicator as used with ClaimStyleContext r=stransky+263117
The same name is retained for moz_gtk_widget_paint(), which is now more
consistent.

MozReview-Commit-ID: 9RtW66JQVGX
2016-11-18 13:01:27 +13:00
Karl Tomlinson
34f7188765 bug 1315668 construct menuitem style contexts from paths r=stransky+263117
instead of using the context belonging to a widget.
Only the style context is cached, instead of the whole widget.

Using the style context from a widget meant that rendering displayed the
initial appearance of animations after state changes, but there was no
invalidation to trigger the final rendering in the animations.

Style contexts constructed from paths do not incorporate animations.
(See gtk_css_path_node_update_style() in GTK.)  Therefore they provide the
appropriate rendering for Gecko's model, which is not expecting animations.

There is no mechanism available to display animations when using style
contexts constructed from paths, but the GtkWidget animation design is also
not suitable for rendering potentially multiple elements each in a different
state of their animation.

This contexts-from-paths approach can be extended also to other widget types,
but this is a smaller change intended for uplift to other branches to address
a regression in menuitem rendering.

MozReview-Commit-ID: EFV7swWQtm4
2016-11-15 17:11:14 +13:00
Karl Tomlinson
40e82b62d0 bug 1315668 CreateStyleForWidget: store classes on context instead of path r=stransky+263117
CreateStyleForWidget() then provides the same behavior with
g_style_context_save() as contexts from widget root style nodes.

MozReview-Commit-ID: 6lRCp3XOoRr
2016-11-15 15:29:06 +13:00
Martin Stransky
df94139f63 Bug 1282753 - implement combo boxes by WidgetCache, r=?karlt
MozReview-Commit-ID: FrMbxT2D5p0
2016-10-19 15:13:25 +13:00
Jan Horak
f71df8475d Bug 1289148 - Fixing scrollbar metrics for GTK >= 3.20 r=karlt
The Gtk 3.20 scrollbars has moved towards usual box model. The scrollbar,
trough,thumb and scrollbar button can now have margin, padding and border set,
different for each direction (ie. left, right, bottom, top). The scrollbar
metrics become ignored in Gtk 3.20 and later.

* Draw scrollbar element [for GTK 3.20+]
* The border for scrollbar, trough, thumb and scrollbar buttons is newly
  calculated as margin+padding+border [for GTK 3.20+].
* The margin is subtracted for scrollbar, trough and sb buttons during paint
  function [for GTK 3.6+]
* All scrollbar widget's borders transfered from
  nsNativeThemeGTK::GetWidgetBorder to the moz_gtk_get_widget_border.
* Added helper function NativeThemeToGtkTheme for mapping mozilla's widget type
  to the gtk widget type.
* Scrollbar troughs are now drawn even when there is not enough room for
  the thumb [GTK 3.20+]

MozReview-Commit-ID: jd2q67gKM1
2016-10-17 11:37:13 +13:00
Karl Tomlinson
a3e5a650c7 bug 1301194 be more careful to only invalidate style context when state changes r=stransky+263117
Previously oldState differed from aStateFlags just because it contained
direction flags.

MozReview-Commit-ID: DuGpHdt9EuX
2016-09-08 10:12:55 +12:00
Martin Stransky
fa1ccd5b2b Bug 1271524 - Move tab widget to WidgetCache. r=acomminos 2016-08-21 23:13:00 -04:00
Martin Stransky
15688726bc Bug 1278108 - Implement <input type="range"> on gtk 3.20. r=karlt 2016-08-19 05:20:00 -04:00
Martin Stransky
4f6fd28ddd Bug 1266914 - cache newly created style, r=karlt 2016-08-08 03:10:00 +02:00
Martin Stransky
41cb9a2b59 Bug 1289763 - Move gImageMenuItemWidget/gCheckMenuItemWidget to WidgetCache, r=acomminos 2016-07-28 03:54:00 +02:00
Martin Stransky
35eae4bc84 Bug 1289764 - Move gHPanedWidget/gVPanedWidget to WidgetCache, r=acomminos 2016-07-29 05:30:00 +02:00
Martin Stransky
5d4cb9f38e Bug 1288413 - Move GtkTreeView widgets to WidgetCache, r=acomminos 2016-07-29 05:15:00 +02:00
Martin Stransky
5bbaa243a0 Bug 1290048 - Remove gtk_style_context_set_state/gtk_style_context_set_direction after ClaimStyleContext() call. r=acomminos 2016-07-28 04:13:00 -04:00
Andrew Comminos
6948f93ec5 Bug 1266914 - Use the border subnode for GtkFrame to fetch border colours. r=karlt
MozReview-Commit-ID: 4muOcOStA7A
2016-07-25 10:32:12 -04:00
Martin Stransky
d10708ff29 Bug 1288696 - Move MenuSeparatorWidget to WidgetCache, r=acomminos 2016-07-25 05:40:00 +02:00
Martin Stransky
6b8c589191 Bug 1288412 - Move GtkScrolledWindow to WidgetCache, r=acomminos
Land Bug 1282753 before this one.
2016-07-25 06:46:00 +02:00
Martin Stransky
98afb70192 Bug 1282753 - move button and entry widgets from gtk3drawing to WidgetCache, r=andrew@comminos 2016-07-20 01:57:00 +02:00
Martin Stransky
b5347794dc Bug 1287085 - Move GtkInfoBar from gtk3drawing to WidgetCache. r=acomminos 2016-07-19 00:03:00 -04:00
Martin Stransky
80b969dc5e Bug 1287080 - Move Toolbar, Frame and Gripper widgets from gtk3drawing to WidgetCache, r=acomminos 2016-07-18 05:29:00 +02:00
Martin Stransky
d00e7467cf Bug 1287082 - Move GtkExpander widget from gtk3drawing.cpp to WidgetCache, r=acomminos 2016-07-18 04:27:00 +02:00
Karl Tomlinson
30611b2ef6 bug 1280951 copy tooltip style context and cache that instead of widget r=stransky+263117
MozReview-Commit-ID: 6thXro9uYHn
2016-06-22 16:46:24 +12:00
Martin Stransky
1fc41ad555 Bug 1275407 - Adds CSS contents node to have correct scrollbar background on Gtk >= 3.20. r=karlt
Also derive default widget style from widget path. r=?karlt
Patch from Bug 1250704 needs to land prior to this one.
2016-06-13 03:35:00 +01:00
Karl Tomlinson
d83b8739d3 Bug 1250704 - use same widget heirarchy as GTK for tooltip text color. r=stransky
MozReview-Commit-ID: 41sDYu3IqYq
2016-06-07 18:06:04 +12:00
Martin Stransky
2926ec02fe Bug 1271523 - Construct tooltip style from path for Gtk >= 3.20, r=karlt
To apply it needs a patch from Bug 1277818.

MozReview-Commit-ID: 3xhYDliL4iw
2016-06-07 06:22:00 +02:00
Carsten "Tomcat" Book
96ab069dc3 Backed out changeset a7334430aef0 (bug 1271523) for valgrind leak 2016-06-08 13:46:26 +02:00
Carsten "Tomcat" Book
7b7da2aa80 Backed out changeset af36af25ecf4 (bug 1250704) 2016-06-08 13:46:11 +02:00
Karl Tomlinson
3cca0de956 Bug 1250704 - use same widget heirarchy as GTK for tooltip text color. r=stransky
MozReview-Commit-ID: 41sDYu3IqYq
2016-06-07 18:06:04 +12:00
Martin Stransky
353d7b864e Bug 1271523 - Construct tooltip style from path for Gtk >= 3.20, r=karlt
To apply it needs a patch from Bug 1277818.
2016-06-07 06:22:00 +02:00
Martin Stransky
efa122abb8 Bug 1277818 - exports CreateCSSNode() and divides pre/post 3.20 styles construction, r=karlt 2016-06-07 02:49:00 +02:00
Martin Stransky
65ff93c00a Bug 1273013 - "download progress bar does not show in gtk3 build." r=karlt 2016-05-24 13:43:00 +02:00
Karl Tomlinson
520af6fcdc bug 1272194 explicitly invalidate after change style contexts belonging to widgets r=stransky+263117
This fixes menu item rendering during hover.

MozReview-Commit-ID: CEa6aorqBZM
2016-05-17 18:15:12 +12:00
Karl Tomlinson
61c438e995 bug 1272194 use WidgetStyleCache for menus r=stransky+263117
Unnecessary widget realization is also removed.

MozReview-Commit-ID: A5HuE5bqf4x
2016-05-17 18:24:55 +12:00
Martin Stransky
6dbc649274 Bug 1271579 - Set GtkTextDirection and GtkStateFlags in ClaimStyleContext, r=karlt 2016-05-17 12:52:04 -07:00
Martin Stransky
49b896a119 Bug 1262136 - implement checkboxes/radiobuttons for GTK 3.20, r=karlt
MozReview-Commit-ID: 2mjpxT6b2xh
2016-05-13 11:59:17 +12:00
Jan Beich
96c2450cf1 Bug 1271477 - Unbreak --disable-dbus build after bug 1234158. r=karlt 2016-05-09 18:50:00 +02:00