[webkit-changes] [WebKit/WebKit] 1e27b3: [GTK] Sometimes image documents do not render in a...
Carlos Garcia Campos
noreply at github.com
Fri May 26 03:57:22 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1e27b309b70cb8b5e931ac32f297406b55147e86
https://github.com/WebKit/WebKit/commit/1e27b309b70cb8b5e931ac32f297406b55147e86
Author: Carlos Garcia Campos <cgarcia at igalia.com>
Date: 2023-05-26 (Fri, 26 May 2023)
Changed paths:
M Source/WebCore/dom/Document.h
M Source/WebCore/html/ImageDocument.cpp
M Source/WebCore/html/ImageDocument.h
M Source/WebCore/page/LocalFrameView.cpp
Log Message:
-----------
[GTK] Sometimes image documents do not render in a new web view
https://bugs.webkit.org/show_bug.cgi?id=254919
Reviewed by Darin Adler.
This happens because when the ImageDocument is created the main frame
view visible size hasn't been set yet, so we end up with a 0x0 image.
When the view is resized the ImageDocument is not notified because the
resize event of dom winow is not emitted for the first layout. Instead
of relying on resize event of dom window, we should just notify the
ImageDocument directly when the frame is resized.
* Source/WebCore/dom/Document.h:
(WebCore::Document::didChangeViewSize):
* Source/WebCore/html/ImageDocument.cpp:
(WebCore::ImageDocument::createDocumentStructure):
(WebCore::ImageDocument::imageUpdated):
(WebCore::ImageDocument::didChangeViewSize):
(WebCore::ImageDocument::imageClicked):
(WebCore::ImageEventListener::handleEvent):
(WebCore::ImageDocument::windowSizeChanged): Deleted.
* Source/WebCore/html/ImageDocument.h:
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::setFrameRect):
Canonical link: https://commits.webkit.org/264576@main
More information about the webkit-changes
mailing list