[Webkit-unassigned] [Bug 254919] REGRESSION(2.41.1): [GTK] Sometimes web content does not render in a new web view

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 24 04:59:17 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=254919

Carlos Garcia Campos <cgarcia at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |achristensen at apple.com,
                   |                            |cdumez at apple.com,
                   |                            |darin at apple.com

--- Comment #12 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Ok, I finally found the reason why opening a link to an image in new window causes the web view to be blank in GTK4. 

When the ImageDocument is created, the main frame visible size hasn't been set yet, so ImageDocument::scale is 0 causing ImageDocument::resizeImageToFit to use a 0x0 image.

The reason why the visible size is not set at that point is because the web view doesn't do any size-allocate before the web view is created, so the view size of the web page creation parameters is 0x0.

Once the size-allocate is done the UpdateGeometry message is sent. ImageDocument uses an event listener for dom widow resize events, to update the image when the main frame view is resized. However, the resize event is not emitted in this case, because the layout we do for the resize is the first one (or at least it's marked as such), so when LocalFrameView::scheduleResizeEventIfNeeded() is called LocalFrameView::willDoLayout has already set the current viewport size and scale, so it's considered as unchanged. For some reason this only happens with PSON enabled.

The reason why it only happens in GTK4 is because in GTK3 there's indeed a size-allocate before the web page is created, so it's created with the right size from the beginning, and ImageDocument creates the document structure with the right image size.

In any case, the ImageDocument should always be notified when the main frame view is resized, so maybe the dom window resize event is not the best way.

Any idea?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230524/6f3001b9/attachment.htm>


More information about the webkit-unassigned mailing list