Changeset 235735 in webkit
- Timestamp:
- Sep 6, 2018, 6:40:56 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
-
ChangeLog (modified) (1 diff)
-
layout/FormattingContext.cpp (modified) (1 diff)
-
layout/FormattingContext.h (modified) (1 diff)
-
layout/LayoutContext.cpp (modified) (1 diff)
-
layout/LayoutContext.h (modified) (1 diff)
-
layout/floats/FloatAvoider.cpp (modified) (1 diff)
-
layout/floats/FloatAvoider.h (modified) (1 diff)
-
layout/floats/FloatingState.cpp (modified) (2 diffs)
-
layout/floats/FloatingState.h (modified) (2 diffs)
-
layout/layouttree/LayoutContainer.cpp (modified) (1 diff)
-
layout/layouttree/LayoutContainer.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r235732 r235735 1 2018-09-05 Zalan Bujtas <zalan@apple.com> 2 3 [LFC] Adapt to the new const WeakPtr<> 4 https://bugs.webkit.org/show_bug.cgi?id=189334 5 6 Reviewed by Antti Koivisto. 7 8 * layout/FormattingContext.cpp: 9 (WebCore::Layout::FormattingContext::FormattingContext): 10 * layout/FormattingContext.h: 11 * layout/LayoutContext.cpp: 12 (WebCore::Layout::LayoutContext::initializeRoot): 13 * layout/LayoutContext.h: 14 * layout/floats/FloatAvoider.cpp: 15 (WebCore::Layout::FloatAvoider::FloatAvoider): 16 * layout/floats/FloatAvoider.h: 17 * layout/floats/FloatingState.cpp: 18 (WebCore::Layout::FloatingState::FloatItem::FloatItem): 19 (WebCore::Layout::FloatingState::FloatingState): 20 * layout/floats/FloatingState.h: 21 * layout/layouttree/LayoutContainer.cpp: 22 (WebCore::Layout::Container::addOutOfFlowDescendant): 23 * layout/layouttree/LayoutContainer.h: 24 (WebCore::Layout::Container::outOfFlowDescendants const): 25 1 26 2018-09-06 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 27 -
trunk/Source/WebCore/layout/FormattingContext.cpp
r235716 r235735 44 44 45 45 FormattingContext::FormattingContext(const Box& formattingContextRoot) 46 : m_root(makeWeakPtr( const_cast<Box&>(formattingContextRoot)))46 : m_root(makeWeakPtr(formattingContextRoot)) 47 47 { 48 48 } -
trunk/Source/WebCore/layout/FormattingContext.h
r235716 r235735 123 123 void computeOutOfFlowHorizontalGeometry(LayoutContext&, const Box&) const; 124 124 125 WeakPtr< Box> m_root;125 WeakPtr<const Box> m_root; 126 126 }; 127 127 -
trunk/Source/WebCore/layout/LayoutContext.cpp
r235716 r235735 54 54 ASSERT(root.establishesFormattingContext()); 55 55 56 m_root = makeWeakPtr( const_cast<Container&>(root));56 m_root = makeWeakPtr(root); 57 57 auto& displayBox = displayBoxForLayoutBox(root); 58 58 -
trunk/Source/WebCore/layout/LayoutContext.h
r235716 r235735 91 91 void layoutFormattingContextSubtree(const Box&); 92 92 93 WeakPtr< Container> m_root;93 WeakPtr<const Container> m_root; 94 94 HashSet<const Container*> m_formattingContextRootListForLayout; 95 95 HashMap<const Box*, std::unique_ptr<FormattingState>> m_formattingStates; -
trunk/Source/WebCore/layout/floats/FloatAvoider.cpp
r235505 r235735 40 40 41 41 FloatAvoider::FloatAvoider(const Box& layoutBox, const FloatingState& floatingState, const LayoutContext& layoutContext) 42 : m_layoutBox(makeWeakPtr( const_cast<Box&>(layoutBox)))42 : m_layoutBox(makeWeakPtr(layoutBox)) 43 43 , m_floatingState(floatingState) 44 44 , m_absoluteDisplayBox(FormattingContext::mapBoxToAncestor(layoutContext, layoutBox, downcast<Container>(floatingState.root()))) -
trunk/Source/WebCore/layout/floats/FloatAvoider.h
r235503 r235735 83 83 84 84 private: 85 WeakPtr< Box> m_layoutBox;85 WeakPtr<const Box> m_layoutBox; 86 86 const FloatingState& m_floatingState; 87 87 Display::Box m_absoluteDisplayBox; -
trunk/Source/WebCore/layout/floats/FloatingState.cpp
r235681 r235735 41 41 42 42 FloatingState::FloatItem::FloatItem(const Box& layoutBox, const FloatingState& floatingState) 43 : m_layoutBox(makeWeakPtr( const_cast<Box&>(layoutBox)))43 : m_layoutBox(makeWeakPtr(layoutBox)) 44 44 , m_absoluteDisplayBox(FormattingContext::mapBoxToAncestor(floatingState.layoutContext(), layoutBox, downcast<Container>(floatingState.root()))) 45 45 { … … 48 48 FloatingState::FloatingState(LayoutContext& layoutContext, const Box& formattingContextRoot) 49 49 : m_layoutContext(layoutContext) 50 , m_formattingContextRoot(makeWeakPtr( const_cast<Box&>(formattingContextRoot)))50 , m_formattingContextRoot(makeWeakPtr(formattingContextRoot)) 51 51 { 52 52 } -
trunk/Source/WebCore/layout/floats/FloatingState.h
r235350 r235735 72 72 73 73 private: 74 WeakPtr< Box> m_layoutBox;74 WeakPtr<const Box> m_layoutBox; 75 75 Display::Box m_absoluteDisplayBox; 76 76 }; … … 88 88 89 89 LayoutContext& m_layoutContext; 90 WeakPtr< Box> m_formattingContextRoot;90 WeakPtr<const Box> m_formattingContextRoot; 91 91 FloatList m_floats; 92 92 }; -
trunk/Source/WebCore/layout/layouttree/LayoutContainer.cpp
r233125 r235735 97 97 // it's okay to store them at the formatting context root level -as opposed to the containing block level. 98 98 ASSERT(establishesFormattingContext()); 99 m_outOfFlowDescendants.append(makeWeakPtr( const_cast<Box&>(outOfFlowBox)));99 m_outOfFlowDescendants.append(makeWeakPtr(outOfFlowBox)); 100 100 } 101 101 -
trunk/Source/WebCore/layout/layouttree/LayoutContainer.h
r233272 r235735 54 54 bool hasInFlowOrFloatingChild() const { return firstInFlowOrFloatingChild(); } 55 55 56 const Vector<WeakPtr< Box>>& outOfFlowDescendants() const { return m_outOfFlowDescendants; }56 const Vector<WeakPtr<const Box>>& outOfFlowDescendants() const { return m_outOfFlowDescendants; } 57 57 58 58 protected: … … 66 66 Box* m_firstChild { nullptr }; 67 67 Box* m_lastChild { nullptr }; 68 Vector<WeakPtr< Box>> m_outOfFlowDescendants;68 Vector<WeakPtr<const Box>> m_outOfFlowDescendants; 69 69 }; 70 70
Note:
See TracChangeset
for help on using the changeset viewer.