Changeset 271134 in webkit
- Timestamp:
- Jan 4, 2021, 10:13:28 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
display/DisplayTreeBuilder.cpp (modified) (1 diff)
-
display/css/DisplayBox.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r271133 r271134 1 2020-12-31 Simon Fraser <simon.fraser@apple.com> 2 3 [LFC Display] Give display boxes a parent pointer 4 https://bugs.webkit.org/show_bug.cgi?id=220210 5 6 Reviewed by Zalan Bujtas. 7 8 Future code will need to be able to do ancestor tree walks ("find enclosing"), 9 so give Display::Box a pointer to its parent ContainerBox. 10 11 * display/DisplayTreeBuilder.cpp: 12 (WebCore::Display::TreeBuilder::insert const): 13 * display/css/DisplayBox.h: 14 (WebCore::Display::Box::parent const): 15 (WebCore::Display::Box::setParent): 16 1 17 2020-12-30 Simon Fraser <simon.fraser@apple.com> 2 18 -
trunk/Source/WebCore/display/DisplayTreeBuilder.cpp
r271133 r271134 265 265 void TreeBuilder::insert(std::unique_ptr<Box>&& box, InsertionPosition& insertionPosition) const 266 266 { 267 box->setParent(&insertionPosition.container); 267 268 if (insertionPosition.currentChild) { 268 269 auto boxPtr = box.get(); -
trunk/Source/WebCore/display/css/DisplayBox.h
r271133 r271134 36 36 namespace Display { 37 37 38 class ContainerBox; 38 39 class Tree; 39 40 … … 70 71 bool participatesInZOrderSorting() const; 71 72 73 ContainerBox* parent() const { return m_parent; } 74 void setParent(ContainerBox* parent) { m_parent = parent; } 75 72 76 const Box* nextSibling() const { return m_nextSibling.get(); } 73 77 void setNextSibling(std::unique_ptr<Box>&&); … … 81 85 AbsoluteFloatRect m_absoluteBoxRect; 82 86 Style m_style; 87 ContainerBox* m_parent { nullptr }; 83 88 std::unique_ptr<Box> m_nextSibling; 84 89 OptionSet<TypeFlags> m_typeFlags;
Note:
See TracChangeset
for help on using the changeset viewer.