Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp

Issue 2786463004: Paint backgrounds of a table section/row in one display item (Closed)
Patch Set: - Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after
3888 // enclosing layer. 3888 // enclosing layer.
3889 // If makeChildPaintOtherFloats is false, it means that the child must 3889 // If makeChildPaintOtherFloats is false, it means that the child must
3890 // already know about all the floats it should paint. 3890 // already know about all the floats it should paint.
3891 floatingObject.setShouldPaint(true); 3891 floatingObject.setShouldPaint(true);
3892 } 3892 }
3893 3893
3894 // Since the float doesn't overhang, it didn't get put into our list. We 3894 // Since the float doesn't overhang, it didn't get put into our list. We
3895 // need to go ahead and add its overflow in to the child now. 3895 // need to go ahead and add its overflow in to the child now.
3896 if (floatingObject.isDescendant()) 3896 if (floatingObject.isDescendant())
3897 child->addOverflowFromChild( 3897 child->addOverflowFromChild(
3898 floatingObject.layoutObject(), 3898 *floatingObject.layoutObject(),
3899 LayoutSize(xPositionForFloatIncludingMargin(floatingObject), 3899 LayoutSize(xPositionForFloatIncludingMargin(floatingObject),
3900 yPositionForFloatIncludingMargin(floatingObject))); 3900 yPositionForFloatIncludingMargin(floatingObject)));
3901 } 3901 }
3902 } 3902 }
3903 } 3903 }
3904 3904
3905 LayoutUnit LayoutBlockFlow::lowestFloatLogicalBottom(EClear clear) const { 3905 LayoutUnit LayoutBlockFlow::lowestFloatLogicalBottom(EClear clear) const {
3906 if (clear == EClear::kNone || !m_floatingObjects) 3906 if (clear == EClear::kNone || !m_floatingObjects)
3907 return LayoutUnit(); 3907 return LayoutUnit();
3908 3908
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
4602 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); 4602 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState);
4603 } 4603 }
4604 4604
4605 void LayoutBlockFlow::invalidateDisplayItemClients( 4605 void LayoutBlockFlow::invalidateDisplayItemClients(
4606 PaintInvalidationReason invalidationReason) const { 4606 PaintInvalidationReason invalidationReason) const {
4607 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( 4607 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(
4608 invalidationReason); 4608 invalidationReason);
4609 } 4609 }
4610 4610
4611 } // namespace blink 4611 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698