Bug 106052 - [WK2] [Gtk] crash when web inspector is attached, and window height is reduced.
Summary: [WK2] [Gtk] crash when web inspector is attached, and window height is reduced.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: arno.
URL:
Keywords:
Depends on: 106050
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-03 15:26 PST by arno.
Modified: 2013-01-04 09:15 PST (History)
4 users (show)

See Also:


Attachments
patch proposal: detach inspector when webViewBase height becomes too small (2.58 KB, patch)
2013-01-03 15:29 PST, arno.
no flags Details | Formatted Diff | Diff
patch proposal: updated patch: wrong static_cast (2.58 KB, patch)
2013-01-03 15:51 PST, arno.
cgarcia: review-
Details | Formatted Diff | Diff
A different approach (2.13 KB, patch)
2013-01-04 06:39 PST, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description arno. 2013-01-03 15:26:20 PST
Hi,
I display web inspector in MiniBrowser (this requires patch from #106050), attached to the webview.
Then I reduce window size.
When height is small enough, main view height reaches 0, and the browser crashes.
It crashes from a x11 error in RedirectedXCompositeWindow::resize because size.height() is <= 0
Comment 1 arno. 2013-01-03 15:29:02 PST
Created attachment 181234 [details]
patch proposal: detach inspector when webViewBase height becomes too small
Comment 2 WebKit Review Bot 2013-01-03 15:33:46 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Martin Robinson 2013-01-03 15:41:07 PST
Comment on attachment 181234 [details]
patch proposal: detach inspector when webViewBase height becomes too small

Seems that it would be a bit jarring to turn off the inspector completely if you shrank the window and then made it larger again. Why not just hide the inspector if there isn't enough space?
Comment 4 arno. 2013-01-03 15:51:53 PST
Created attachment 181242 [details]
patch proposal: updated patch: wrong static_cast
Comment 5 Carlos Garcia Campos 2013-01-04 06:36:25 PST
Comment on attachment 181242 [details]
patch proposal: updated patch: wrong static_cast

I don't think detaching the inspector is the right fix, here. There are actually two bugs, we shouldn't allocate for the children a size bigger than the parent, and we should make sure the widget allocation is always >= 1 (which is what GTK does in gtk_widget_size_allocate())
Comment 6 Carlos Garcia Campos 2013-01-04 06:39:21 PST
Created attachment 181299 [details]
A different approach
Comment 7 Carlos Garcia Campos 2013-01-04 09:15:42 PST
Committed r138803: <http://trac.webkit.org/changeset/138803>