Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: Source/WebCore/rendering/RenderListItem.cpp

Issue 9566040: Merge 109245 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/lists/remove-listmarker-from-anonblock-with-continuation-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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();
253 if (!lineBoxParent) 250 if (!lineBoxParent)
254 lineBoxParent = this; 251 lineBoxParent = this;
255 lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent) ); 252 lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent) );
256 if (m_marker->preferredLogicalWidthsDirty()) 253 if (m_marker->preferredLogicalWidthsDirty())
257 m_marker->computePreferredLogicalWidths(); 254 m_marker->computePreferredLogicalWidths();
255 // If markerPar is an anonymous block that has lost all its children , destroy it.
256 // Extraneous anonymous blocks can cause problems for RenderBlock::u pdateBeforeAfterContent.
257 if (markerPar && markerPar->isAnonymousBlock() && !markerPar->firstC hild() && !toRenderBlock(markerPar)->continuation())
258 markerPar->destroy();
258 } 259 }
259 } 260 }
260 } 261 }
261 262
262 void RenderListItem::computePreferredLogicalWidths() 263 void RenderListItem::computePreferredLogicalWidths()
263 { 264 {
264 ASSERT(preferredLogicalWidthsDirty()); 265 ASSERT(preferredLogicalWidthsDirty());
265 266
266 updateMarkerLocation(); 267 updateMarkerLocation();
267 268
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 // assume that all the following ones have too. 478 // assume that all the following ones have too.
478 // This gives us the opportunity to stop here and avoid 479 // This gives us the opportunity to stop here and avoid
479 // marking the same nodes again. 480 // marking the same nodes again.
480 break; 481 break;
481 } 482 }
482 item->updateValue(); 483 item->updateValue();
483 } 484 }
484 } 485 }
485 486
486 } // namespace WebCore 487 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/lists/remove-listmarker-from-anonblock-with-continuation-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698