Changeset 249438 in webkit
- Timestamp:
- Sep 3, 2019 12:48:03 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r249437 r249438 1 2019-09-03 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][Floats] Do not pass FloatingState to FloatItem 4 https://bugs.webkit.org/show_bug.cgi?id=201406 5 <rdar://problem/54957097> 6 7 Reviewed by Antti Koivisto. 8 9 This is in preparation for transitioning the floating codebase to use the formatting context for 10 retrieving display boxes. Now FloatItems don't need the FloatingState to compute absolute display boxes. 11 12 * layout/floats/FloatingState.cpp: 13 (WebCore::Layout::FloatingState::FloatItem::FloatItem): 14 (WebCore::Layout::FloatingState::append): 15 * layout/floats/FloatingState.h: 16 1 17 2019-09-03 Zalan Bujtas <zalan@apple.com> 2 18 -
trunk/Source/WebCore/layout/floats/FloatingState.cpp
r249433 r249438 40 40 WTF_MAKE_ISO_ALLOCATED_IMPL(FloatingState); 41 41 42 FloatingState::FloatItem::FloatItem(const Box& layoutBox, const FloatingState& floatingState)42 FloatingState::FloatItem::FloatItem(const Box& layoutBox, Display::Box absoluteDisplayBox) 43 43 : m_layoutBox(makeWeakPtr(layoutBox)) 44 , m_absoluteDisplayBox( FormattingContext::mapBoxToAncestor(floatingState.layoutState(), layoutBox, downcast<Container>(floatingState.root())))44 , m_absoluteDisplayBox(absoluteDisplayBox) 45 45 { 46 46 } … … 84 84 ASSERT(is<Container>(*m_formattingContextRoot)); 85 85 86 auto newFloatItem = FloatItem { layoutBox, *this};86 auto newFloatItem = FloatItem { layoutBox, FormattingContext::mapBoxToAncestor(layoutState(), layoutBox, downcast<Container>(root()))}; 87 87 if (m_floats.isEmpty()) 88 88 return m_floats.append(newFloatItem); -
trunk/Source/WebCore/layout/floats/FloatingState.h
r249433 r249438 60 60 class FloatItem { 61 61 public: 62 FloatItem(const Box&, const FloatingState&);62 FloatItem(const Box&, Display::Box absoluteDisplayBox); 63 63 64 64 bool operator==(const Box& layoutBox) const { return m_layoutBox.get() == &layoutBox; }
Note: See TracChangeset
for help on using the changeset viewer.