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