OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 inlineRunEnd = curr; | 829 inlineRunEnd = curr; |
830 if (curr->isInline()) | 830 if (curr->isInline()) |
831 sawInline = true; | 831 sawInline = true; |
832 curr = curr->nextSibling(); | 832 curr = curr->nextSibling(); |
833 } | 833 } |
834 } while (!sawInline); | 834 } while (!sawInline); |
835 } | 835 } |
836 | 836 |
837 void RenderBlock::deleteLineBoxTree() | 837 void RenderBlock::deleteLineBoxTree() |
838 { | 838 { |
| 839 if (containsFloats()) { |
| 840 // Clear references to originating lines, since the lines are being dele
ted |
| 841 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
| 842 FloatingObjectSetIterator end = floatingObjectSet.end(); |
| 843 for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end
; ++it) { |
| 844 ASSERT(!((*it)->m_originatingLine) || (*it)->m_originatingLine->rend
erer() == this); |
| 845 (*it)->m_originatingLine = 0; |
| 846 } |
| 847 } |
839 m_lineBoxes.deleteLineBoxTree(renderArena()); | 848 m_lineBoxes.deleteLineBoxTree(renderArena()); |
840 } | 849 } |
841 | 850 |
842 RootInlineBox* RenderBlock::createRootInlineBox() | 851 RootInlineBox* RenderBlock::createRootInlineBox() |
843 { | 852 { |
844 return new (renderArena()) RootInlineBox(this); | 853 return new (renderArena()) RootInlineBox(this); |
845 } | 854 } |
846 | 855 |
847 RootInlineBox* RenderBlock::createAndAppendRootInlineBox() | 856 RootInlineBox* RenderBlock::createAndAppendRootInlineBox() |
848 { | 857 { |
(...skipping 5761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6610 } | 6619 } |
6611 | 6620 |
6612 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) | 6621 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) |
6613 { | 6622 { |
6614 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); | 6623 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); |
6615 } | 6624 } |
6616 | 6625 |
6617 #endif | 6626 #endif |
6618 | 6627 |
6619 } // namespace WebCore | 6628 } // namespace WebCore |
OLD | NEW |