Changeset 175345 in webkit
- Timestamp:
- Oct 29, 2014, 2:13:12 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/inline/crash-when-inline-box-has-invalid-float-expected.txt (added)
-
LayoutTests/fast/inline/crash-when-inline-box-has-invalid-float.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBlockFlow.cpp (modified) (2 diffs)
-
Source/WebCore/rendering/RootInlineBox.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r175329 r175345 1 2014-10-29 Zalan Bujtas <zalan@apple.com> 2 3 Remove invalid float from RootInlineBox. 4 https://bugs.webkit.org/show_bug.cgi?id=137707 5 6 Reviewed by Antti Koivisto. 7 8 In certain cases, floating boxes get attached to the last (root) inline box. 9 When this particular floating box gets destroyed, it also needs to be detached 10 from the last inline box. 11 12 * fast/inline/crash-when-inline-box-has-invalid-float-expected.txt: Added. 13 * fast/inline/crash-when-inline-box-has-invalid-float.html: Added. 14 1 15 2014-10-29 Alexey Proskuryakov <ap@apple.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r175343 r175345 1 2014-10-29 Zalan Bujtas <zalan@apple.com> 2 3 Remove invalid float from RootInlineBox. 4 https://bugs.webkit.org/show_bug.cgi?id=137707 5 6 Reviewed by Antti Koivisto. 7 8 In certain cases, floating boxes get attached to the last (root) inline box. 9 When this particular floating box gets destroyed, it also needs to be detached 10 from the last inline box. 11 1. Introduce RootInlineBox::removeFloat() (vs. RootInlineBox::appendFloat()) 12 2. Ensure that it is called when the floating box is being destroyed. 13 14 Test: fast/inline/crash-when-inline-box-has-invalid-float.html 15 16 * rendering/RenderBlockFlow.cpp: 17 (WebCore::RenderBlockFlow::removeFloatingObject): 18 (WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout): During style recalc, while 19 tearing down the render tree, we can get to a state where a block element has both inline and block children. 20 It happens when the style change on an element makes sibling anonymous block wrappers detached. 21 In that case the markAllDescendantsWithFloatsForLayout() call does not get propagated down on the 22 block child elements as we return early at the childrenInline() check. 23 * rendering/RootInlineBox.h: 24 (WebCore::RootInlineBox::removeFloat): 25 1 26 2014-10-29 Antti Koivisto <antti@apple.com> 2 27 -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r175242 r175345 2226 2226 } 2227 2227 if (floatingObject->originatingLine()) { 2228 floatingObject->originatingLine()->removeFloat(floatBox); 2228 2229 if (!selfNeedsLayout()) { 2229 2230 ASSERT(&floatingObject->originatingLine()->renderer() == this); … … 2683 2684 removeFloatingObject(*floatToRemove); 2684 2685 2685 if (childrenInline()) 2686 return; 2687 2688 // Iterate over our children and mark them as needed. 2686 // Iterate over our block children and mark them as needed. 2689 2687 for (auto& block : childrenOfType<RenderBlock>(*this)) { 2690 2688 if (!floatToRemove && block.isFloatingOrOutOfFlowPositioned()) -
trunk/Source/WebCore/rendering/RootInlineBox.h
r174746 r175345 146 146 } 147 147 148 void removeFloat(RenderBox& floatingBox) 149 { 150 ASSERT(m_floats); 151 ASSERT(m_floats->contains(&floatingBox)); 152 m_floats->remove(m_floats->find(&floatingBox)); 153 } 154 148 155 Vector<RenderBox*>* floatsPtr() { ASSERT(!isDirty()); return m_floats.get(); } 149 156
Note:
See TracChangeset
for help on using the changeset viewer.