Bug 142532

Summary: [GTK] Contents not correctly laid out when the web view is not realized
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, commit-queue, gustavo, mcatanzaro, mrobinson
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

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.