Skip to content

Commit

Permalink
Fix assertion failure in InteractionRegion::isOverlay
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=259598
<rdar://113037867>

Reviewed by Tim Horton.

We're not supposed to use `firstChildBox()` if the first child might be
of another type. Using `firstChild()` directly instead.

* Source/WebCore/page/InteractionRegion.cpp:
(WebCore::isOverlay):

Canonical link: https://commits.webkit.org/266395@main
  • Loading branch information
etiennesegonzac committed Jul 28, 2023
1 parent 3b59a01 commit b39b69a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebCore/page/InteractionRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static bool isOverlay(const RenderElement& renderer)
auto lastRenderer = renderBox;
for (auto& ancestor : ancestorsOfType<RenderBox>(renderer)) {
// We don't want to occlude any previous siblings.
if (ancestor.firstChildBox() != lastRenderer)
if (ancestor.firstChild() != lastRenderer)
return false;
lastRenderer = &ancestor;
if (ancestor.absoluteContentBox() != refContentBox)
Expand Down

0 comments on commit b39b69a

Please sign in to comment.