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

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

Issue 2758683002: Replace ASSERT_NOT_REACHED with NOTREACHED in core/layout/ (Closed)
Patch Set: Rebase with latest Created 3 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
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 2731 matching lines...) Expand 10 before | Expand all | Expand 10 after
2742 childLogicalWidthAtNewLogicalTopOffset) 2742 childLogicalWidthAtNewLogicalTopOffset)
2743 child->setChildNeedsLayout(MarkOnlyThis); 2743 child->setChildNeedsLayout(MarkOnlyThis);
2744 return newLogicalTop - logicalTop; 2744 return newLogicalTop - logicalTop;
2745 } 2745 }
2746 2746
2747 newLogicalTop = nextFloatLogicalBottomBelowForBlock(newLogicalTop); 2747 newLogicalTop = nextFloatLogicalBottomBelowForBlock(newLogicalTop);
2748 ASSERT(newLogicalTop >= logicalTop); 2748 ASSERT(newLogicalTop >= logicalTop);
2749 if (newLogicalTop < logicalTop) 2749 if (newLogicalTop < logicalTop)
2750 break; 2750 break;
2751 } 2751 }
2752 ASSERT_NOT_REACHED(); 2752 NOTREACHED();
2753 } 2753 }
2754 return result; 2754 return result;
2755 } 2755 }
2756 2756
2757 void LayoutBlockFlow::createFloatingObjects() { 2757 void LayoutBlockFlow::createFloatingObjects() {
2758 m_floatingObjects = 2758 m_floatingObjects =
2759 WTF::wrapUnique(new FloatingObjects(this, isHorizontalWritingMode())); 2759 WTF::wrapUnique(new FloatingObjects(this, isHorizontalWritingMode()));
2760 } 2760 }
2761 2761
2762 void LayoutBlockFlow::willBeDestroyed() { 2762 void LayoutBlockFlow::willBeDestroyed() {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
3064 continue; 3064 continue;
3065 3065
3066 // Found our previous continuation. We just need to point it to 3066 // Found our previous continuation. We just need to point it to
3067 // |this|'s next continuation. 3067 // |this|'s next continuation.
3068 LayoutBoxModelObject* nextContinuation = continuation(); 3068 LayoutBoxModelObject* nextContinuation = continuation();
3069 if (curr->isLayoutInline()) 3069 if (curr->isLayoutInline())
3070 toLayoutInline(curr)->setContinuation(nextContinuation); 3070 toLayoutInline(curr)->setContinuation(nextContinuation);
3071 else if (curr->isLayoutBlockFlow()) 3071 else if (curr->isLayoutBlockFlow())
3072 toLayoutBlockFlow(curr)->setContinuation(nextContinuation); 3072 toLayoutBlockFlow(curr)->setContinuation(nextContinuation);
3073 else 3073 else
3074 ASSERT_NOT_REACHED(); 3074 NOTREACHED();
3075 3075
3076 break; 3076 break;
3077 } 3077 }
3078 setContinuation(nullptr); 3078 setContinuation(nullptr);
3079 destroy(); 3079 destroy();
3080 } 3080 }
3081 } else if (!beingDestroyed() && 3081 } else if (!beingDestroyed() &&
3082 !oldChild->isFloatingOrOutOfFlowPositioned() && 3082 !oldChild->isFloatingOrOutOfFlowPositioned() &&
3083 !oldChild->isAnonymousBlock()) { 3083 !oldChild->isAnonymousBlock()) {
3084 // If the child we're removing means that we can now treat all children as 3084 // If the child we're removing means that we can now treat all children as
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
4230 FlowThreadType type) { 4230 FlowThreadType type) {
4231 switch (type) { 4231 switch (type) {
4232 case MultiColumnFlowThread: 4232 case MultiColumnFlowThread:
4233 return LayoutMultiColumnFlowThread::createAnonymous(document(), 4233 return LayoutMultiColumnFlowThread::createAnonymous(document(),
4234 styleRef()); 4234 styleRef());
4235 case PagedFlowThread: 4235 case PagedFlowThread:
4236 // Paged overflow is currently done using the multicol implementation. 4236 // Paged overflow is currently done using the multicol implementation.
4237 UseCounter::count(document(), UseCounter::CSSOverflowPaged); 4237 UseCounter::count(document(), UseCounter::CSSOverflowPaged);
4238 return LayoutPagedFlowThread::createAnonymous(document(), styleRef()); 4238 return LayoutPagedFlowThread::createAnonymous(document(), styleRef());
4239 default: 4239 default:
4240 ASSERT_NOT_REACHED(); 4240 NOTREACHED();
4241 return nullptr; 4241 return nullptr;
4242 } 4242 }
4243 } 4243 }
4244 4244
4245 void LayoutBlockFlow::createOrDestroyMultiColumnFlowThreadIfNeeded( 4245 void LayoutBlockFlow::createOrDestroyMultiColumnFlowThreadIfNeeded(
4246 const ComputedStyle* oldStyle) { 4246 const ComputedStyle* oldStyle) {
4247 if (RuntimeEnabledFeatures::layoutNGEnabled()) 4247 if (RuntimeEnabledFeatures::layoutNGEnabled())
4248 return; 4248 return;
4249 4249
4250 // Paged overflow trumps multicol in this implementation. Ideally, it should 4250 // Paged overflow trumps multicol in this implementation. Ideally, it should
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
4512 if (lastRootBoxWithChildren) { 4512 if (lastRootBoxWithChildren) {
4513 // We hit this case for Mac behavior when the Y coordinate is below the last 4513 // We hit this case for Mac behavior when the Y coordinate is below the last
4514 // box. 4514 // box.
4515 ASSERT(moveCaretToBoundary); 4515 ASSERT(moveCaretToBoundary);
4516 InlineBox* logicallyLastBox; 4516 InlineBox* logicallyLastBox;
4517 if (lastRootBoxWithChildren->getLogicalEndBoxWithNode(logicallyLastBox)) 4517 if (lastRootBoxWithChildren->getLogicalEndBoxWithNode(logicallyLastBox))
4518 return PositionWithAffinity(positionForBox(logicallyLastBox, false)); 4518 return PositionWithAffinity(positionForBox(logicallyLastBox, false));
4519 } 4519 }
4520 4520
4521 // Can't reach this. We have a root line box, but it has no kids. 4521 // Can't reach this. We have a root line box, but it has no kids.
4522 // FIXME: This should ASSERT_NOT_REACHED(), but clicking on placeholder text 4522 // FIXME: This should NOTREACHED(), but clicking on placeholder text
4523 // seems to hit this code path. 4523 // seems to hit this code path.
4524 return createPositionWithAffinity(0); 4524 return createPositionWithAffinity(0);
4525 } 4525 }
4526 4526
4527 #ifndef NDEBUG 4527 #ifndef NDEBUG
4528 4528
4529 void LayoutBlockFlow::showLineTreeAndMark(const InlineBox* markedBox1, 4529 void LayoutBlockFlow::showLineTreeAndMark(const InlineBox* markedBox1,
4530 const char* markedLabel1, 4530 const char* markedLabel1,
4531 const InlineBox* markedBox2, 4531 const InlineBox* markedBox2,
4532 const char* markedLabel2, 4532 const char* markedLabel2,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
4602 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); 4602 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState);
4603 } 4603 }
4604 4604
4605 void LayoutBlockFlow::invalidateDisplayItemClients( 4605 void LayoutBlockFlow::invalidateDisplayItemClients(
4606 PaintInvalidationReason invalidationReason) const { 4606 PaintInvalidationReason invalidationReason) const {
4607 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( 4607 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(
4608 invalidationReason); 4608 invalidationReason);
4609 } 4609 }
4610 4610
4611 } // namespace blink 4611 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698