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 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. |
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 else | 240 else |
241 lineBoxParent = this; | 241 lineBoxParent = this; |
242 } | 242 } |
243 | 243 |
244 if (markerPar != lineBoxParent || m_marker->preferredLogicalWidthsDirty(
)) { | 244 if (markerPar != lineBoxParent || m_marker->preferredLogicalWidthsDirty(
)) { |
245 // Removing and adding the marker can trigger repainting in | 245 // Removing and adding the marker can trigger repainting in |
246 // containers other than ourselves, so we need to disable LayoutStat
e. | 246 // containers other than ourselves, so we need to disable LayoutStat
e. |
247 LayoutStateDisabler layoutStateDisabler(view()); | 247 LayoutStateDisabler layoutStateDisabler(view()); |
248 updateFirstLetter(); | 248 updateFirstLetter(); |
249 m_marker->remove(); | 249 m_marker->remove(); |
| 250 // If markerPar is an anonymous block that will lose all its childre
n, destroy it |
| 251 if (markerPar && (markerPar != lineBoxParent) && markerPar->isAnonym
ousBlock() && !(toRenderBlock(markerPar)->firstChild())) |
| 252 markerPar->destroy(); |
250 if (!lineBoxParent) | 253 if (!lineBoxParent) |
251 lineBoxParent = this; | 254 lineBoxParent = this; |
252 lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent)
); | 255 lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent)
); |
253 if (m_marker->preferredLogicalWidthsDirty()) | 256 if (m_marker->preferredLogicalWidthsDirty()) |
254 m_marker->computePreferredLogicalWidths(); | 257 m_marker->computePreferredLogicalWidths(); |
255 } | 258 } |
256 } | 259 } |
257 } | 260 } |
258 | 261 |
259 void RenderListItem::computePreferredLogicalWidths() | 262 void RenderListItem::computePreferredLogicalWidths() |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 // assume that all the following ones have too. | 477 // assume that all the following ones have too. |
475 // This gives us the opportunity to stop here and avoid | 478 // This gives us the opportunity to stop here and avoid |
476 // marking the same nodes again. | 479 // marking the same nodes again. |
477 break; | 480 break; |
478 } | 481 } |
479 item->updateValue(); | 482 item->updateValue(); |
480 } | 483 } |
481 } | 484 } |
482 | 485 |
483 } // namespace WebCore | 486 } // namespace WebCore |
OLD | NEW |