Closed
Bug 1278108
Opened 8 years ago
Closed 8 years ago
<input type="range"> does not display on Firefox 46 with GTK+ 3.20
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
RESOLVED
FIXED
mozilla51
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: c3526836, Assigned: stransky)
References
(Depends on 1 open bug, Blocks 1 open bug, )
Details
(Keywords: html5, platform)
Attachments
(2 files, 3 obsolete files)
4.64 KB,
image/png
|
Details | |
16.38 KB,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0 Build ID: 20160503215307 Steps to reproduce: Load any page with an <input type="range"> slider element, on an Archlinux system with default theming (Adwaita?). Actual results: Element space is consumed, but nothing but transparency is drawn instead. Although when you click on the element in order to create focus, an outline is visible (see screenshot). Expected results: A slider element should have been visible and usable.
Not that I could see and use this element normally in previous versions.
OS: Unspecified → Linux
Hardware: Unspecified → All
Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Updated•8 years ago
|
Keywords: inputmethod
>Not that I could see and use this element normally in previous versions.
Note that*
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Updated•8 years ago
|
Attachment #8760058 -
Attachment description: test page with focus on range element.png → screenshot of test with focus on range element
Assignee | ||
Comment 7•8 years ago
|
||
The GtkScale seems to have a quite complicated CSS scheme: https://developer.gnome.org/gtk3/stable/GtkScale.html We may need to find some subset which needs to be implemented by Gecko.
Comment 8•8 years ago
|
||
(In reply to Martin Stránský from comment #7) > The GtkScale seems to have a quite complicated CSS scheme: > https://developer.gnome.org/gtk3/stable/GtkScale.html > > We may need to find some subset which needs to be implemented by Gecko. Yes. AFAIK we don't need the marks, value, or fill. has-origin defaults to true, so maybe highlight should be drawn. I don't think we have in the past though, so that may be an existing issue.
Assignee | ||
Comment 9•8 years ago
|
||
The range itself can be rendered quite easily - we just need to use nodes like we do with scrollbars. A different part is to render it correctly - as Gtk does that. The thumb uses negative margin and overlaps the through in Adwaita style and size of the through itself is difficult to get - I didn't find a way how to derive it.
Assignee | ||
Comment 10•8 years ago
|
||
There's a basic patch for it. The scale is not rendered as well as native scales in gtk3.20 (it's a bit bigger) but it's the best I can produce now. We may also fix focus ring of the whole element (or don't draw it and draw only focus around the track).
Attachment #8763063 -
Flags: feedback?(karlt)
Assignee | ||
Comment 11•8 years ago
|
||
Comment on attachment 8763063 [details] [diff] [review] patch The focus is rendered twice. Once in moz_gtk_scale_paint() around the track (the small one) and there's also big focus around whole element - I have no idea where it comes from.
Comment 12•8 years ago
|
||
This does not fix the issue with Gtk 3.18.9 under fedora23.
Assignee | ||
Comment 13•8 years ago
|
||
(In reply to Bill Gianopoulos [:WG9s] from comment #12) > This does not fix the issue with Gtk 3.18.9 under fedora23. That's possible, I target it to 3.20.
Comment 14•8 years ago
|
||
I did just read back and the original reporter did say he does not know of any previous version where this ever worked, so fixing it for the new stuff might be sufficient. I thought this was a regression. I am doing a gtk2 build to run this testcase against.
Comment 15•8 years ago
|
||
(In reply to Martin Stránský from comment #13) > (In reply to Bill Gianopoulos [:WG9s] from comment #12) > > This does not fix the issue with Gtk 3.18.9 under fedora23. > > That's possible, I target it to 3.20. These are the errors I get under gtk2.18: (firefox:2728): Gtk-CRITICAL **: gtk_widget_get_style_context: assertion 'GTK_IS_WIDGET (widget)' failed (firefox:2728): Gtk-CRITICAL **: gtk_style_context_get_state: assertion 'GTK_IS_STYLE_CONTEXT (context)' failed (firefox:2728): Gtk-CRITICAL **: gtk_style_context_get_direction: assertion 'GTK_IS_STYLE_CONTEXT (context)' failed (firefox:2728): Gtk-CRITICAL **: gtk_render_slider: assertion 'GTK_IS_STYLE_CONTEXT (context)' failed
Comment 16•8 years ago
|
||
(In reply to Bill Gianopoulos [:WG9s] from comment #15) > (In reply to Martin Stránský from comment #13) > > (In reply to Bill Gianopoulos [:WG9s] from comment #12) > > > This does not fix the issue with Gtk 3.18.9 under fedora23. > > > > That's possible, I target it to 3.20. > > These are the errors I get under gtk2.18: I meant gtk3.18.
Comment hidden (obsolete) |
Comment 18•8 years ago
|
||
(In reply to Bill Gianopoulos [:WG9s] from comment #14) > I did just read back and the original reporter did say he does not know of > any previous version where this ever worked, so fixing it for the new stuff > might be sufficient. I thought this was a regression. I am doing a gtk2 > build to run this testcase against. OK. It took some doing because bug 1278236 broke building with the cairo-gtk2 toolkit. But, I finally got a gtk2 build to work and this does work under gtk2, so it is a valid regression bug.
Comment hidden (obsolete) |
Comment 20•8 years ago
|
||
(In reply to Bill Gianopoulos [:WG9s] from comment #16) > (In reply to Bill Gianopoulos [:WG9s] from comment #15) > > (In reply to Martin Stránský from comment #13) > > > (In reply to Bill Gianopoulos [:WG9s] from comment #12) > > > > This does not fix the issue with Gtk 3.18.9 under fedora23. > > > > > > That's possible, I target it to 3.20. > > > > These are the errors I get under gtk2.18: > > I meant gtk3.18. I also have an old 32-bit laptop that does not have enough memory to run Gnome3 so I am running fedora24 mate-compiz spin on that using the BlueMenta theme. This patch does not work for that case either.
Assignee | ||
Updated•8 years ago
|
Attachment #8763063 -
Flags: feedback?(karlt)
Assignee | ||
Comment 21•8 years ago
|
||
Fixed one, works also on pre3.20.
Attachment #8763063 -
Attachment is obsolete: true
Attachment #8764902 -
Flags: review?(karlt)
Comment 22•8 years ago
|
||
Nothing new here. Just updating so it applies on current mozilla-central.
Comment 23•8 years ago
|
||
(In reply to Bill Gianopoulos [:WG9s] from comment #22) > Created attachment 8776271 [details] [diff] [review] > Same patch, just fixing bitrot > > Nothing new here. Just updating so it applies on current mozilla-central. I give up on trying to keep patches here able to apply. Builds including this patch are available at http://www.wg9s.com/mozilla/firefox/ and the patch I ma using which applies at current trunk will be available here http://www.wg9s.com/mozilla/firefox/patches/scale.patch
Updated•8 years ago
|
Summary: <input type="range"> does not display on Firefox 46 with GTK+ → <input type="range"> does not display on Firefox 46 with GTK+ 3.20
Comment 24•8 years ago
|
||
Comment on attachment 8764902 [details] [diff] [review] patch Looks good, thanks. > moz_gtk_get_scale_metrics(GtkOrientation orient, gint* scale_width, >+ WidgetNodeType widget = (orient == GTK_ORIENTATION_HORIZONTAL) ? >+ MOZ_GTK_SCALE_HORIZONTAL : >+ MOZ_GTK_SCALE_VERTICAL; >+ GtkStyleContext* style = ClaimStyleContext(widget); >+ gtk_style_context_get(style, gtk_style_context_get_state(style), >+ "min-width", scale_width, >+ "min-height", scale_height, >+ nullptr); >+ ReleaseStyleContext(style); I suspect the trough, and maybe even the slider should also be considered here, but what you have here should work for Adwaita, so let's go with what you have for now at least.
Attachment #8764902 -
Flags: review?(karlt) → review+
Assignee | ||
Comment 26•8 years ago
|
||
Thanks, there's a patch for check-in. Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b40290a5a7f9
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Updated•8 years ago
|
Attachment #8776271 -
Attachment is obsolete: true
Updated•8 years ago
|
Attachment #8764902 -
Attachment is obsolete: true
Updated•8 years ago
|
Assignee: nobody → stransky
Comment 27•8 years ago
|
||
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/ef6de41494f3 Implement <input type="range"> on gtk 3.20. r=karlt
Keywords: checkin-needed
Comment 28•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ef6de41494f3
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Comment 29•8 years ago
|
||
could you please backport this to 48–50? it’s pretty bad to be unable to see UI elements…
Assignee | ||
Comment 30•8 years ago
|
||
(In reply to flying sheep from comment #29) > could you please backport this to 48–50? it’s pretty bad to be unable to see > UI elements… Is there any real website which uses that range UI element? Maybe some router admin UI something?
Comment 31•8 years ago
|
||
It's a regression bug, not a feature request, so why shouldn't it be in a bugfix release?
Comment 32•8 years ago
|
||
It's a regression in GTK, not a regression in Firefox. Uplifting workarounds for GTK regressions are evaluated based on the need and difficultly.
Keywords: regression
Comment 33•8 years ago
|
||
This takes the sting off it, true. We can't be expected to work around other products’ breakages the week they occur in. But even without putting it into the current version, Firefox 51 is something I'd expect a new feature to end up in, not a fix. A HTML 5 element not being usable on Linux until 2017-01-24 is pretty bad.
Comment 34•8 years ago
|
||
(In reply to flying sheep from comment #33) > This takes the sting off it, true. We can't be expected to work around other > products’ breakages the week they occur in. > > But even without putting it into the current version, Firefox 51 is > something I'd expect a new feature to end up in, not a fix. > > A HTML 5 element not being usable on Linux until 2017-01-24 is pretty bad. Well this dialog really does not belong int he bug, but it would seem to me there are 2 classes of Linux users, those who run nightlies and this is fixed, and those who run the provided by their linux distro in which case you should go through them to add this patch to the version they distribute.
You need to log in
before you can comment on or make changes to this bug.
Description
•