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

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

Issue 295513003: add 'slow' prefix to RenderObject's firstChild() / lastChild() methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderLayerStackingNode.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 { 256 {
257 if (!m_hasExplicitValue) { 257 if (!m_hasExplicitValue) {
258 m_isValueUpToDate = false; 258 m_isValueUpToDate = false;
259 if (m_marker) 259 if (m_marker)
260 m_marker->setNeedsLayoutAndPrefWidthsRecalc(); 260 m_marker->setNeedsLayoutAndPrefWidthsRecalc();
261 } 261 }
262 } 262 }
263 263
264 static RenderObject* firstNonMarkerChild(RenderObject* parent) 264 static RenderObject* firstNonMarkerChild(RenderObject* parent)
265 { 265 {
266 RenderObject* result = parent->firstChild(); 266 RenderObject* result = parent->slowFirstChild();
267 while (result && result->isListMarker()) 267 while (result && result->isListMarker())
268 result = result->nextSibling(); 268 result = result->nextSibling();
269 return result; 269 return result;
270 } 270 }
271 271
272 void RenderListItem::updateMarkerLocation() 272 void RenderListItem::updateMarkerLocation()
273 { 273 {
274 // Sanity check the location of our marker. 274 // Sanity check the location of our marker.
275 if (m_marker) { 275 if (m_marker) {
276 RenderObject* markerParent = m_marker->parent(); 276 RenderObject* markerParent = m_marker->parent();
(...skipping 19 matching lines...) Expand all
296 LayoutStateDisabler layoutStateDisabler(*this); 296 LayoutStateDisabler layoutStateDisabler(*this);
297 updateFirstLetter(); 297 updateFirstLetter();
298 m_marker->remove(); 298 m_marker->remove();
299 if (markerParent) 299 if (markerParent)
300 markerParent->dirtyLinesFromChangedChild(m_marker); 300 markerParent->dirtyLinesFromChangedChild(m_marker);
301 if (!lineBoxParent) 301 if (!lineBoxParent)
302 lineBoxParent = this; 302 lineBoxParent = this;
303 lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent) ); 303 lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent) );
304 m_marker->updateMarginsAndContent(); 304 m_marker->updateMarginsAndContent();
305 // If markerParent is an anonymous block that has lost all its child ren, destroy it. 305 // If markerParent is an anonymous block that has lost all its child ren, destroy it.
306 if (markerParent && markerParent->isAnonymousBlock() && !markerParen t->firstChild() && !toRenderBlock(markerParent)->continuation()) 306 if (markerParent && markerParent->isAnonymousBlock() && !toRenderBlo ck(markerParent)->firstChild() && !toRenderBlock(markerParent)->continuation())
307 markerParent->destroy(); 307 markerParent->destroy();
308 308
309 // If the marker is inside we need to redo the preferred width calcu lations 309 // If the marker is inside we need to redo the preferred width calcu lations
310 // as the size of the item now includes the size of the list marker. 310 // as the size of the item now includes the size of the list marker.
311 if (m_marker->isInside()) 311 if (m_marker->isInside())
312 containingBlock()->updateLogicalWidth(); 312 containingBlock()->updateLogicalWidth();
313 } 313 }
314 } 314 }
315 } 315 }
316 316
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 // assume that all the following ones have too. 512 // assume that all the following ones have too.
513 // This gives us the opportunity to stop here and avoid 513 // This gives us the opportunity to stop here and avoid
514 // marking the same nodes again. 514 // marking the same nodes again.
515 break; 515 break;
516 } 516 }
517 item->updateValue(); 517 item->updateValue();
518 } 518 }
519 } 519 }
520 520
521 } // namespace WebCore 521 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerStackingNode.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698