Closed Bug 1192243 Opened 9 years ago Closed 9 years ago

[Gtk3] Crash reporter is broken: ScrolledWindow has height of zero

Categories

(Core :: Widget: Gtk, defect)

38 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: pjasicek, Assigned: pjasicek)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20150518070114

Steps to reproduce:

The Mozilla Firefox crash reporter is barely usable since it fails to set correct sizes for Gtk Widgets with scrollbars and GtkLabel's lines are not breaking.

Version-Release number of selected component (if applicable):
gtk3-3.16.5-1.fc22.x86_64
firefox-38.0.1-1.fc22.x86_64

How reproducible:
always

Steps to Reproduce:
1. Start firefox with Gtk3 backend (Fedora 22)
2. Send SIGABRT to firefox, the crash reporter will now open
3. try to use the crash reporter


Actual results:

See attached screenshots. Screenshot 1 shows the crash reporter. When clicking on "Details" you will see Screenshot 2.


Expected results:

Crash reporter should mostly look as in Gtk2.
The main reason why this is happening is that gtk_widget_set_size_request() does not work properly in Gtk3 which in this case affects the GtkScrolledWindow's size and GtkLabel's size. 

Other thing is that if GtkScrolledWindow has GTK_POLICY_NEVER set on horizontal scrollbar, then the embedded GtkTextView's width is as wide as the longest line. Also in Gtk3 the GtkScrolledWindow does not resize automatically with the dialog window, which is why vexpand is set to TRUE.
Attachment #8644956 - Flags: review?(karlt)
Status: UNCONFIRMED → NEW
Component: Untriaged → Widget: Gtk
Ever confirmed: true
Product: Firefox → Core
Comment on attachment 8644956 [details] [diff] [review]
001_gtk3_crash_reporter_fix.patch

>+#if (MOZ_WIDGET_GTK == 2)
>   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),
>                                  GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);

>+#else
>+  gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),
>+                                 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
>+  gtk_widget_set_vexpand(scrolled, TRUE);
>+#endif

Would these changes be fine with GTK2?

If so, please remove the #if (MOZ_WIDGET_GTK == 2) block.
Attachment #8644956 - Flags: review?(karlt) → review+
Copying review+ from last comment.
Attachment #8644956 - Attachment is obsolete: true
Attachment #8646224 - Flags: review+
Keywords: checkin-needed
Blocks: 1193159
https://hg.mozilla.org/mozilla-central/rev/00ebb26cab7f
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: