Bug 256298

Summary: Avoid reentrancy of layout within LocalFrameView::adjustViewSize()
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=242550
https://bugs.webkit.org/show_bug.cgi?id=256296
Bug Depends on:    
Bug Blocks: 256660    

Description Ryosuke Niwa 2023-05-03 23:19:48 PDT
e.g.
4   0x81512d715 WebCore::LocalFrameViewLayoutContext::updateStyleForLayout()
5   0x81512ceb4 WebCore::LocalFrameViewLayoutContext::performLayout()
6   0x81510b6c6 WebCore::LocalFrameViewLayoutContext::layout()
7   0x81511f104 WebCore::LocalFrameView::updateContentsSize()
8   0x81538eaa4 WebCore::ScrollView::updateScrollbars(WebCore::IntPoint const&)
9   0x81539046a WebCore::ScrollView::setContentsSize(WebCore::IntSize const&)
10  0x81510ee16 WebCore::LocalFrameView::setContentsSize(WebCore::IntSize const&)
11  0x815108f76 WebCore::LocalFrameView::adjustViewSize()
12  0x81512d206 WebCore::LocalFrameViewLayoutContext::performLayout()
13  0x81510b6c6 WebCore::LocalFrameViewLayoutContext::layout()
14  0x8143220e5 WebCore::Document::implicitClose()
15  0x814ed596b WebCore::FrameLoader::checkCallImplicitClose()
16  0x814ed5431 WebCore::FrameLoader::checkCompleted()
17  0x814ed36cb WebCore::FrameLoader::finishedParsing()
18  0x814338556 WebCore::Document::finishedParsing()
19  0x814a36a18 WebCore::HTMLConstructionSite::finishedParsing()
20  0x814a8f210 WebCore::HTMLTreeBuilder::finished()
21  0x814a3ddf3 WebCore::HTMLDocumentParser::end()
22  0x814a3bd91 WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd()
23  0x814a3bac9 WebCore::HTMLDocumentParser::prepareToStopParsing()
24  0x814a3de5f WebCore::HTMLDocumentParser::attemptToEnd()
25  0x814a3df2b WebCore::HTMLDocumentParser::finish()
26  0x814e7485a WebCore::DocumentWriter::end()
27  0x814e735cc WebCore::DocumentLoader::finishedLoading()
28  0x814e7302b WebCore::DocumentLoader::notifyFinished(WebCore::CachedResource&, WebCore::NetworkLoadMetrics const&)
29  0x8150055b8 WebCore::CachedResource::checkNotify(WebCore::NetworkLoadMetrics const&)
30  0x8150012dd WebCore::CachedResource::finishLoading(WebCore::FragmentedSharedBuffer const*, WebCore::NetworkLoadMetrics const&)
31  0x81500299d WebCore::CachedRawResource::finishLoading(WebCore::FragmentedSharedBuffer const*, WebCore::NetworkLoadMetrics const&)
Comment 1 Simon Fraser (smfr) 2023-05-04 13:34:03 PDT
`updateScrollbars` explicitly does 2-3 passes of layout.
Comment 2 Radar WebKit Bug Importer 2023-05-10 23:20:20 PDT
<rdar://problem/109191363>