| Summary: | [GTK] Crash in WebCore::BackgroundPainter::calculateBackgroundImageGeometry | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | bfulgham, bugs-noreply, koivisto, mcatanzaro, simon.fraser, zalan | ||||
| Priority: | P2 | ||||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Attachments: |
|
||||||
|
Description
Michael Catanzaro
2023-04-20 20:09:43 PDT
Looks like this code was last touched in 254301@main (but I have not tested to see if that is to blame). FYI Cocoa platforms don’t use updateDirectlyCompositedBackgroundImage(). This naive patch avoids the crash (but I doubt it's the correct solution):
diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp
index d182f008bfdd..3628348a4d60 100644
--- a/Source/WebCore/rendering/RenderLayerBacking.cpp
+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp
@@ -2730,6 +2730,9 @@ void RenderLayerBacking::updateDirectlyCompositedBackgroundImage(PaintedContents
return;
}
+ if (!renderBox())
+ return;
+
auto backgroundBox = LayoutRect { backgroundBoxForSimpleContainerPainting() };
// FIXME: Absolute paint location is required here.
auto geometry = BackgroundPainter::calculateBackgroundImageGeometry(*renderBox(), renderBox(), style.backgroundLayers(), { }, backgroundBox);
> FYI Cocoa platforms don’t use updateDirectlyCompositedBackgroundImage().
Uh, OK, let's move to WebKitGTK component then.
|