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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after
3349 if (!inlineRunStart) 3349 if (!inlineRunStart)
3350 break; 3350 break;
3351 3351
3352 child = inlineRunEnd->nextSibling(); 3352 child = inlineRunEnd->nextSibling();
3353 3353
3354 LayoutBlock* block = createAnonymousBlock(); 3354 LayoutBlock* block = createAnonymousBlock();
3355 children()->insertChildNode(this, block, inlineRunStart); 3355 children()->insertChildNode(this, block, inlineRunStart);
3356 moveChildrenTo(block, inlineRunStart, child); 3356 moveChildrenTo(block, inlineRunStart, child);
3357 } 3357 }
3358 3358
3359 #if ENABLE(ASSERT) 3359 #if DCHECK_IS_ON()
3360 for (LayoutObject* c = firstChild(); c; c = c->nextSibling()) 3360 for (LayoutObject* c = firstChild(); c; c = c->nextSibling())
3361 ASSERT(!c->isInline()); 3361 ASSERT(!c->isInline());
3362 #endif 3362 #endif
3363 3363
3364 setShouldDoFullPaintInvalidation(); 3364 setShouldDoFullPaintInvalidation();
3365 } 3365 }
3366 3366
3367 void LayoutBlockFlow::childBecameNonInline(LayoutObject*) { 3367 void LayoutBlockFlow::childBecameNonInline(LayoutObject*) {
3368 makeChildrenNonInline(); 3368 makeChildrenNonInline();
3369 if (isAnonymousBlock() && parent() && parent()->isLayoutBlock()) 3369 if (isAnonymousBlock() && parent() && parent()->isLayoutBlock())
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
3569 // This is accomplished by pretending they have a height of 1. 3569 // This is accomplished by pretending they have a height of 1.
3570 logicalBottom = std::max(logicalBottom, logicalTop + 1); 3570 logicalBottom = std::max(logicalBottom, logicalTop + 1);
3571 } 3571 }
3572 if (floatingObject.originatingLine()) { 3572 if (floatingObject.originatingLine()) {
3573 if (!selfNeedsLayout()) { 3573 if (!selfNeedsLayout()) {
3574 ASSERT( 3574 ASSERT(
3575 floatingObject.originatingLine()->getLineLayoutItem().isEqual( 3575 floatingObject.originatingLine()->getLineLayoutItem().isEqual(
3576 this)); 3576 this));
3577 floatingObject.originatingLine()->markDirty(); 3577 floatingObject.originatingLine()->markDirty();
3578 } 3578 }
3579 #if ENABLE(ASSERT) 3579 #if DCHECK_IS_ON()
3580 floatingObject.setOriginatingLine(nullptr); 3580 floatingObject.setOriginatingLine(nullptr);
3581 #endif 3581 #endif
3582 } 3582 }
3583 markLinesDirtyInBlockRange(LayoutUnit(), logicalBottom); 3583 markLinesDirtyInBlockRange(LayoutUnit(), logicalBottom);
3584 } 3584 }
3585 m_floatingObjects->remove(&floatingObject); 3585 m_floatingObjects->remove(&floatingObject);
3586 } 3586 }
3587 } 3587 }
3588 } 3588 }
3589 3589
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
4598 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); 4598 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState);
4599 } 4599 }
4600 4600
4601 void LayoutBlockFlow::invalidateDisplayItemClients( 4601 void LayoutBlockFlow::invalidateDisplayItemClients(
4602 PaintInvalidationReason invalidationReason) const { 4602 PaintInvalidationReason invalidationReason) const {
4603 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( 4603 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(
4604 invalidationReason); 4604 invalidationReason);
4605 } 4605 }
4606 4606
4607 } // namespace blink 4607 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698