Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 292d42429ba215465a1e89f01981f3a92e742446 https://github.com/WebKit/WebKit/commit/292d42429ba215465a1e89f01981f3a92e742446 Author: Antti Koivisto <an...@apple.com> Date: 2024-04-29 (Mon, 29 Apr 2024)
Changed paths: M Source/WebCore/WebCore.xcodeproj/project.pbxproj M Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp M Source/WebCore/layout/integration/LayoutIntegrationBoxTree.h M Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp A Source/WebCore/layout/layouttree/FormattingContextBoxIterator.h M Source/WebCore/layout/layouttree/LayoutBox.cpp M Source/WebCore/layout/layouttree/LayoutBox.h M Source/WebCore/layout/layouttree/LayoutIterator.h M Source/WebCore/rendering/RenderObject.cpp Log Message: ----------- [IFC][Integration] Layout boxes should have a renderer backpointer https://bugs.webkit.org/show_bug.cgi?id=273395 rdar://127226407 Reviewed by Alan Baradlay. Currently we are using an awkward layout box -> renderer map in BoxTree. We can simplify things, save memory and improve performance by getting rid of it. * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp: (WebCore::LayoutIntegration::BoxTree::~BoxTree): (WebCore::LayoutIntegration::BoxTree::buildTreeForInlineContent): (WebCore::LayoutIntegration::BoxTree::buildTreeForFlexContent): (WebCore::LayoutIntegration::BoxTree::insertChild): (WebCore::LayoutIntegration::BoxTree::insert): (WebCore::LayoutIntegration::BoxTree::remove): (WebCore::LayoutIntegration::BoxTree::contains const): (WebCore::LayoutIntegration::BoxTree::rendererForLayoutBox): (WebCore::LayoutIntegration::BoxTree::rendererForLayoutBox const): (WebCore::LayoutIntegration::BoxTree::hasRendererForLayoutBox const): * Source/WebCore/layout/integration/LayoutIntegrationBoxTree.h: (WebCore::LayoutIntegration::BoxTree::boxCount const): Deleted. (WebCore::LayoutIntegration::BoxTree::renderers const): Deleted. * Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp: (WebCore::LayoutIntegration::FlexLayout::layout): (WebCore::LayoutIntegration::FlexLayout::updateRenderers): * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::updateRenderTreePositions): Since we don't have a renderer list anymore, traverse the boxes in the formatting context instead. (WebCore::LayoutIntegration::LineLayout::shiftLinesBy): * Source/WebCore/layout/layouttree/FormattingContextBoxIterator.h: Added. (WebCore::Layout::FormattingContextBoxIterator::FormattingContextBoxIterator): (WebCore::Layout::FormattingContextBoxIterator::operator++): (WebCore::Layout::FormattingContextBoxIteratorAdapter::FormattingContextBoxIteratorAdapter): (WebCore::Layout::FormattingContextBoxIteratorAdapter::begin): (WebCore::Layout::FormattingContextBoxIteratorAdapter::end): (WebCore::Layout::formattingContextBoxes): Add a iterator for traversing all boxes in a formatting context. * Source/WebCore/layout/layouttree/LayoutBox.cpp: (WebCore::Layout::Box::~Box): * Source/WebCore/layout/layouttree/LayoutBox.h: (WebCore::Layout::Box::rendererForIntegration const): (WebCore::Layout::Box::setRendererForIntegration): * Source/WebCore/layout/layouttree/LayoutIterator.h: (WebCore::Layout::LayoutBoxTraversal::nextSkippingChildren): (WebCore::Layout::Traversal::nextSkippingChildren): (WebCore::Layout::LayoutIterator<T>::traverseNextSkippingChildren): (WebCore::Layout::LayoutIterator<T>::operator const): (WebCore::Layout:: const): (WebCore::Layout::LayoutIterator<T>::get const): * Source/WebCore/rendering/RenderObject.cpp: (WebCore::RenderObject::~RenderObject): (WebCore::RenderObject::setLayoutBox): (WebCore::RenderObject::clearLayoutBox): Canonical link: https://commits.webkit.org/278104@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes