[webkit-changes] [WebKit/WebKit] 84b5bc: [LFC] Clarify layout box ownership
Antti Koivisto
noreply at github.com
Mon Sep 26 09:40:00 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 84b5bcb034c36715857f40fa9a0aae0a01450b07
https://github.com/WebKit/WebKit/commit/84b5bcb034c36715857f40fa9a0aae0a01450b07
Author: Antti Koivisto <antti at apple.com>
Date: 2022-09-26 (Mon, 26 Sep 2022)
Changed paths:
M Source/WebCore/layout/layouttree/LayoutBox.cpp
M Source/WebCore/layout/layouttree/LayoutBox.h
M Source/WebCore/layout/layouttree/LayoutContainerBox.cpp
M Source/WebCore/layout/layouttree/LayoutContainerBox.h
Log Message:
-----------
[LFC] Clarify layout box ownership
https://bugs.webkit.org/show_bug.cgi?id=245672
<rdar://100410718>
Reviewed by Alan Bujtas.
Use std::unique_ptr for firstChild/nextSibling pointers. This does not really change
the actual ownership but makes it more obvious in the code that this is an owning tree.
* Source/WebCore/layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::removeFromParent):
(WebCore::Layout::Box::setParent): Deleted.
(WebCore::Layout::Box::setNextSibling): Deleted.
(WebCore::Layout::Box::setPreviousSibling): Deleted.
* Source/WebCore/layout/layouttree/LayoutBox.h:
* Source/WebCore/layout/layouttree/LayoutContainerBox.cpp:
(WebCore::Layout::ContainerBox::appendChild):
(WebCore::Layout::ContainerBox::destroyChildren):
* Source/WebCore/layout/layouttree/LayoutContainerBox.h:
Canonical link: https://commits.webkit.org/254866@main
More information about the webkit-changes
mailing list