Summary: | [GTK] WebKitWebView should claim the contents size as its natural size | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||
Component: | WebKitGTK | Assignee: | 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
Carlos Garcia Campos
2016-04-21 01:14:31 PDT
Created attachment 276902 [details]
Patch
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 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. (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. Committed r199811: <http://trac.webkit.org/changeset/199811> |