File filters can make file selection dialog too wide for screen
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GTK+ |
Fix Released
|
Low
|
|||
One Hundred Papercuts |
Triaged
|
Low
|
Unassigned | ||
Ubuntu |
Invalid
|
Undecided
|
Unassigned | ||
gtk+2.0 (CentOS) |
New
|
Undecided
|
Unassigned | ||
gtk+2.0 (Ubuntu) |
Confirmed
|
Low
|
Unassigned | ||
Bug Description
Binary package hint: gnome-desktop-
This bug occurs in Firefox but is likely related to the generic Gnome file-selection-
In this case our website is calling OS file dialog via Firefox and JS/Flash, passing in a filter with a description (eg. "Photos and Videos"), and file extension-matching pattern (eg. "*.mov;
Windows dialogs tend to truncate this list, and expand only the drop-down when selected, open and active. Ubuntu/Gnome appears to make the dialog width match the width of the filter drop-down, which is quite long due to the number of file types and mixed-case scenarios (eg. *.jpg;*.JPG)
Due to the amount of file formats we're filtering based on, the dialog box can easily grow wider than the user's display permits.
See screenshot for illustration:
http://
Expected behavior would be to truncate the file filter list display past a certain point to prevent dialog box from growing too large.
Our testing confirms this behavior in both Ubuntu 7.10 and 8.04RC.
This bug prevents Ubuntu users from being able to use the advanced upload tool on Flickr.com from Firefox.
Changed in meta-gnome2: | |
status: | New → Invalid |
Alexander Sack (asac) wrote : | #1 |
Pedro Villavicencio (pedro) wrote : | #2 |
thanks for your report, that's known upstream you can track it here: http://
Changed in gtk+2.0: | |
assignee: | nobody → desktop-bugs |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in gtk: | |
status: | Unknown → New |
Changed in gtk: | |
status: | New → Confirmed |
Changed in hundredpapercuts: | |
milestone: | none → round-3 |
status: | New → Confirmed |
Rich Jones (richwjones) wrote : | #3 |
I've noticed this trying to upload to Flickr, something which a lot of users are likely to do, so this is a very relevant bug.
Jack (jackhynes) wrote : | #4 |
Such an annoying bug, the only 'paper cut' I was absolutely sure of.
David Siegel (djsiegel-deactivatedaccount) wrote : | #5 |
- Without image file types Edit (67.7 KiB, image/png)
The non-parenthesized text in the file type filter combo box is going to be descriptive enough in most cases, and users will practically always try to pick the target file before checking the file type filter. Drawing inspiration from the Open dialog in GIMP, the attached mockup shows the file chooser in the Flickr scenario with file extensions omitted. The extensions should instead be placed in a tooltip (the tooltip should line-wrap to avoid the same problem of being too wide for the screen).
Changed in hundredpapercuts: | |
assignee: | nobody → Canonical Desktop Team (canonical-desktop-team) |
affects: | meta-gnome2 (Ubuntu) → ubuntu |
Martin Pitt (pitti) wrote : | #6 |
The bug was forwarded upstream, and we don't have prominent applications which suffer from this, so we'll leave the fix to upstream.
Changed in gtk+2.0 (Ubuntu): | |
assignee: | Ubuntu Desktop Bugs (desktop-bugs) → nobody |
assignee: | nobody → Ubuntu Desktop Bugs (desktop-bugs) |
tags: | added: ct-rev |
Rick Spencer (rick-rickspencer3) wrote : | #7 |
Really? It seems that the flickr file upload experience is pretty prominent.
Martin Pitt (pitti) wrote : Re: [Bug 219385] Re: File filters can make file selection dialog too wide for screen | #8 |
Rick Spencer [2009-08-03 15:53 -0000]:
> Really? It seems that the flickr file upload experience is pretty
> prominent.
I have never ever seen it, but I never used flickr either. If a common
use case exposes this, I'm fine if our team works on it. It just seems
like a very corner case to me.
Martin Brook (martin.brook) wrote : | #9 |
The Flickr example is not the only case, although it is a prime example of the problem. I've encountered this several times in many different situations. It is quite confusing for a new user as it can appear as if the open button is simply missing.
Also, users of netbooks will tend to see this more often due to their smaller screens.
Javier Acuña Ditzel (santoposmoderno) wrote : | #10 |
- Dialog box too large horiz and vertic in small screens Edit (102.3 KiB, image/png)
As Martin Brook said, it actually happens on netbooks. And not only for the dialog width but the height as well, as you can see in the snapshot. So, I suggest to consider both aspects.
I use an HP Mini 110 (1024×576)
Changed in hundredpapercuts: | |
milestone: | round-3 → r2 |
Clive Darra (osde8info) wrote : | #11 |
also in xubuntu http://
Patrick Dickey (pdickeybeta) wrote : | #12 |
Would the fix be as simple as having just the type ("Picture or Image File" or "Video File") in the dialog, and having a tooltip pop up that shows the various extensions available in that format? Or would that create a different paper cut (in that people may be used to seeing things a certain way--especially former Windows users)?
Have a great day:)
Patrick.
Changed in hundredpapercuts: | |
importance: | Undecided → Low |
status: | Confirmed → Triaged |
leonidas (l-wallner) wrote : | #13 |
I just wanted to report that this bug also appears on my computer when i am using a web-fax-service in firefox. This website lets me upload lots of different file types to use as a fax, thus also the file choose dialog gets too long...
And this is definitely not a problem only happening in netbooks or systems with low display resolution, if there are enough file types in the filter list (as in the case of the fax-service), then it will also happen on "normal" desktops.
Changed in gtk: | |
status: | Confirmed → Fix Released |
David Tombs (dgtombs) wrote : | #14 |
Fixed upstream? Holy cow, finally! Please get this in Maverick!
Vish (vish) wrote : | #15 |
This has now been fixed upstream!
Changed in gtk+2.0 (Ubuntu): | |
assignee: | Ubuntu Desktop Bugs (desktop-bugs) → nobody |
status: | Triaged → Fix Committed |
Changed in hundredpapercuts: | |
status: | Triaged → Fix Committed |
Changed in gtk: | |
importance: | Unknown → Low |
Arek Olek (arekolek) wrote : | #16 |
It didn't make it to Maverick did it? I've just updated and yet it's still there :/
In Mozilla Bugzilla #627699, Jhorak (jhorak) wrote : | #20 |
Created attachment 505773
Very WIP patch
GTK+ 3.0 and GNOME 3 are approaching and we should get Firefox ready for them.
Attaching WIP patch which I've been working on with Martin Stransky. Patch also contain changes from bug #611953 (which are going to be removed in final version).
So far with this patch we are able to compile mozilla-central with GTK3, but there is still much work to do (fix exposing issues and couple of crashes).
In Mozilla Bugzilla #627699, Hussam-v (hussam-v) wrote : | #21 |
*** Bug 610234 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #22 |
Created attachment 513089
wip v2
updated version, against trunk, builds and runs. A gtk widget implementation is not finished yet, background is not rendered properly, sometimes crashes.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #23 |
Created attachment 513457
wip v3
fixed background rendering and style borders
In Mozilla Bugzilla #627699, Roc-ocallahan (roc-ocallahan) wrote : | #24 |
This looks like great work.
We need to think about how to support gtk2 for a while as well as gtk3. widget/src/gtk2 could be duplicated to widget/src/gtk3. Some of the rest of the code still works with gtk2 I guess.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #25 |
Most of the changes are in widget/
In Mozilla Bugzilla #627699, Jhorak (jhorak) wrote : | #26 |
Created attachment 515080
wip v4
We focused on wrongly drawn widgets:
- buttons/
- scrollbars
- treeview
- tabs
- and few crashes
We still have issues with menu and tooltips and random crashes which Martin is investigating. Also fonts are pink in specific desktop configuration.
In Mozilla Bugzilla #627699, Jhorak (jhorak) wrote : | #27 |
Created attachment 518712
WIP v5
Another WIP:
- Fixed wrong colors delived from GtkStyle
- Tabs better drawn
- Scrollbars looks fine now
- menu looks much better
- still some issues remains
Have a look and test with your GTK3 and favourite theme. Feedback welcomed.
In Mozilla Bugzilla #627699, Jhorak (jhorak) wrote : | #28 |
Created attachment 519093
WIP v6
Wrong patch, reuploading.
In Mozilla Bugzilla #627699, Hussam-v (hussam-v) wrote : | #29 |
I get this build error:
g++ -o nsWindow.o -c -I../..
In file included from /home/hussam/
/home/hussam/
/home/hussam/
/home/hussam/
/home/hussam/
/home/hussam/
/home/hussam/
/home/hussam/
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #30 |
It may be caused by some problem in your config files. I'm just finishing a patch which separates gtk3 code to widget/src/gtk3 and allows to build ff with both widgets so it addresses such issues.
In Mozilla Bugzilla #627699, Jhorak (jhorak) wrote : | #31 |
Created attachment 519919
WIP v7
Martin separated gtk3 from gtk2 so we now have original widgets/src/gtk2 and new widgets/src/gtk3. He's currently working on plugins (crash when we build with gtk3 and use gtk2 plugin).
Finished some widgets:
- scrollbars
- tabs
- fixed drag&drop but it still flicker when moving.
WIP: custom cursors, gtk3 miss gdkpixmap
Apply patch and build with --enable-
In Mozilla Bugzilla #627699, Hussam-v (hussam-v) wrote : | #32 |
Is the patch diffed against the RC tarball or latest HG? because I couldn't get it to patch against mozilla-central.
In Mozilla Bugzilla #627699, Josh Matthews (joshmatthews) wrote : | #33 |
It would be easier to read the patch if it were split into one which did the duplication and another which made the modifications to the new gtk3 dir.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #34 |
Using "hg copy" would make the duplication easier to follow (and may make splitting the modifications unnecessary).
In Mozilla Bugzilla #627699, Jhorak (jhorak) wrote : | #35 |
(In reply to comment #12)
> Is the patch diffed against the RC tarball or latest HG? because I couldn't get
> it to patch against mozilla-central.
It is diffed against changeset 62828:b1ef0685b2e0 (mozilla-central from Feb 18). We don't know how to make changes to our local hg repository and stay synced with mozilla-central in the same time. So we unbitrot patch from time to time.
In Mozilla Bugzilla #627699, Jhorak (jhorak) wrote : | #36 |
(In reply to comment #14)
> Using "hg copy" would make the duplication easier to follow (and may make
> splitting the modifications unnecessary).
Hm, I'll check the "hg copy", it looks like good idea.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #37 |
(In reply to comment #15)
> We don't know how to make changes to our local hg repository and stay
> synced with mozilla-central in the same time.
Getting the equivalent of git commit --amend is not quite trivial with mercurial.
Most people use the mq extension for this. It sounded a bit much effort to me, but, once I actually tried it, it wasn't so hard to learn.
https:/
This does come in very handy for separating projects into manageable-sized patches, particularly when each patch in the series is still under development.
The gtk2 plugin work at least should be separate from the base gtk3 patch (and perhaps could even be split into a number of smaller patches).
http://
In Mozilla Bugzilla #627699, Ventnor-bugzilla (ventnor-bugzilla) wrote : | #38 |
I've been doing my best to read the patch since I take particular interest in the native theming portion, but from what I can gather, doesn't GTK3's use of Cairo for drawing widgets mean we can bypass XlibNativeRenderer (and all it's ugly slowness) completely?
I may have missed this, but I don't see you setting the enable-system-cairo configure flag by default when GTK3 is built, which can cause nastiness.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #39 |
Sure, the code should be optimized and refactorised. Our goal is to create a minimal working patch and then improve it.
In Mozilla Bugzilla #627699, Jhorak (jhorak) wrote : | #40 |
(In reply to comment #18)
> I may have missed this, but I don't see you setting the enable-system-cairo
> configure flag by default when GTK3 is built, which can cause nastiness.
Yeah, we missed that. We use enable-system-cairo option of course, it should be probably part of configure.in patch.
In Mozilla Bugzilla #627699, Jhorak (jhorak) wrote : | #41 |
Created attachment 521184
WIP v8
Used hg copy for creating gtk3 directory.
Custom cursor fixed (RMB on toolbar/Customize)
I'm going to check the way to sync with mozilla-central.
In Mozilla Bugzilla #627699, Roc-ocallahan (roc-ocallahan) wrote : | #42 |
At some point we will probably have to stop supporting system cairo to get decent performance ... there may be big wins from punching through cairo's public API. We can make GTK3 require system cairo, for now, but later we'll probably need to create a way for them to coexist (and bridge them for theme drawing).
In Mozilla Bugzilla #627699, Ventnor-bugzilla (ventnor-bugzilla) wrote : | #43 |
Just reading more of this patch out of interest...
+++ b/embedding/
- ownerAsWidget-
- ownerAsWidget-
+ gtk_widget_
+ gtk_widget_
You mean allocated_height?
There's a lot of code duplication going on between GTK2 and GTK3. Do our JS and CSS preprocessors not support the && or || operators?
It'd be interesting to see if we can support Ubuntu's proposed overlay scrollbars, but that's for a later time...
Obviously we need system Cairo because the Cairo version on the system could be anything, but roc, I can't imagine how a bridge would work without cancelling out any performance gains we'd get from using the private API.
In Mozilla Bugzilla #627699, Roc-ocallahan (roc-ocallahan) wrote : | #44 |
Bridging would be relatively easy: figure out what the moz-cairo context is actually drawing to; construct a system-cairo context to draw to the same target; set its state to match the state of the moz-cairo context.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #45 |
(In reply to comment #19)
> Sure, the code should be optimized and refactorised. Our goal is to create a
> minimal working patch and then improve it.
If the "minimal working" code is based on existing gtk2 code, then it makes sense to even land this code first and do the optimization/
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #46 |
(In reply to comment #23)
> There's a lot of code duplication going on between GTK2 and GTK3. Do our JS and
> CSS preprocessors not support the && or || operators?
Unfortunately https:/
In Mozilla Bugzilla #627699, Ventnor-bugzilla (ventnor-bugzilla) wrote : | #47 |
(In reply to comment #26)
> (In reply to comment #23)
> > There's a lot of code duplication going on between GTK2 and GTK3. Do our JS and
> > CSS preprocessors not support the && or || operators?
>
> Unfortunately https:/
> claim the && or || are supported, I'd love to use them.
Have you tried? I'm somewhat sure I've seen/used them before...
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #48 |
As for the gtk2 plug-ins support inside gtk3 browser - I managed to build libxul for gtk3 and gtk2 simultaneously (Jan is going to attach the patch) and I expect we want to have two plugin-containers and select it when plug-in is loaded.
I expect we're not going to support gtk2 plug-ins inside gtk3 browser without OOP, right?
In Mozilla Bugzilla #627699, Caillon (caillon) wrote : | #49 |
We just disabled building without ipc (bug 638755), so you should expect it to be there, yes.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #50 |
Some plugins are still run in-process only (like Adobe reader) regardless of the ipc state.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #51 |
(In reply to comment #28)
> I expect we're not going to support gtk2 plug-ins inside gtk3 browser without
> OOP, right?
The only issue AFAIK would be a gtk2 java plugin.
Java plugins are "in-process by default on all platforms because of bugs
relating to window.java and various other things." (bug 640908 comment 5)
(I don't expect Xt plugins are using gtk2, but, I am trying to find time to review your patches to move Xt plugins OOP.)
In Mozilla Bugzilla #627699, Jhorak (jhorak) wrote : | #52 |
Created attachment 523284
WIP v9
Attaching rebased patch:
- Martin made gtk2 plugins in gtk3 code possible!
- Fixed custom mouse cursors
In Mozilla Bugzilla #627699, Ventnor-bugzilla (ventnor-bugzilla) wrote : | #53 |
jhorak, any updates on the patch or its status?
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #54 |
(In reply to comment #33)
> jhorak, any updates on the patch or its status?
Are you looking for something particular?
In Mozilla Bugzilla #627699, Ventnor-bugzilla (ventnor-bugzilla) wrote : | #55 |
(In reply to comment #34)
> (In reply to comment #33)
> > jhorak, any updates on the patch or its status?
>
> Are you looking for something particular?
Not necessarily, I just have a keen interest on this bug. Although I suppose I would like to know if you're making optimizations to native theme rendering since that was a big performance drag for us in GTK2.
In Mozilla Bugzilla #627699, Chris Coulson (chrisccoulson) wrote : | #56 |
(In reply to comment #23)
> It'd be interesting to see if we can support Ubuntu's proposed overlay
> scrollbars, but that's for a later time...
>
If you're interested in supporting those, I'd be more than happy to help out :)
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #57 |
> > Are you looking for something particular?
>
> Not necessarily, I just have a keen interest on this bug. Although I suppose I
> would like to know if you're making optimizations to native theme rendering
> since that was a big performance drag for us in GTK2.
Not yet. We're working on basic functionality (gtk rendering/plugins) and going to split the patch to separated pieces and ask for review for them.
But feel free to attach/send me any patch and we'll merge it with the recent patch set.
In Mozilla Bugzilla #627699, Jhorak (jhorak) wrote : | #58 |
Created attachment 525346
gtk3 directory patch v1
We're trying to divide changes to more patches. We start with gtk3 directory which has no effect to main tree until makefile/configure changes are pushed. It's still a big patch anyway. Please have a look and let us know how to proceed.
Arek Olek (arekolek) wrote : | #17 |
It is still there in Natty as well.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #59 |
Comment on attachment 525346
gtk3 directory patch v1
I've had a look at gtk3drawing and nsNativeThemeGTK, thanks.
I'll write some general comments here and attach specifics.
hg copy definitely makes reviewing easier (=faster), thank you.
Even something that compiles is a significant milestone, so in patches we're
not necessarily looking for complete solutions but monotonically improving
steps to get us to the goal. Patches involving logical steps are easier to
review (and track in history) than simply dividing changes across files. In
the beginning, patches to port specific files are fine, but try to pick
patches to avoid breaking APIs for callers changed in other patches.
What will help us track what remains to be done is a single way of marking
items that are unfinished. Most such items are marked to TODO here but some
are not.
If a drawing section needs significant updating and you'd prefer to leave that
for a later patch (which is fine), then I'd prefer an "#if TODO" block than
experimental changes that don't really work.
There should be something stating that the cairo_t passed to the
moz_gtk_
I assume there is no support for tiling themes in GTK3 - at least I can't
imagine how they would work.
It looks like the GTK3 style system is designed so that it is no longer
necessary to have a GtkWidget to draw the appropriate styling. If we were
writing gtk3drawing.c from scratch now, we'd probably use GtkStyleContext and
GtkWidgetPath. Following the GTK2 port and continuing to use widgets is a
sensible step where this works. For child widgets that are no longer
accessible through GTK3, it may be easier and cleaner to use
GtkStyleContext
GtkTreeView widget, for example.
As the new style system doesn't pass GtkWidgets to the theme engines, many of
the operations that were performed on the widgets now have no effect on
drawing, so there's no point updating them to new methods. This includes
the following methods and properties:
gtk_widget_
gtk_toggle_
gtk_adjustment_
gtk_widget_
"has-focus"
I think most of these can be removed, though some may need replacing with a
TODO indicating what remains to be done.
gtk_widget_
widget's StyleContext, but I'm not sure whether still is necessary.
The clip_rect argument should be unnecessary now, as that is already on the
cairo_t. ThemeRenderer:
(and I don't follow why it is important to remove the offsets).
In nsNativeThemeGT
renderer.Draw() (pass NULL, instead) as themes now draw to a cairo_t with any
target. That makes moz_gtk_
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #60 |
Created attachment 533890
specific comments on gtk3drawing
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #61 |
Thanks for the update. We already have a patch which completely works (only bug there I know about is broken rendering of menu separators when firefox is launched via. ssh). I'm going to port it to latest trunk and address your comments there.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #62 |
I'm concerned that copying the whole gtk2 directory is not going to lead to
the easiest way to maintain gtk2 and gtk3 ports.
Of 56 files copied, only 25 files include changes, and few of these have
significant changes.
Some of the minor changes would be fine even for our GTK2 builds
(against GTK+-2.10).
The majority of the other changes seem to be just changing from accessing
structs directly to using accessor methods.
This suggests that the best approach is to copy only the files with major
changes but keeping it in the same directory, just changing the makefile.
gtk3drawing.c deserves a copy for sure. I don't know whether there's any
other candidates.
Then there's a number of situations where the same code would work fine for
GTK 2 and 3. gdk_x11_
DefaultXDisplay() in X11Util.h, for example can replace GDK_DISPLAY() and are
fine in both ports. (Sometimes there's even a more appropriate function such
as gtk_clipboard_
nsBidiKeyboard.cpp can use PR_FindFunction
the library by soname. (If there's a reason why "We don't want it" for GTK3
then it should be stated.)
For nsGTKToolkit, GetSharedGC is not used so can be removed (or a stub if necessary).
For all the accessor methods, this can be simplified by modifying existing
files to use the new accessor functions, and adding a header file that is
included to define accessor functions when not available.
For example, one entry would be:
#if !GTK_CHECK_
static inline GdkWindow*
gtk_widget_
{
return widget->window;
}
#endif
In Mozilla Bugzilla #627699, Javier Jardón (jjardon) wrote : | #63 |
Hi, for the GTK+2 version, why not simply depend on the latest GTK+ version, ie 2.24? So you have all the accessor and you avoid the use of a lot of ifdefs
Also, why support the GTK+2 version at all? why not switch to GTK+3 completely?
In Mozilla Bugzilla #627699, Chris Coulson (chrisccoulson) wrote : | #64 |
Because it still needs to run on systems which don't support GTK3. For example, Ubuntu 10.04 LTS is supported until April 2013, and people do still use that.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #65 |
(In reply to comment #42)
> This suggests that the best approach is to copy only the files with major
> changes but keeping it in the same directory, just changing the makefile.
> gtk3drawing.c deserves a copy for sure. I don't know whether there's any
> other candidates.
Okay, I'm fine with that. The same approach is used in modules/
In Mozilla Bugzilla #627699, wavded (wavded) wrote : | #66 |
Is there anyway in the nightlies to play with / test the GTK3 version? Or is more involved? Excited to see work done on this.
In Mozilla Bugzilla #627699, Eric Appleman (erappleman) wrote : | #67 |
Unless someone is willing to publish binary, I imagine that GTK3 Firefox is still very much a from-scratch process.
On a somewhat related note, I'm curious to know whether GTK3 adoption will use pure GTK3 or a custom implementation similar to the GTK2 used by Firefox currently.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #68 |
Created attachment 538243
complete patch against latest trunk
A complete patch for latest trunk, It has a new directory structure in widget (widget/gtk2 and widget/gtk2/gtk3). I'm going to attach separated pieces for review and address the Karl's comments there.
In Mozilla Bugzilla #627699, Hussam-v (hussam-v) wrote : | #69 |
Doesn't apply to latest mozilla-central (I'm assuming that's trunk)
Hunk #10 FAILED at 166.
Hunk #11 FAILED at 200.
Hunk #12 FAILED at 212.
Hunk #13 FAILED at 237.
Hunk #14 succeeded at 308 with fuzz 2 (offset 17 lines).
Hunk #15 FAILED at 302.
Hunk #16 succeeded at 338 with fuzz 2 (offset 30 lines).
5 out of 16 hunks FAILED -- saving rejects to file dom/plugins/
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #70 |
Created attachment 540027
gtk drawing patch
Fixed the comments, except the gTreeHeaderCell
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #71 |
Created attachment 540030
mozcontainer.c patch
patch to widget/
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #72 |
Created attachment 540031
nsLookAndFeel.cpp patch
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #73 |
Created attachment 540032
gtk2/nsWindow.cpp patch
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #74 |
Created attachment 540034
gtk2 makefile patch
A Makefile patch.
Old (gtk2) library is built as widget/
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #75 |
Created attachment 540036
rest of gtk2 dir fixes
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #76 |
Created attachment 542343
gtk3drawing review comments 2
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #77 |
Comment on attachment 540030
mozcontainer.c patch
These are mostly changes involving accessor methods that could be made to the
existing mozcontainer.c (and used in both GTK+ 2 and 3 builds) with the help
of gtk2compat.h.
There are only 2 or 3 statements that need to be different, and these could be
handled through preprocessor conditionals.
>+ gtk_widget_
>
> tmp_list = container-
>@@ -336,10 +339,11 @@ moz_container_
> }
>
>- if (GTK_WIDGET_
>- gdk_window_
>- widget-
>- widget-
>- widget-
>- widget-
>+ gtk_widget_
>+ if (gtk_widget_
>+ gdk_window_
>+ tmp_allocation.x,
>+ tmp_allocation.y,
>+ tmp_allocation.
>+ tmp_allocation.
It should be fine to use the "allocation" variable here instead of using get_allocation to fetch the value just set. (I don't imagine calling size_allocate on children will change the parent's allocation.)
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #78 |
Created attachment 542725
nsWindow except drawing review comments
Comments on most of attachment 540032. The situation with the "draw" event is more complex and I need to think about that.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #79 |
DirectFB is no longer supported by GTK 3 and apparently even in 2 the backend hasn't worked since 2.18. It's probably time we stripped the DirectFB code, but at least here don't make any effort to maintain support.
http://
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #80 |
Created attachment 543317
nsWindow drawing review comments
I can think of 2 possible approaches with the cairo_t passed in the "draw"
signal.
1. We pay attention to everything in the cairo_t.
2. We assume that, because we have
gtk_
to the X Window for the GdkWindow using only the clip region on the
cairo_t.
Comments on the drawing part of attachment 540032.
Currently in this patch, approach 2 is used if UseShm() returns true or if the
layer manager is an OpenGL layer manager.
With basic layers, the approach here is taking the target surface from the
cairo_t in GetThebesSurface and then creating a gfxContext (with its new
cairo_t) around the target surface. This is pretty much approach 1. It is
not transferring the matrix from one cairo_t to the other, but I think that
actually works, even for client-side-windows where the GdkWindow is at an
offset from the X Window, because GTK/GDK uses separate cairo_surface_t's for
the client side windows sharing the same X Window
(gdk_window_
rather than the matrix.
I think this is all OK. I'm just writing it down, because it took me time
to get it clear in my head.
In Mozilla Bugzilla #627699, Diego Viola (diego-viola-deactivatedaccount) wrote : | #81 |
Does this means that if Firefox is ported to GTK+ 3, Firefox will run on Wayland?
Please support Wayland.
Thanks.
In Mozilla Bugzilla #627699, Andre Klapper (a9016009) wrote : | #82 |
(In reply to comment #61)
> Does this means that if Firefox is ported to GTK+ 3, Firefox will run on
> Wayland?
These two things are unrelated.
In Mozilla Bugzilla #627699, Diego Viola (diego-viola-deactivatedaccount) wrote : | #83 |
(In reply to comment #62)
> (In reply to comment #61)
> > Does this means that if Firefox is ported to GTK+ 3, Firefox will run on
> > Wayland?
>
> These two things are unrelated.
Sure, I just want to know if Firefox will work on Wayland once it's ported to GTK+ 3.
In Mozilla Bugzilla #627699, Diego Viola (diego-viola-deactivatedaccount) wrote : | #84 |
(In reply to comment #63)
> (In reply to comment #62)
> > (In reply to comment #61)
> > > Does this means that if Firefox is ported to GTK+ 3, Firefox will run on
> > > Wayland?
> >
> > These two things are unrelated.
>
> Sure, I just want to know if Firefox will work on Wayland once it's ported
> to GTK+ 3.
I ask this because GTK+ 3 has a Wayland back-end. Thanks for the help.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #85 |
Gecko's GTK/GDK X11 port uses some features of the GDK X11 backend, so porting to GTK3 is only part of work required for a GTK/Wayland port.
Marcus Haslam (marcus-haslam) wrote : | #18 |
I'm out of the office until 1st August.
On 30 Apr 2011, at 19:06, Arek Olek <email address hidden> wrote:
> It is still there in Natty as well.
>
> --
> You received this bug notification because you are a member of
> Papercutters, which is subscribed to One Hundred Paper Cuts.
> https:/
>
> Title:
> File filters can make file selection dialog too wide for screen
>
> Status in GTK+ GUI Toolkit:
> Fix Released
> Status in One Hundred Paper Cuts:
> Fix Committed
> Status in Ubuntu:
> Invalid
> Status in “gtk+2.0” package in Ubuntu:
> Fix Committed
> Status in “gtk+2.0” package in CentOS:
> New
>
> Bug description:
> Binary package hint: gnome-desktop-
>
> This bug occurs in Firefox but is likely related to the generic Gnome
> file-selection-
>
> In this case our website is calling OS file dialog via Firefox and
> JS/Flash, passing in a filter with a description (eg. "Photos and
> Videos"), and file extension-matching pattern (eg.
> "*.mov;
>
> Windows dialogs tend to truncate this list, and expand only the drop-
> down when selected, open and active. Ubuntu/Gnome appears to make the
> dialog width match the width of the filter drop-down, which is quite
> long due to the number of file types and mixed-case scenarios (eg.
> *.jpg;*.JPG)
>
> Due to the amount of file formats we're filtering based on, the
> dialog
> box can easily grow wider than the user's display permits.
>
> See screenshot for illustration:
> http://
>
> Expected behavior would be to truncate the file filter list display
> past a certain point to prevent dialog box from growing too large.
>
> Our testing confirms this behavior in both Ubuntu 7.10 and 8.04RC.
>
> This bug prevents Ubuntu users from being able to use the advanced
> upload tool on Flickr.com from Firefox.
In Mozilla Bugzilla #627699, Denis Washington (dwashington) wrote : | #86 |
Just out of curiosity, has any progress on this been made in the last month?
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #87 |
I'm porting it to latest trunk right now.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #88 |
Comment on attachment 540034
gtk2 makefile patch
I don't really grasp what's happening with the gtk2/gtk3 subdirectory here, but I suspect it has something to do with supporting GTK2 plugins in the GTK3 port.
We should get a build config peer[1] to review any such changes as some stage but, at this stage, I'd prefer not to think about plugins. I can review less structural changes to the build system.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #89 |
(In reply to Karl Tomlinson (:karlt) from comment #68)
> Comment on attachment 540034
> gtk2 makefile patch
>
> I don't really grasp what's happening with the gtk2/gtk3 subdirectory here,
> but I suspect it has something to do with supporting GTK2 plugins in the
> GTK3 port.
This patch allows to build the widget gtk2 module along with the gtk3 one. Each module needs an extra directory and many files are shared, so the easiest way is to build gtk3 as a subdir of gtk2.
It means that old gtk2 is built as /widget/
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #90 |
I assume the gtk2 module is only for plugin support.
There may be a few possible solutions to support gtk2 plugins.
e.g. one option might be to use a completely separate build to make a gtk2 libxul.
But I think the path here should be to get small changesets landed, so the whole series doesn't need to be remerged with trunk while other changesets are reviewed/modified. Leaving out gtk2 plugins is a good way to reduce the complexity in what gets done first.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #91 |
No, the gtk2 module is the recent one which is used by cairo-gtk2 target. The new one (gtk3) is the /widget/
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #92 |
To be clear, it's built as:
cairo-gtk2 target => /widget/src/gtk2 => widget_gtk2.a (there's no change there)
cairo-gtk3 target => /widget/
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #93 |
OK, thanks. I mis-assumed, then.
But then, only one of them needs to be made in a single build, right?
i.e. the build is either cairo-gtk2 or cairo-gtk3, so the object files for each build can appear in the same directory, much like how winnt/mac/
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #94 |
(In reply to Karl Tomlinson (:karlt) from comment #73)
> OK, thanks. I mis-assumed, then.
>
> But then, only one of them needs to be made in a single build, right?
> i.e. the build is either cairo-gtk2 or cairo-gtk3, so the object files for
> each build can appear in the same directory, much like how
> winnt/mac/
Yes, that's correct. But I think it's better to split the dirs. If you'd like to have a version without plugin support for now I'll prepare a patch with minimal build system changes in widget/gtk2, all build changes can be moved to widget/gtk2/gtk3 dir.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #95 |
If gtk2 plugin support is the only reason why it might be better to split the directories, then, yes, let's not do directory splitting before gtk2 plugins are added.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #96 |
(In reply to Karl Tomlinson (:karlt) from comment #75)
> If gtk2 plugin support is the only reason why it might be better to split
> the directories, then, yes, let's not do directory splitting before gtk2
> plugins are added.
No, I'd like to do the split because it's just easier.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #97 |
Created attachment 557147
v2. nsWindow/
There's an updated patch for nsWindow and gtk2compat.h files. I hope I addressed all your comments, except:
>+#if defined(
>+#include <gtk/gtkx.h>
>+#endif
> #ifdef MOZ_X11
> #include <gdk/gdkx.h>
> Something is not right here with including gtkx.h twice.
They are two different headers, gdk/gdkx.h and gtk/gtkx.h.
>+static PRInt32
>+GetBitmapStri
>+{
>+#ifdef MOZ_X11
>+ return (width+7)/8;
>+#else
>+ return cairo_format_
>+#endif
>+}
I keep here the logic from ApplyTransparen
>@@ -3984,7 +4131,9 @@ nsWindow:
> // WM_TAKE_FOCUS, focus is requested on the parent window.
> gtk_widget_
>- gdk_window_
>+#if defined(
>+ gdk_window_
> popup_take_
> #endif
>+#endif
> Any reason why this should be disabled with GTK3 for now?
I disabled it in GTK3 because it's aimed to support plugins on GTK2.
Enabled now, we can support it in GTK3 too.
>@@ -6398,5 +6688,7 @@ void
> nsWindow:
> {
>+#if defined(
> DispatchEventTo
>+#endif
> }
>
> I assume these are all TODO GTK3?
We disabled them because Gnome Shell does not handle these events nicely.
But let's enable it, there are other options than GS and they support them.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #98 |
Created attachment 557153
nsWindow.cpp - v3
sorry, there were some missing nits, fixed now.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #99 |
(In reply to Martin Stránský from comment #77)
> But is it possible to build GTK2/GTK3 without MOZ_X11?
That only ever worked with DirectFB, but now there's no reason to keep that working, if it still does even. (comment 59)
In Mozilla Bugzilla #627699, Hussam-v (hussam-v) wrote : | #100 |
what patches do I need to try this against latest trunk?
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #101 |
Comment on attachment 557153
nsWindow.cpp - v3
This is looking very good. I'll attach some review comments. Most things should be easy to touch up. The one exception is dealing with unref'ed GdkWindows during draw_window_
mozilla-central.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #102 |
Created attachment 561418
nsWindow review comments 2
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #103 |
Created attachment 561682
nsWindow.cpp, v4
I hope this addresses the comments. Changes to nsShmImage.
As for the draw_window_
With the GTK3/Xt plugins I meant "we don't care about Xt plugins" here :)
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #104 |
Comment on attachment 561682
nsWindow.cpp, v4
I think this can land for mozilla-central now
(but please check it passes try server).
(In reply to Martin Stránský from comment #83)
> If this or any other window is destroyed,
> get_window_
> right?
Yes, provided their GdkWindow parameter still exists.
> Or are you concerned with already obtained list of windows from
> children list?
Yes, and gdk_window_
Even events dispatched for painting can flush layout, causing JS notifications, and so anything can happen.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #105 |
Created attachment 561701
nsWindow.cpp, v4, commit friendly version, r=karlt
In Mozilla Bugzilla #627699, Bmo-edmorley (bmo-edmorley) wrote : | #106 |
Comment on attachment 561701
nsWindow.cpp, v4, commit friendly version, r=karlt
https:/
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #107 |
Created attachment 561718
nsWindow.cpp, v5, commit friendly version, r=karlt
added missing gtk2compat.h file
In Mozilla Bugzilla #627699, Bmo-edmorley (bmo-edmorley) wrote : | #108 |
Comment on attachment 561718
nsWindow.cpp, v5, commit friendly version, r=karlt
https:/
In Mozilla Bugzilla #627699, Bmo-edmorley (bmo-edmorley) wrote : | #109 |
Comment on attachment 561718
nsWindow.cpp, v5, commit friendly version, r=karlt
Try run failed with:
https:/
{
In file included from ../../.
../../.
../../.
../../.
../../.
../../.
../../.
../../.
../../.
../../.
../../.
../../.
make[7]: *** [nsWindow.o] Error 1
}
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #110 |
Created attachment 561753
nsWindow.cpp, v6
I hope I address the build issues. Unfortunately I don't have GTK2 box handy right now, will check it later.
In Mozilla Bugzilla #627699, Bmo-edmorley (bmo-edmorley) wrote : | #111 |
Comment on attachment 561753
nsWindow.cpp, v6
Looks more promising (run not yet finished, but at least compiles):
https:/
:-)
In Mozilla Bugzilla #627699, Hussam-v (hussam-v) wrote : | #112 |
(In reply to Martin Stránský from comment #90)
> Created attachment 561753
> nsWindow.cpp, v6
>
> I hope I address the build issues. Unfortunately I don't have GTK2 box handy
> right now, will check it later.
I finished a gtk2 build with mozilla-central and only this patch. what other patches do I need to make a gtk3 build?
In Mozilla Bugzilla #627699, Bmo-edmorley (bmo-edmorley) wrote : | #113 |
Comment on attachment 561753
nsWindow.cpp, v6
Passed try. Happy for me to land now?
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #114 |
(In reply to Ed Morley [:edmorley] from comment #93)
> Comment on attachment 561753
> nsWindow.cpp, v6
>
> Passed try. Happy for me to land now?
Yes, Please.
(In reply to Hussam Al-Tayeb from comment #92)
> I finished a gtk2 build with mozilla-central and only this patch. what other
> patches do I need to make a gtk3 build?
You need a complete patch, this one is just a small step. The easiest way is to grab the complete one attached here (attachment #538243), download mozilla-central from 2011-06-09, patch it and build.
In Mozilla Bugzilla #627699, Bmo-edmorley (bmo-edmorley) wrote : | #115 |
Comment on attachment 561753
nsWindow.cpp, v6
https:/
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #116 |
Created attachment 561999
build fix - startup notification
This build fix is needed when MOZ_ENABLE_
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #117 |
Comment on attachment 561999
build fix - startup notification
Make it static inline, like the others.
No need for the GDK_DRAWABLE() cast as GdkWindow is the same type as GdkDrawable.
I'd prefer to drop the GDK_IS_WINDOW check too. I don't think that adds any value.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #118 |
Created attachment 562004
build fix - startup notification, v2
Fixed. I prefer to keep GDK_DRAWABLE() here, it's the original GTK 2.24 implementation.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #119 |
Comment on attachment 562004
build fix - startup notification, v2
GDK_DRAWABLE() adds code for an extra function call per caller.
The C type cast is pointless because the C types are the same.
The GType check-instance is pointless because all GDK_TYPE_WINDOW objects are of type GDK_TYPE_DRAWABLE, and gdk_drawable_
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #120 |
Created attachment 562011
build fix - startup notification, v3
Okay, removed.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #121 |
Comment on attachment 562011
build fix - startup notification, v3
Thanks.
(In reply to Karl Tomlinson (:karlt) from comment #99)
> GDK_DRAWABLE() adds code for an extra function call per caller.
Actually two function calls: gdk_drawable_
In Mozilla Bugzilla #627699, Bmo-edmorley (bmo-edmorley) wrote : | #122 |
Comment on attachment 561753
nsWindow.cpp, v6
nsWindow.cpp part: https:/
In Mozilla Bugzilla #627699, Benjamin Otte (Company) (otte) wrote : | #123 |
small intermission from a lurker:
(In reply to Karl Tomlinson (:karlt) from comment #101)
> > GDK_DRAWABLE() adds code for an extra function call per caller.
>
> Actually two function calls: gdk_drawable_
Only if you don't compile with -DG_DISABLE_
FWIW, using GNOME coding style, I'd make every cast use the macro both because of style ad because I know there's no performance difference, but huge debuggability improvements (once you turn it on).
In Mozilla Bugzilla #627699, Bmo-edmorley (bmo-edmorley) wrote : | #124 |
Comment on attachment 562011
build fix - startup notification, v3
https:/
https:/
In Mozilla Bugzilla #627699, Bmo-edmorley (bmo-edmorley) wrote : | #125 |
Comment on attachment 562011
build fix - startup notification, v3
startup notification part: https:/
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #126 |
(In reply to Benjamin Otte from comment #103)
> Only if you don't compile with -DG_DISABLE_
> definitely should do for releases. In that case those casts are just casts.
We compile with C flags from pkgconfig, which do not seem to include this.
I notice GTK+ does compile with -DG_DISABLE_
I don't see any documentation, but it looks like this could only help.
Seems a little strange to set an undocumented symbol that would change G_TYPE_
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #127 |
Created attachment 563434
gtk drawing patch v.2 + comments
It should address the remarks, my comments are at top of the patch.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #128 |
Created attachment 563817
mozcontainer.c patch, v2
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #129 |
Comment on attachment 563817
mozcontainer.c patch, v2
>+#include <gdk/gdkx.h>
Surrounding the gdk_x11_* function definitions in gtk2compat.h with
something like "#ifdef GDK_WINDOW_
unnecessary.
>- widget->style = gtk_style_attach (widget->style, widget->window);
>+ gtk_widget_
gtk_widget_
gtk_widget_
#ifdef MOZ_WIDGET_GTK2.
>-
>- GTK_WIDGET_
>+
>-
>- GTK_WIDGET_
>+
Unnecessary extra white space added in the blank lines.
>+ gtk_widget_
>+ &attributes, attributes_mask));
Can you align &attributes with gtk_widget_
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #130 |
Created attachment 564498
mozcontainer.c patch, v3
Fixed comments, ready to commit.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #131 |
Comment on attachment 563434
gtk drawing patch v.2 + comments
>>> if (interior_focus) {
>>>+ GtkBorder border;
>>>+ gtk_style_
>>Don't we want to pass the state flags here?
>
> What do you mean?
gtk_style_
uses the "state" parameter rather than the state on the StyleContext. However,
this code is not passing anything for the GtkStateFlags state parameter.
Most, but not all, gtk_style_
state flags.
>> gtk_tree_
>
> gtk_tree_
http://
>> In moz_gtk_tab_paint:
>>+ gtk_style_
>> I assume _NORMAL is the default, so this is unnecessary.
>
> I don't see GTK_STATE_
>
> moz_gtk_
> moz_gtk_
> moz_gtk_
> moz_gtk_
I must have pasted something in the wrong place there.
I suspect all the gtk_style_
calls are unnecessary. The pattern used in GTK is to create the style context
with default state and only ever set the state with a save/restore during
draw. Removing these would save a little code, but I don't feel strongly
about it, if you prefer to leave them in.
>>>+ gtk_render_
>>>+ rect->x - gap_loffset,
>>>+ rect->y + gap_voffset - 3 * gap_height,
>>>+ rect->width + gap_loffset + gap_roffset,
>>>+ 3 * gap_height, GTK_POS_BOTTOM,
>>>+ gap_loffset, rect->width);
>>Need to also add gap_loffset here as you did below.
>
> Where the gap_loffset should be?
The last parameter is a position rather than a width, and so needs to be
gap_loffset + rect->width.
>>>+ gtk_render_
>>>+ rect->x - gap_loffset,
>>>+ rect->y + rect->height - gap_voffset,
>>>+ rect->width + gap_loffset + gap_roffset,
>>>+ 3 * gap_height, GTK_POS_TOP,
>>>+ gap_loffset, gap_loffset+
>> Can you add spaces around the "+", please?
>
> Where? All "+" I see have spaces around.
The last parameter is correct here, but there are no spaces around its "+".
>>+ gtk_render_
>> gtk_notebook_paint usually uses gtk_render_
>> Why choose render_frame over render_frame_gap here?
>
> I haven't been able to decrypt the former code logic plus gtk_render_
> does not allow to set negative gap start. gtk_render_frame() seems to work fine
> too but if you have an idea how to transport the gap size to moz_gtk_
> I can modify it.
The gap s...
In Mozilla Bugzilla #627699, Dao (dao) wrote : | #132 |
In Mozilla Bugzilla #627699, Bmo-edmorley (bmo-edmorley) wrote : | #133 |
Comment on attachment 564498
mozcontainer.c patch, v3
Backed out for causing build failures:
https:/
https:/
{
In file included from ../../.
../../.
../../.
../../.
../../.
../../.
../../.
../../.
../../.
../../.
}
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #134 |
Created attachment 565231
mozcontainer.c patch, v5
Uff, sorry for that, I really should build it on gtk2-2.10 box next time.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #135 |
Comment on attachment 565231
mozcontainer.c patch, v5
>- widget->window = gdk_window_new (gtk_widget_
>- &attributes, attributes_mask);
>+ gtk_widget_
>+ &attributes, attributes_mask));
Can you align &attributes with gtk_widget_
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #136 |
Created attachment 565464
mozcontainer.c patch, v6, fixed indentation
Fixed indentation.
In Mozilla Bugzilla #627699, Bmo-edmorley (bmo-edmorley) wrote : | #137 |
Comment on attachment 565464
mozcontainer.c patch, v6, fixed indentation
In my queue, which is heading to try first then inbound :-)
https:/
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #138 |
Created attachment 565519
gtk drawing patch v.3
gtk_style_
> I suspect all the gtk_style_
> calls are unnecessary. The pattern used in GTK is to create the style context
> with default state and only ever set the state with a save/restore during
> draw. Removing these would save a little code, but I don't feel strongly
> about it, if you prefer to leave them in.
I prefer to leave GTK_STATE_
I recall there were issues with rendering when GTK_STATE_
> With the API change from a cliprect parameter to a cairo_t, the clip
> rectangles for each half will need to be applied to the cairo_t,
> necessitating the use of cairo_save/restore. I suggest dividing rect into
> left and right halves instead of the approach for gtk2 of dividing the
> cliprect into two halves. (Getting the cliprect from cairo is harder and
> unnecessary.)
> For smaller tabpanels, the logic in the gtk2 port could lead to the gap being
> outside the rect. I suggest just using rect->width as the gap position in the
> render_frame_gap() call for the left half and 0 for the right half.
Updated. I hope I grasp the idea correctly.
In Mozilla Bugzilla #627699, Bmo-edmorley (bmo-edmorley) wrote : | #139 |
Comment on attachment 565464
mozcontainer.c patch, v6, fixed indentation
https:/
In Mozilla Bugzilla #627699, Mbrubeck-x (mbrubeck-x) wrote : | #140 |
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #141 |
Comment on attachment 565519
gtk drawing patch v.3
It looks like many (but not all) of the changes between attachment 525346 and attachment 540027 have been reverted or lost in this version of the patch.
I don't know whether or not you have a easy way of merging those back in.
It may be easiest to go through attachment 533890 again and check that each issue that you addressed is still addressed.
(Separate vpaned/hpaned functions is fine.)
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #142 |
Created attachment 568338
gkt3drawing, v.4
Uff, you're right, there were some missing parts from previous patch. Some remarks:
>moz_gtk_
>+ //gtk_render_
>+ //gtk_render_
> Remove this if it is not used or add a TODO comment explaining why it is kept.
> I can't make much sense of what is happening with the focus_width and the
> rectangles in this function. The old logic looked closer to what we are going
> to need, so I'd prefer to stay with that until this is sorted out.
Removed.
In moz_gtk_
>- gtk_widget_
>- &gTreeViewWidge
>+ gtk_style_
>+ gtk_widget_
>
>Is this necessary?
>If so, it looks like it should be applied to the TreeView widget.
Not necessary, removed.
>+ gtk_render_
>+ rect->x + xthickness, rect->y + ythickness,
>+ rect->width - 2 * xthickness,
>+ rect->height - 2 * ythickness);
>
>Is this necessary?
>The only gtk_render_frame I see in GtkScrolledWindow is for the rubber band.
Not necessary, removed.
moz_gtk_tab_paint:
> Are you sure about GTK_STATE_
> that come from? I would have expected _NORMAL.
It doesn't matter, changed to _NORMAL.
> moz_gtk_
> + gtk_style_
> What is this for?
Some leftover I guess, removed.
In Mozilla Bugzilla #627699, Chris Coulson (chrisccoulson) wrote : | #143 |
Note that http://
Changed in hundredpapercuts: | |
milestone: | lucid-round-2 → precise-9-miscellaneous |
In Mozilla Bugzilla #627699, Alexhultman-0 (alexhultman-0) wrote : | #144 |
Will those patches get merged to any UX build for public testing any time soon? :)
In Mozilla Bugzilla #627699, Rafał Mużyło (galtgendo) wrote : | #145 |
A minor query about
gComboBoxEntryW
in patch from comment 122.
What would be wrong with using gtk_combo_
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #146 |
Created attachment 588315
review comments on gkt3drawing, v.4
I haven't quite looked at everything you changed here, but most of it, and I'll be on vacation for a week or two, so I'll post what I have.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #147 |
Created attachment 593982
review comments on gkt3drawing, v.4 (completed)
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #148 |
Comment on attachment 540031
nsLookAndFeel.cpp patch
I've been taking too long to get to these, so I've asked Chris to review these two patches. I'll review an updated gtk3drawing patch, as I've got to know that code quite well.
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #149 |
Created attachment 595369
gtk drawing patch v.5
Thanks, there's an updated version. Some remarks:
> Can you mention removal of the unused cliprect parameters to the TODO list
> please?
Added before moz_gtk_
>The old logic was different from what GetStateFlagsFr
>which makes me think that GetStateFlagsFr
>GTK_STATE_
>depressed or active) independently of each other.
Updated the GetStateFlagsFr
> In moz_gtk_
> gtk_handle_
Yeah. gtk_handle_
regards to the handle_position. But the effective_
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #150 |
(In reply to Rafał Mużyło from comment #125)
> A minor query about
> gComboBoxEntryW
> in patch from comment 122.
> What would be wrong with using gtk_combo_
I expect that would be the correct widget to use. However, I'm guessing it is not as simple as just changing the widget, but other code will also need changing. That can be sorted out separately.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #151 |
Comment on attachment 595369
gtk drawing patch v.5
Thanks very much.
Just a save/restore pair to remove in moz_gtk_
>- gtk_paint_
>- gComboBoxArrowW
>- real_arrow_rect.x, real_arrow_rect.y,
>- real_arrow_
>-
>+ style = gtk_widget_
>+ gtk_style_
>+
>+ gtk_render_
>+ real_arrow_rect.x, real_arrow_rect.y,
>+ real_arrow_
This is no longer applying the state when drawing the arrow, but that seems to
be correct, because I can't see that GtkComboBox passes its state to the style
context for gtk_render_arrow.
> if (!gComboBoxSepa
> return MOZ_GTK_SUCCESS;
>+ gtk_style_
This save/restore is not balanced when taking the early return, but is
unnecessary anyway because the style context was not changed.
The save/restore for the style context of the gComboBoxSepara
similarly unnecessary.
In Mozilla Bugzilla #627699, Karlt (karlt) wrote : | #152 |
(In reply to Martin Stránský from comment #129)
> Yeah. gtk_handle_
> regards to the handle_position. But the effective_
> gtk_handle_
> hidden/private.
The old gtk2drawing code was apparently only painting the box and not the handle.
i.e. it didn't call gtk_paint_handle.
So perhaps we should drop the gtk_render_handle from moz_gtk_
In Mozilla Bugzilla #627699, Stransky (stransky) wrote : | #153 |
Created attachment 595699
gkt3drawing, v.6
Removed the unnecessary save/restore and gtk_render_
In Mozilla Bugzilla #627699, Dao (dao) wrote : | #154 |
In Mozilla Bugzilla #627699, Bmo-edmorley (bmo-edmorley) wrote : | #155 |
Comment on attachment 595699
gkt3drawing, v.6
Changed in gtk+2.0 (Ubuntu): | |
status: | Fix Committed → Confirmed |
Timothy Arceri (t-fridey) wrote : | #19 |
The change was made to GTK 3, as Firefox is still a GTK 2 app this issue will remain until the port to GTK3 is finished. I will add the firefox port bug to this bug report.
Also the fix does not expand the file type extensions when the drop down list is selected I have reported this upstream here: https:/
Changed in hundredpapercuts: | |
status: | Fix Committed → Triaged |
Changed in firefox: | |
importance: | Unknown → Medium |
status: | Unknown → In Progress |
Micah Gersten (micahg) wrote : | #156 |
Sorry, as the upstream Mozilla bug has nothing specific to do with this bug report, I'm removing the task, the bug watch can remain though.
no longer affects: | firefox |
Changed in hundredpapercuts: | |
milestone: | precise-9-miscellaneous → quantal-10-gtk |
assignee: | Canonical Desktop Team (canonical-desktop-team) → Papercuts Ninja (papercuts-ninja) |
Changed in hundredpapercuts: | |
milestone: | quantal-10-gtk → papercuts-s-gtk |
Changed in hundredpapercuts: | |
assignee: | Papercuts Ninjas (papercuts-ninja) → nobody |
reassigning to gtk+ for now as ffox uses gtk dialog nowadays.