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 2394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2405 if (!m_floatingObjects) | 2405 if (!m_floatingObjects) |
2406 return; | 2406 return; |
2407 | 2407 |
2408 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); | 2408 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
2409 FloatingObjectSetIterator end = floatingObjectSet.end(); | 2409 FloatingObjectSetIterator end = floatingObjectSet.end(); |
2410 for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; | 2410 for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; |
2411 ++it) { | 2411 ++it) { |
2412 const FloatingObject& floatingObject = *it->get(); | 2412 const FloatingObject& floatingObject = *it->get(); |
2413 if (floatingObject.isDescendant()) | 2413 if (floatingObject.isDescendant()) |
2414 addOverflowFromChild( | 2414 addOverflowFromChild( |
2415 floatingObject.layoutObject(), | 2415 *floatingObject.layoutObject(), |
2416 LayoutSize(xPositionForFloatIncludingMargin(floatingObject), | 2416 LayoutSize(xPositionForFloatIncludingMargin(floatingObject), |
2417 yPositionForFloatIncludingMargin(floatingObject))); | 2417 yPositionForFloatIncludingMargin(floatingObject))); |
2418 } | 2418 } |
2419 } | 2419 } |
2420 | 2420 |
2421 void LayoutBlockFlow::computeOverflow(LayoutUnit oldClientAfterEdge, | 2421 void LayoutBlockFlow::computeOverflow(LayoutUnit oldClientAfterEdge, |
2422 bool recomputeFloats) { | 2422 bool recomputeFloats) { |
2423 LayoutBlock::computeOverflow(oldClientAfterEdge, recomputeFloats); | 2423 LayoutBlock::computeOverflow(oldClientAfterEdge, recomputeFloats); |
2424 if (recomputeFloats || createsNewFormattingContext() || | 2424 if (recomputeFloats || createsNewFormattingContext() || |
2425 hasSelfPaintingLayer()) | 2425 hasSelfPaintingLayer()) |
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3902 // enclosing layer. | 3902 // enclosing layer. |
3903 // If makeChildPaintOtherFloats is false, it means that the child must | 3903 // If makeChildPaintOtherFloats is false, it means that the child must |
3904 // already know about all the floats it should paint. | 3904 // already know about all the floats it should paint. |
3905 floatingObject.setShouldPaint(true); | 3905 floatingObject.setShouldPaint(true); |
3906 } | 3906 } |
3907 | 3907 |
3908 // Since the float doesn't overhang, it didn't get put into our list. We | 3908 // Since the float doesn't overhang, it didn't get put into our list. We |
3909 // need to go ahead and add its overflow in to the child now. | 3909 // need to go ahead and add its overflow in to the child now. |
3910 if (floatingObject.isDescendant()) | 3910 if (floatingObject.isDescendant()) |
3911 child->addOverflowFromChild( | 3911 child->addOverflowFromChild( |
3912 floatingObject.layoutObject(), | 3912 *floatingObject.layoutObject(), |
3913 LayoutSize(xPositionForFloatIncludingMargin(floatingObject), | 3913 LayoutSize(xPositionForFloatIncludingMargin(floatingObject), |
3914 yPositionForFloatIncludingMargin(floatingObject))); | 3914 yPositionForFloatIncludingMargin(floatingObject))); |
3915 } | 3915 } |
3916 } | 3916 } |
3917 } | 3917 } |
3918 | 3918 |
3919 LayoutUnit LayoutBlockFlow::lowestFloatLogicalBottom(EClear clear) const { | 3919 LayoutUnit LayoutBlockFlow::lowestFloatLogicalBottom(EClear clear) const { |
3920 if (clear == EClear::kNone || !m_floatingObjects) | 3920 if (clear == EClear::kNone || !m_floatingObjects) |
3921 return LayoutUnit(); | 3921 return LayoutUnit(); |
3922 | 3922 |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4613 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); | 4613 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); |
4614 } | 4614 } |
4615 | 4615 |
4616 void LayoutBlockFlow::invalidateDisplayItemClients( | 4616 void LayoutBlockFlow::invalidateDisplayItemClients( |
4617 PaintInvalidationReason invalidationReason) const { | 4617 PaintInvalidationReason invalidationReason) const { |
4618 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( | 4618 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( |
4619 invalidationReason); | 4619 invalidationReason); |
4620 } | 4620 } |
4621 | 4621 |
4622 } // namespace blink | 4622 } // namespace blink |
OLD | NEW |