| OLD | NEW |
| 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 2729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2740 childLogicalWidthAtNewLogicalTopOffset) | 2740 childLogicalWidthAtNewLogicalTopOffset) |
| 2741 child->setChildNeedsLayout(MarkOnlyThis); | 2741 child->setChildNeedsLayout(MarkOnlyThis); |
| 2742 return newLogicalTop - logicalTop; | 2742 return newLogicalTop - logicalTop; |
| 2743 } | 2743 } |
| 2744 | 2744 |
| 2745 newLogicalTop = nextFloatLogicalBottomBelowForBlock(newLogicalTop); | 2745 newLogicalTop = nextFloatLogicalBottomBelowForBlock(newLogicalTop); |
| 2746 ASSERT(newLogicalTop >= logicalTop); | 2746 ASSERT(newLogicalTop >= logicalTop); |
| 2747 if (newLogicalTop < logicalTop) | 2747 if (newLogicalTop < logicalTop) |
| 2748 break; | 2748 break; |
| 2749 } | 2749 } |
| 2750 ASSERT_NOT_REACHED(); | 2750 NOTREACHED(); |
| 2751 } | 2751 } |
| 2752 return result; | 2752 return result; |
| 2753 } | 2753 } |
| 2754 | 2754 |
| 2755 void LayoutBlockFlow::createFloatingObjects() { | 2755 void LayoutBlockFlow::createFloatingObjects() { |
| 2756 m_floatingObjects = | 2756 m_floatingObjects = |
| 2757 WTF::wrapUnique(new FloatingObjects(this, isHorizontalWritingMode())); | 2757 WTF::wrapUnique(new FloatingObjects(this, isHorizontalWritingMode())); |
| 2758 } | 2758 } |
| 2759 | 2759 |
| 2760 void LayoutBlockFlow::willBeDestroyed() { | 2760 void LayoutBlockFlow::willBeDestroyed() { |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3062 continue; | 3062 continue; |
| 3063 | 3063 |
| 3064 // Found our previous continuation. We just need to point it to | 3064 // Found our previous continuation. We just need to point it to |
| 3065 // |this|'s next continuation. | 3065 // |this|'s next continuation. |
| 3066 LayoutBoxModelObject* nextContinuation = continuation(); | 3066 LayoutBoxModelObject* nextContinuation = continuation(); |
| 3067 if (curr->isLayoutInline()) | 3067 if (curr->isLayoutInline()) |
| 3068 toLayoutInline(curr)->setContinuation(nextContinuation); | 3068 toLayoutInline(curr)->setContinuation(nextContinuation); |
| 3069 else if (curr->isLayoutBlockFlow()) | 3069 else if (curr->isLayoutBlockFlow()) |
| 3070 toLayoutBlockFlow(curr)->setContinuation(nextContinuation); | 3070 toLayoutBlockFlow(curr)->setContinuation(nextContinuation); |
| 3071 else | 3071 else |
| 3072 ASSERT_NOT_REACHED(); | 3072 NOTREACHED(); |
| 3073 | 3073 |
| 3074 break; | 3074 break; |
| 3075 } | 3075 } |
| 3076 setContinuation(nullptr); | 3076 setContinuation(nullptr); |
| 3077 destroy(); | 3077 destroy(); |
| 3078 } | 3078 } |
| 3079 } else if (!beingDestroyed() && | 3079 } else if (!beingDestroyed() && |
| 3080 !oldChild->isFloatingOrOutOfFlowPositioned() && | 3080 !oldChild->isFloatingOrOutOfFlowPositioned() && |
| 3081 !oldChild->isAnonymousBlock()) { | 3081 !oldChild->isAnonymousBlock()) { |
| 3082 // If the child we're removing means that we can now treat all children as | 3082 // If the child we're removing means that we can now treat all children as |
| (...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4215 FlowThreadType type) { | 4215 FlowThreadType type) { |
| 4216 switch (type) { | 4216 switch (type) { |
| 4217 case MultiColumnFlowThread: | 4217 case MultiColumnFlowThread: |
| 4218 return LayoutMultiColumnFlowThread::createAnonymous(document(), | 4218 return LayoutMultiColumnFlowThread::createAnonymous(document(), |
| 4219 styleRef()); | 4219 styleRef()); |
| 4220 case PagedFlowThread: | 4220 case PagedFlowThread: |
| 4221 // Paged overflow is currently done using the multicol implementation. | 4221 // Paged overflow is currently done using the multicol implementation. |
| 4222 UseCounter::count(document(), UseCounter::CSSOverflowPaged); | 4222 UseCounter::count(document(), UseCounter::CSSOverflowPaged); |
| 4223 return LayoutPagedFlowThread::createAnonymous(document(), styleRef()); | 4223 return LayoutPagedFlowThread::createAnonymous(document(), styleRef()); |
| 4224 default: | 4224 default: |
| 4225 ASSERT_NOT_REACHED(); | 4225 NOTREACHED(); |
| 4226 return nullptr; | 4226 return nullptr; |
| 4227 } | 4227 } |
| 4228 } | 4228 } |
| 4229 | 4229 |
| 4230 void LayoutBlockFlow::createOrDestroyMultiColumnFlowThreadIfNeeded( | 4230 void LayoutBlockFlow::createOrDestroyMultiColumnFlowThreadIfNeeded( |
| 4231 const ComputedStyle* oldStyle) { | 4231 const ComputedStyle* oldStyle) { |
| 4232 if (RuntimeEnabledFeatures::layoutNGEnabled()) | 4232 if (RuntimeEnabledFeatures::layoutNGEnabled()) |
| 4233 return; | 4233 return; |
| 4234 | 4234 |
| 4235 // Paged overflow trumps multicol in this implementation. Ideally, it should | 4235 // Paged overflow trumps multicol in this implementation. Ideally, it should |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4497 if (lastRootBoxWithChildren) { | 4497 if (lastRootBoxWithChildren) { |
| 4498 // We hit this case for Mac behavior when the Y coordinate is below the last | 4498 // We hit this case for Mac behavior when the Y coordinate is below the last |
| 4499 // box. | 4499 // box. |
| 4500 ASSERT(moveCaretToBoundary); | 4500 ASSERT(moveCaretToBoundary); |
| 4501 InlineBox* logicallyLastBox; | 4501 InlineBox* logicallyLastBox; |
| 4502 if (lastRootBoxWithChildren->getLogicalEndBoxWithNode(logicallyLastBox)) | 4502 if (lastRootBoxWithChildren->getLogicalEndBoxWithNode(logicallyLastBox)) |
| 4503 return PositionWithAffinity(positionForBox(logicallyLastBox, false)); | 4503 return PositionWithAffinity(positionForBox(logicallyLastBox, false)); |
| 4504 } | 4504 } |
| 4505 | 4505 |
| 4506 // Can't reach this. We have a root line box, but it has no kids. | 4506 // Can't reach this. We have a root line box, but it has no kids. |
| 4507 // FIXME: This should ASSERT_NOT_REACHED(), but clicking on placeholder text | 4507 // FIXME: This should NOTREACHED(), but clicking on placeholder text |
| 4508 // seems to hit this code path. | 4508 // seems to hit this code path. |
| 4509 return createPositionWithAffinity(0); | 4509 return createPositionWithAffinity(0); |
| 4510 } | 4510 } |
| 4511 | 4511 |
| 4512 #ifndef NDEBUG | 4512 #ifndef NDEBUG |
| 4513 | 4513 |
| 4514 void LayoutBlockFlow::showLineTreeAndMark(const InlineBox* markedBox1, | 4514 void LayoutBlockFlow::showLineTreeAndMark(const InlineBox* markedBox1, |
| 4515 const char* markedLabel1, | 4515 const char* markedLabel1, |
| 4516 const InlineBox* markedBox2, | 4516 const InlineBox* markedBox2, |
| 4517 const char* markedLabel2, | 4517 const char* markedLabel2, |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4587 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); | 4587 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); |
| 4588 } | 4588 } |
| 4589 | 4589 |
| 4590 void LayoutBlockFlow::invalidateDisplayItemClients( | 4590 void LayoutBlockFlow::invalidateDisplayItemClients( |
| 4591 PaintInvalidationReason invalidationReason) const { | 4591 PaintInvalidationReason invalidationReason) const { |
| 4592 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( | 4592 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( |
| 4593 invalidationReason); | 4593 invalidationReason); |
| 4594 } | 4594 } |
| 4595 | 4595 |
| 4596 } // namespace blink | 4596 } // namespace blink |
| OLD | NEW |