Bug 142532 - [GTK] Contents not correctly laid out when the web view is not realized
Summary: [GTK] Contents not correctly laid out when the web view is not realized
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
: 146798 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-03-10 06:43 PDT by Carlos Garcia Campos
Modified: 2015-07-18 20:23 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.93 KB, patch)
2015-07-10 02:42 PDT, Carlos Garcia Campos
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2015-03-10 06:43:04 PDT
This can be easily reproduced with epiphany:

1- Go to google, and search for something you know will give a youtube link
2- Middle click the youtube link to open a new tab
3- Visit the tab

After 3, sometimes the layout of youtube is like if the web view were a lot smaller (like the mobile layout, using a single column).
I'm not sure the problem is related to the accelerated compositing mode, I've managed to reproduce the issue disabling AC, it didn't happen that often, but I could still reproduce the problem. So, maybe this is more related with the delayed resize we do when the web view hasn't been mapped yet.
Comment 1 Carlos Garcia Campos 2015-07-09 23:11:00 PDT
*** Bug 146798 has been marked as a duplicate of this bug. ***
Comment 2 Carlos Garcia Campos 2015-07-10 02:42:59 PDT
Created attachment 256571 [details]
Patch
Comment 3 WebKit Commit Bot 2015-07-10 02:44:33 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
Comment 4 Michael Catanzaro 2015-07-10 09:05:20 PDT
Patch works great, thanks!
Comment 5 Darin Adler 2015-07-10 09:54:25 PDT
Comment on attachment 256571 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=256571&action=review

> Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp:87
> +    auto* drawingArea = static_cast<DrawingAreaProxyImpl*>(webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(m_viewWidget))->drawingArea());

Do we have a guarantee that webkitWebViewBaseGetPage never returns null? (If so, perhaps in the future it should return a reference rather than a pointer.)
Comment 6 Carlos Garcia Campos 2015-07-13 00:45:35 PDT
Committed r186761: <http://trac.webkit.org/changeset/186761>
Comment 7 Michael Catanzaro 2015-07-18 20:23:48 PDT
So far I've found this has fixed:

* YouTube video pages
* Images in Vox articles
* Layout and images in CNN articles

And no doubt many more. Also, it made anchor links work.