| 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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 | 477 |
| 478 // Reset the flag here instead of in layoutInlineChildren() in case that | 478 // Reset the flag here instead of in layoutInlineChildren() in case that |
| 479 // all inline children are removed from this block. | 479 // all inline children are removed from this block. |
| 480 setContainsInlineWithOutlineAndContinuation(false); | 480 setContainsInlineWithOutlineAndContinuation(false); |
| 481 if (childrenInline()) | 481 if (childrenInline()) |
| 482 layoutInlineChildren(relayoutChildren, afterEdge); | 482 layoutInlineChildren(relayoutChildren, afterEdge); |
| 483 else | 483 else |
| 484 layoutBlockChildren(relayoutChildren, layoutScope, beforeEdge, afterEdge
); | 484 layoutBlockChildren(relayoutChildren, layoutScope, beforeEdge, afterEdge
); |
| 485 | 485 |
| 486 bool preferredLogicalWidthsBecameDirty = !preferredLogicalWidthsWereDirty &&
preferredLogicalWidthsDirty(); | 486 bool preferredLogicalWidthsBecameDirty = !preferredLogicalWidthsWereDirty &&
preferredLogicalWidthsDirty(); |
| 487 if (preferredLogicalWidthsBecameDirty) | 487 if (preferredLogicalWidthsBecameDirty) { |
| 488 return false; | 488 // The only thing that should dirty preferred widths at this point is th
e addition of |
| 489 // overflow:auto scrollbars in a descendant. To avoid a potential infin
ite loop, |
| 490 // run layout again with auto scrollbars frozen in their current state. |
| 491 PaintLayerScrollableArea::FreezeScrollbarsScope freezeScrollbars; |
| 492 return layoutBlockFlow(relayoutChildren, pageLogicalHeight, layoutScope)
; |
| 493 } |
| 489 | 494 |
| 490 // Expand our intrinsic height to encompass floats. | 495 // Expand our intrinsic height to encompass floats. |
| 491 if (lowestFloatLogicalBottom() > (logicalHeight() - afterEdge) && createsNew
FormattingContext()) | 496 if (lowestFloatLogicalBottom() > (logicalHeight() - afterEdge) && createsNew
FormattingContext()) |
| 492 setLogicalHeight(lowestFloatLogicalBottom() + afterEdge); | 497 setLogicalHeight(lowestFloatLogicalBottom() + afterEdge); |
| 493 | 498 |
| 494 if (LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { | 499 if (LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { |
| 495 if (flowThread->columnHeightsChanged()) { | 500 if (flowThread->columnHeightsChanged()) { |
| 496 setChildNeedsLayout(MarkOnlyThis); | 501 setChildNeedsLayout(MarkOnlyThis); |
| 497 return false; | 502 return false; |
| 498 } | 503 } |
| (...skipping 3256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3755 | 3760 |
| 3756 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); | 3761 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); |
| 3757 } | 3762 } |
| 3758 | 3763 |
| 3759 void LayoutBlockFlow::invalidateDisplayItemClients(PaintInvalidationReason inval
idationReason) const | 3764 void LayoutBlockFlow::invalidateDisplayItemClients(PaintInvalidationReason inval
idationReason) const |
| 3760 { | 3765 { |
| 3761 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(invalidationRe
ason); | 3766 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(invalidationRe
ason); |
| 3762 } | 3767 } |
| 3763 | 3768 |
| 3764 } // namespace blink | 3769 } // namespace blink |
| OLD | NEW |