Commit Graph

893 Commits

Author SHA1 Message Date
Karl Tomlinson
d867015f02 bug 1319355 remove unused gtk_widget_path_append_for_widget stub r=stransky+263117
No longer required after 1693f10ca33e

MozReview-Commit-ID: ErlBjxO0cbl

--HG--
extra : rebase_source : 49a676fbfa3e5e018aeb5de5e08a541bd51856b7
2016-11-18 11:14:21 +13:00
Karl Tomlinson
42b8d039df 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

--HG--
extra : rebase_source : 95c267c5495791a40e755aacf14a80c750fbedd2
2016-11-16 16:55:13 +13:00
Karl Tomlinson
007ef6f95f bug 1315527 check root node of frame for border color if no border on the "border" subnode r=stransky+263117
Some themes do not draw the "border" subnode, but instead draw a border on the
frame root node.

MozReview-Commit-ID: Fx67mQhhYmz

--HG--
extra : rebase_source : 150168171d521df2c603541e33b10ca287b26b43
2016-11-21 18:07:48 +13:00
Karl Tomlinson
26e9c3ad6d bug 1317574 adjust menuitem padding and check/radio indicator position for changes in GTK 3.20 r=stransky+263117
MozReview-Commit-ID: DXTbezxpcqM

--HG--
extra : rebase_source : 10c19f3898baee680e856c5b86a17544a16a4fdb
2016-11-21 17:27:11 +13:00
Karl Tomlinson
faebf933c8 bug 1317574 rename subtract_margin and rectangle_inset to Inset* and swap InsetByMargin parameters for consistency r=stransky+263117
MozReview-Commit-ID: 8vgsoj4TGz0

--HG--
extra : rebase_source : 93958a959af0933b8318f5ad78360270407cdabb
2016-11-21 17:16:37 +13:00
Karl Tomlinson
759a5af4c7 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

--HG--
extra : rebase_source : 3067daa4e9347cf689e9dccbd7e07578b52cf59c
2016-11-18 13:01:27 +13:00
Karl Tomlinson
d330e98d0d bug 1317574 use menuitem padding between menuitem and check indicator r=stransky+263117
MozReview-Commit-ID: JZSIVf8xppi

--HG--
extra : rebase_source : 645dff2f7cab024eef45f3cd6896015abd8e4a73
2016-11-15 15:57:46 +13:00
Karl Tomlinson
d3a1edee46 bug 1303964 draw only background and frame of separator menuitems in GTK versions > 3.20 r=stransky+263117
In GTK 3.20, gtk_menu_item_draw() just draws the root widget gadget, depending
on the theme to style menu items with CSS name "separator" appropriately.

MozReview-Commit-ID: 6AIxPzFe0Rg

--HG--
extra : rebase_source : 58a1ab4c78d94cf186e923354332ecb30aa491f8
2016-11-17 11:08:33 +13:00
Karl Tomlinson
591c93a17d bug 1287036 draw separator menuitem background and frame behind separator in menu r=stransky+263117
as does gtk_menu_item_draw().

MozReview-Commit-ID: DgYVFklmTO2

--HG--
extra : rebase_source : adfd74208e24aa6e64ae2802d0722d65d22d7ebb
2016-11-17 11:04:13 +13:00
Karl Tomlinson
1d4e286029 bug 1287036 draw menuitem background even when not in hover r=stransky+263117
MozReview-Commit-ID: tuf5WXY0d4

--HG--
extra : rebase_source : 52c9afca0b35d867ebff6657140ca4ed94db01dc
2016-07-21 12:49:31 +12:00
Karl Tomlinson
f1b0f33678 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

--HG--
extra : rebase_source : 689f7340007c889ce0eaeb3b4acd228d45ad0d6d
2016-11-15 17:11:14 +13:00
Karl Tomlinson
58fe36c651 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

--HG--
extra : rebase_source : ad161eef11e0dc70c8a487c204f109eceac3b1c4
2016-11-15 15:29:06 +13:00
Karl Tomlinson
7128eab794 bug 1315668 use style context instead of widget for menuitem dimensions r=stransky+263117
This is necessary to switch from caching GtkWidgets to caching
GtkStyleContexts only.

MozReview-Commit-ID: 6Rwinr4AY8l

--HG--
extra : rebase_source : 930a501b3ecd5f124631e3f96fd6ca7611d078ff
2016-11-15 16:11:38 +13:00
Karl Tomlinson
e8416905f1 bug 1315668 remove use of gtk_container_get_border_width from menuitems r=stransky+263117
The GtkContainer border-width property defaults to zero.  It is not influenced
by theme CSS.  While theme engines can theoretically modify default values for
properties of any class, I don't think that is something that needs to be
supported.

Removing this code is necessary to switch from caching GtkWidgets to caching
GtkStyleContexts only.

MozReview-Commit-ID: IxgM8qjfK3a

--HG--
extra : rebase_source : c5c94c19227d7e7d31c4a094bb4fb68f094ddb50
2016-11-14 16:13:50 +13:00
Kan-Ru Chen
f8100451db Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm
We will use the new type for the generated IPDL message handler
prototype to make sure correct error handling method is called.

MozReview-Commit-ID: AzVbApxFGZ0
2016-11-15 04:26:00 +01:00
Jan Horak
cf2b65692c Bug 1308936 - Draw tooltips correctly r=karlt
Tooltip widget is made in GTK3 as following tree:
* Tooltip window
 * Horizontal Box
   * Icon (not supported by Firefox)
   * Label
Each element can be fully styled by CSS of GTK theme so we have to draw all
elements with appropriate offset and full box model.

MozReview-Commit-ID: E9yYd5UWBu4

--HG--
extra : amend_source : 99539e914e8d3fa07f6bed8a315e40c7d593f277
2016-11-11 11:31:29 +13:00
Jonathan Watt
07c5338755 Bug 1313525 - Remove the nsIPrintOptions interface. r=mstange
--HG--
rename : widget/nsIPrintOptions.idl => widget/nsIPrinterEnumerator.idl
2016-10-28 00:31:14 +01:00
Kartikaya Gupta
d84df5e838 Bug 1315477 - Remove some instances of static_cast'ing to ClientLayerManager. r=mattwoodrow
MozReview-Commit-ID: 2oqoOE4gZK0

--HG--
extra : rebase_source : eb4bebeb6b79ec83a285facf7fde61ecbd705c43
2016-11-07 11:38:44 -05:00
Ryan Hunt
ad202d92b4 Bug 1304637 - Move back to using window display for basic composition paths. r=lsalzman
MozReview-Commit-ID: CutLou4qJi
2016-10-27 14:39:59 -04:00
Jan Horak
c2721a5026 Bug 1310850 - Zero scrollbar size could also happen when running GTK 3.20 so we need to set the minimum size of the scrollbar to the minimum size of a thumb. r=karlt
--HG--
extra : rebase_source : eb3ebb6c343dfb09f6d8723f22d76f32f3d7da72
2016-10-25 11:27:00 -04:00
Carsten "Tomcat" Book
bc8b0b30ea Backed out changeset 67c74a5cfcda (bug 1310850) for bustage 2016-10-25 10:17:34 +02:00
Jan Horak
06cdc2c9fc Bug 1310850 - Zero scrollbar size could also happen when running GTK 3.20 so we need to set the minimum size of the scrollbar to the minimum size of a thumb. r=karlt
--HG--
extra : rebase_source : e18b10da33322c2e4d936694f66788f3002669a2
2016-10-20 02:40:00 +02:00
Neil Deakin
99e8db203b Bug 1287823, When a file is available in the drag data we provide, and no uri is available, get the uri of the file and use it as the text/uri-list data, r=karlt 2016-10-21 11:22:15 -04:00
Karl Tomlinson
19ee6ebe3b bug 1311604 consider block flow direction in vertical writing mode native widget layout r=jfkthame
This follows the same approach of considering block flow for all widgets
(in addition to resizers) as done for other toolkits in
https://hg.mozilla.org/mozilla-central/rev/4a65cacf8a37#l3.10

MozReview-Commit-ID: Ca3SMs1k2Tj

--HG--
extra : rebase_source : 9845e676aa2db5eecd222b7e8a678b2aecca659e
2016-10-20 17:57:55 +13:00
Neil Deakin
68ac95182c Bug 1301673, use device pixels for the supplied drag position and the computed dragrectangle, r=tn 2016-10-19 15:01:39 -04:00
Neil Deakin
12c7b914da Bug 1301673, use more specific coordinates for screen position in drag calculations, r=tn 2016-10-19 15:01:39 -04:00
Carsten "Tomcat" Book
036a7c4324 merge mozilla-inbound to mozilla-central a=merge 2016-10-19 17:02:38 +02:00
Martin Stransky
4eaa17a7e4 Bug 1282753 - implement combo boxes by WidgetCache, r=?karlt
MozReview-Commit-ID: FrMbxT2D5p0

--HG--
extra : rebase_source : 4a9205597101ca283a05e92a15c0a1d188dae7cd
2016-10-19 15:13:25 +13:00
Eric Rahm
1eb4ae7e0d Bug 1309698 - Remove usage of nsISupportsArray from nsIDragService. r=smaug 2016-10-18 11:56:20 -07:00
Carsten "Tomcat" Book
d6850a3a86 merge mozilla-inbound to mozilla-central a=merge 2016-10-17 11:19:02 +02:00
Eric Rahm
52edf921c1 Bug 1310017 - Remove nsISupportsArray usage from nsITransferable and nsIFormatConverter. r=smaug
This converts |nsITransferable.flavorsTransferableCanExport| and
|nsITransferable.flavorsTransferableCanImport| to return a |nsIArray|.

|nsIFormatConverter.getInputDataFlavors| and
|nsIFormatConverter.getOutputDataFlavors| are updated as well.
2016-10-16 12:43:56 -07:00
Jan Horak
b1c2f1be2f 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

--HG--
extra : rebase_source : ecc8b85401845113d84c6c5a48219a0c3d4f8de3
2016-10-17 11:37:13 +13:00
Makoto Kato
29c2ee2410 Bug 1287278 - dropmaker-icon direction is wrong in RTL locale on Linux. r=karlt
Change only right arrows to left arrows when direction is RTL

MozReview-Commit-ID: 3mMCAGCIUYP

--HG--
extra : rebase_source : 54fb3bc6455f2117cb0ddae06c4f895f58204d0f
extra : amend_source : 1398b66e4184c71755801c94ecdc2c22ab961ec0
extra : histedit_source : c17fae6ae45191a685af4274d5a6789fb040d691
2016-10-14 13:37:08 +09:00
Makoto Kato
4e4bd01aae Bug 1033483 - Send bidi keyboard Information on direction-changed signal. r=karlt
Using direction-changed signal, we detect keyboard change for bidi.

When system uses fcitx's IM and ibus's arabic keyboard layout, this signal might fire often when switching layout and gdk_keymap_get_direction might return invalid bidi information.  But I think that this is rare issue.  Most users don't use Firefox Arabic version (it means that bidi.browser.ui = true) with ibus Arabic layout and fcitx CJK IM.  Since there is no GTK3 API to get current IM module, I cannot find workaround for this.

MozReview-Commit-ID: DL8uUXJFWYz

--HG--
extra : rebase_source : a93e8969b878d01048726e03b24f362ead7e2059
2016-10-10 16:42:03 +09:00
Nicolas Silva
9f87d72b3f Bug 1299860 - Don't use the compositor backend of a popup with ImageBridge and VRManager. r=Bas 2016-10-07 11:08:32 +02:00
Carsten "Tomcat" Book
2a026d93ba Backed out changeset 9fbc16390ef7 (bug 1299860) for bustage on a CLOSED TREE 2016-10-06 17:04:40 +02:00
Nicolas Silva
f10342b425 Bug 1299860 - Don't use the compositor backend of a popup with ImageBridge and VRManager. r=Bas 2016-10-06 16:39:56 +02:00
Phil Ringnalda
155ef02c4f Backed out changeset 64c6e5121479 (bug 1033483) for unexpected "Recursive GetService!" assertions
CLOSED TREE
2016-10-03 20:29:27 -07:00
Makoto Kato
c220f608ad Bug 1033483 - Send bidi keyboard Information on direction-changed signal. r=karlt
Using direction-changed signal, we detect keyboard change for bidi.

When system uses fcitx's IM and ibus's arabic keyboard layout, this signal might fire often when switing layout and gdk_keymap_get_direction might return invalid bidi infromation.  But I think that this is rare issue.  Most users don't use Firefox Arabic version (it means that bidi.browser.ui = true) with ibus arabic layout and fcitx CJK IM.  Since there is no GTK3 API to get current IM module, I cannot find workaround for this.

MozReview-Commit-ID: DL8uUXJFWYz

--HG--
extra : rebase_source : 18b7d5c84f48acd62fa14e21a67b711106fb7d63
2016-07-08 16:18:40 +09:00
Markus Stange
5f8c7d9f79 Bug 1306332 - Don't set a maximum size on the native window if SetSizeConstraints is called with magical "unconstrained" values. r=karlt
MozReview-Commit-ID: DdHrNjmxHQJ

--HG--
extra : rebase_source : 23df78e62082691ce9a73535a24114c91c365dfe
2016-10-03 15:29:34 -04:00
Enes Goktas
032c476db6 Bug 1302855 - Fold browsercomps into xul; r=bsmedberg
MozReview-Commit-ID: 8oaVngXFfh3

--HG--
extra : rebase_source : 2f5e770d04bd3f75778f242e3866b141df5bbff4
2016-09-27 19:54:37 -07:00
David Anderson
56cd5719ee Fix vsync sometimes not firing after the GPU process crashes. (bug 1305628, r=mattwoodrow) 2016-09-30 01:23:52 -07:00
Carsten "Tomcat" Book
5b45193594 merge mozilla-inbound to mozilla-central a=merge 2016-09-29 11:44:58 +02:00
Jonathan Kingston
8f10491335 Bug 1302157 - Remove images-in-menu and images-in-button code (& associated icons) since it's deprecated in GTK. r=bz,dholbert
MozReview-Commit-ID: IIj8PvgdaRp

--HG--
extra : rebase_source : 21eca47872a073b382c10fe84464fac8fafd6179
2016-09-29 00:22:32 +01:00
Ryan Hunt
7f1aff0d5c Bug 1304199 - Fix nsWindow::GetNativeData called with bad value. r=erahm
MozReview-Commit-ID: EwvoZCkmliH

--HG--
extra : rebase_source : b86d70a41e2238b90a6be8652fd4e31203add84f
2016-09-21 12:39:00 -04:00
Carsten "Tomcat" Book
dd4336be5d Backed out changeset 9ce619a6dcae (bug 1305628) for crashes 2016-09-28 11:12:07 +02:00
David Anderson
053ecfd3c3 Fix vsync sometimes not firing after the GPU process crashes. (bug 1305628, r=mattwoodrow) 2016-09-28 01:20:12 -07:00
Makoto Kato
4a28a26c93 Bug 1302980 - Don't reset IME context on preedit_end. r=masayuki
You know, when Korean IME commits string, then it sometimes set next preedit string.  So reseting context causes that next preedit string is committed.

So we shouldn't reset IME context with preedit_end.

MozReview-Commit-ID: CZJJvYjcrKY

--HG--
extra : rebase_source : d7e2e80930355794a40466c68fe22e43e7164d72
2016-09-16 18:00:25 +09:00
Carsten "Tomcat" Book
026552c22f merge mozilla-inbound to mozilla-central a=merge 2016-09-19 12:14:36 +02:00
Thomas Wisniewski
e2d5d5425f Bug 1302937 - Remove -moz-mac-lion-theme. r=mstange 2016-09-16 14:42:19 -04:00