Skip to content

Commit

Permalink
RenderBox::requiresLayer() should share code with superclass
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=268937
rdar://122490562

Reviewed by Simon Fraser.

The `RenderBox::requiresLayer()` method duplicates code found in its superclass.
We now call `RenderBoxModelObject::requiresLayer()` instead.

* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::requiresLayer const):

Canonical link: https://commits.webkit.org/274270@main
  • Loading branch information
graouts committed Feb 8, 2024
1 parent 089245f commit 5a4bed0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Source/WebCore/rendering/RenderBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5842,8 +5842,7 @@ std::optional<LayoutUnit> RenderBox::explicitIntrinsicInnerHeight() const
// position:static elements that are not flex-items get their z-index coerced to auto.
bool RenderBox::requiresLayer() const
{
return isDocumentElementRenderer() || isPositioned() || createsGroup() || hasNonVisibleOverflow()
|| hasTransformRelatedProperty() || hasHiddenBackface() || hasReflection() || style().specifiesColumns()
return RenderBoxModelObject::requiresLayer() || hasNonVisibleOverflow() || style().specifiesColumns()
|| style().containsLayout() || !style().hasAutoUsedZIndex() || hasRunningAcceleratedAnimations();
}

Expand Down

0 comments on commit 5a4bed0

Please sign in to comment.