| 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 3619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3630 | 3630 |
| 3631 if (width) | 3631 if (width) |
| 3632 width->shrinkAvailableWidthForNewFloatIfNeeded(floatingObject); | 3632 width->shrinkAvailableWidthForNewFloatIfNeeded(floatingObject); |
| 3633 } | 3633 } |
| 3634 return true; | 3634 return true; |
| 3635 } | 3635 } |
| 3636 | 3636 |
| 3637 LayoutUnit LayoutBlockFlow::positionAndLayoutFloat( | 3637 LayoutUnit LayoutBlockFlow::positionAndLayoutFloat( |
| 3638 FloatingObject& floatingObject, | 3638 FloatingObject& floatingObject, |
| 3639 LayoutUnit logicalTopMarginEdge) { | 3639 LayoutUnit logicalTopMarginEdge) { |
| 3640 // Once a float has been placed, we cannot update its position, or the float |
| 3641 // interval tree will be out of sync with reality. This may in turn lead to |
| 3642 // objects being used after they have been deleted. |
| 3643 CHECK(!floatingObject.isPlaced()); |
| 3644 |
| 3640 LayoutBox& child = *floatingObject.layoutObject(); | 3645 LayoutBox& child = *floatingObject.layoutObject(); |
| 3641 | 3646 |
| 3642 // FIXME Investigate if this can be removed. crbug.com/370006 | 3647 // FIXME Investigate if this can be removed. crbug.com/370006 |
| 3643 child.setMayNeedPaintInvalidation(); | 3648 child.setMayNeedPaintInvalidation(); |
| 3644 | 3649 |
| 3645 logicalTopMarginEdge = std::max( | 3650 logicalTopMarginEdge = std::max( |
| 3646 logicalTopMarginEdge, lowestFloatLogicalBottom(child.style()->clear())); | 3651 logicalTopMarginEdge, lowestFloatLogicalBottom(child.style()->clear())); |
| 3647 | 3652 |
| 3648 bool isPaginated = view()->layoutState()->isPaginated(); | 3653 bool isPaginated = view()->layoutState()->isPaginated(); |
| 3649 if (isPaginated && !childrenInline()) { | 3654 if (isPaginated && !childrenInline()) { |
| (...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4564 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); | 4569 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); |
| 4565 } | 4570 } |
| 4566 | 4571 |
| 4567 void LayoutBlockFlow::invalidateDisplayItemClients( | 4572 void LayoutBlockFlow::invalidateDisplayItemClients( |
| 4568 PaintInvalidationReason invalidationReason) const { | 4573 PaintInvalidationReason invalidationReason) const { |
| 4569 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( | 4574 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( |
| 4570 invalidationReason); | 4575 invalidationReason); |
| 4571 } | 4576 } |
| 4572 | 4577 |
| 4573 } // namespace blink | 4578 } // namespace blink |
| OLD | NEW |