[webkit-changes] [WebKit/WebKit] eb40da: Crash in collectStationaryLayerRelatedOverflowNodes()
Simon Fraser
noreply at github.com
Sat Apr 22 16:09:02 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: eb40daa6cd5006e841097c57d07d83e5dda55088
https://github.com/WebKit/WebKit/commit/eb40daa6cd5006e841097c57d07d83e5dda55088
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-04-22 (Sat, 22 Apr 2023)
Changed paths:
A LayoutTests/compositing/overflow/overflow-change-abspos-descendant-expected.txt
A LayoutTests/compositing/overflow/overflow-change-abspos-descendant.html
M Source/WebCore/rendering/RenderLayer.cpp
Log Message:
-----------
Crash in collectStationaryLayerRelatedOverflowNodes()
https://bugs.webkit.org/show_bug.cgi?id=255830
<rdar://107526702>
Reviewed by Alan Baradlay.
Some unusual content configurations can hit the ASSERT(overflowLayer.isComposited())
in collectStationaryLayerRelatedOverflowNodes(), which ends up in a null dereference in release builds.
The issue occurs when a RenderLayer which was using composited scrolling becomes non-scrollable,
but hasCompositedScrollableOverflow() continues to return true, leading to errors in compositing code
which relies on canUseCompositedScrolling(). RenderLayerScrollableArea caches m_hasCompositedScrollableOverflow,
and failed to recompute it in this case.
Fix by having RenderLayer::styleChanged() force hasCompositedScrollableOverflow() to be recomputed
when style scrollability changes.
The testcase is derived from rdar://88329753.
* LayoutTests/compositing/overflow/overflow-change-abspos-descendant-expected.txt: Added.
* LayoutTests/compositing/overflow/overflow-change-abspos-descendant.html: Added.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects const):
Canonical link: https://commits.webkit.org/263286@main
More information about the webkit-changes
mailing list