Skip to content
Permalink
Browse files
Handle a disconnected view during applyTopLeftLocationOffset
https://bugs.webkit.org/show_bug.cgi?id=241355
<rdar://92432637>

Reviewed by Alan Bujtas.

It appears that we can sometimes end up in a state where the document's
view is disconnected during didLayout, which calls applyTopleftLocationOffset.
This just adds a null check to handle this case for now.

* Source/WebCore/rendering/RenderBox.h:
(WebCore::RenderBox::applyTopLeftLocationOffset const):

Canonical link: https://commits.webkit.org/251405@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
mattwoodrow committed Jun 8, 2022
1 parent 5e87c94 commit 6a16426d6de5e4e92d8a6e577763afc471a2be51
Showing 1 changed file with 1 addition and 1 deletion.
@@ -592,7 +592,7 @@ override;
void applyTopLeftLocationOffset(LayoutPoint& point) const
{
// This is inlined for speed, since it is used by updateLayerPosition() during scrolling.
if (!document().view()->hasFlippedBlockRenderers())
if (!document().view() || !document().view()->hasFlippedBlockRenderers())
point.move(m_frameRect.x(), m_frameRect.y());
else
applyTopLeftLocationOffsetWithFlipping(point);

0 comments on commit 6a16426

Please sign in to comment.