Bug 156835

Summary: [GTK] WebKitWebView should claim the contents size as its natural size
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, bugs-noreply, commit-queue, gustavo, mcatanzaro, mcrha, mrobinson
Priority: P2 Keywords: Gtk
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch zan: review+

Carlos Garcia Campos
Reported 2016-04-21 01:14:31 PDT
And keep claiming 0 as its minimum size since it's scrollable.
Attachments
Patch (8.35 KB, patch)
2016-04-21 01:18 PDT, Carlos Garcia Campos
zan: review+
Carlos Garcia Campos
Comment 1 2016-04-21 01:18:38 PDT
WebKit Commit Bot
Comment 2 2016-04-21 01:20:19 PDT
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
Zan Dobersek
Comment 3 2016-04-21 03:39:51 PDT
Comment on attachment 276902 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=276902&action=review > Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:1536 > + if (priv->contentsSize == contentsSize) > + return; > + priv->contentsSize = contentsSize; The early check-and-return doesn't help much IMO, since the assignment is the only change of state here, and there's no work or event propagated further if the same size is assigned.
Carlos Garcia Campos
Comment 4 2016-04-21 03:45:59 PDT
(In reply to comment #3) > Comment on attachment 276902 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=276902&action=review > > > Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:1536 > > + if (priv->contentsSize == contentsSize) > > + return; > > + priv->contentsSize = contentsSize; > > The early check-and-return doesn't help much IMO, since the assignment is > the only change of state here, and there's no work or event propagated > further if the same size is assigned. Yes, that's the case of this patch, but this is a actually a split of two patches. The other one adds new API to tell the web view to fit its size to the contents, so here I schedule a resize, but only when the contents size have actually changed.
Carlos Garcia Campos
Comment 5 2016-04-21 03:53:47 PDT
Note You need to log in before you can comment on or make changes to this bug.