| Summary: | REGRESSION(255641@main): Web process crash in WebCore::isDescendantOfFullScreenLayer when when fullscreening video on reddit.com | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||
| Component: | Layout and Rendering | Assignee: | Michael Catanzaro <mcatanzaro> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | bfulgham, bugs-noreply, mcatanzaro, ntim, simon.fraser, webkit-bug-importer, zalan | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=249690 | ||||||
| Attachments: |
|
||||||
|
Description
Michael Catanzaro
2022-12-20 18:02:20 PST
The associated UI process hang is bug #249690 (which I'll assume, without evidence, to be GTK-specific). > Wonder if this reproduces in Safari.
I can't reproduce it anywhere in Safari (either STP or stable, macOS Ventura), FWIW.
There is a bug in RenderLayerCompositor::isDescendantOfFullScreenLayer, here:
auto* fullScreenRenderer = dynamicDowncast<RenderLayerModelObject>(fullScreenElement->renderer());
auto* fullScreenLayer = fullScreenRenderer->layer();
if (!fullScreenRenderer || !fullScreenLayer)
return FullScreenDescendant::NotApplicable;
The code first assumes that fullScreenRenderer is not nullptr (as if the dynamicDowncast cannot fail) and uses it unconditionally. Then it checks to see if it's nullptr on the very next line. No good. The downcast is surely failing here. There might be a platform-specific reason for that, but this is a cross-platform bug.
Actually that's the only problem here. Fullscreen works fine with that fixed. Certainly seems worth fixing! Pull request: https://github.com/WebKit/WebKit/pull/8213 Committed 258593@main (e29dfab61f35): <https://commits.webkit.org/258593@main> Reviewed commits have been landed. Closing PR #8213 and removing active labels. |