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

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

Issue 2547933003: Stop searching for overhanging floats when the sibling's floats no longer overlap (Closed)
Patch Set: bug 670325 Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after
1802 1802
1803 // If |child| has moved up into previous siblings it needs to avoid or clear 1803 // If |child| has moved up into previous siblings it needs to avoid or clear
1804 // any floats they contain. 1804 // any floats they contain.
1805 LayoutUnit oldLogicalHeight = logicalHeight(); 1805 LayoutUnit oldLogicalHeight = logicalHeight();
1806 setLogicalHeight(logicalTop); 1806 setLogicalHeight(logicalTop);
1807 while (previousBlockFlow) { 1807 while (previousBlockFlow) {
1808 auto lowestFloat = previousBlockFlow->logicalTop() + 1808 auto lowestFloat = previousBlockFlow->logicalTop() +
1809 previousBlockFlow->lowestFloatLogicalBottom(); 1809 previousBlockFlow->lowestFloatLogicalBottom();
1810 if (lowestFloat > logicalTop) 1810 if (lowestFloat > logicalTop)
1811 addOverhangingFloats(previousBlockFlow, false); 1811 addOverhangingFloats(previousBlockFlow, false);
1812 else
1813 break;
1812 LayoutObject* prev = previousBlockFlow->previousSibling(); 1814 LayoutObject* prev = previousBlockFlow->previousSibling();
1813 if (prev && prev->isLayoutBlockFlow()) 1815 if (prev && prev->isLayoutBlockFlow())
1814 previousBlockFlow = toLayoutBlockFlow(prev); 1816 previousBlockFlow = toLayoutBlockFlow(prev);
1815 else 1817 else
1816 previousBlockFlow = nullptr; 1818 previousBlockFlow = nullptr;
1817 } 1819 }
1818 setLogicalHeight(oldLogicalHeight); 1820 setLogicalHeight(oldLogicalHeight);
1819 1821
1820 if (previousBlockFlowCanSelfCollapse) { 1822 if (previousBlockFlowCanSelfCollapse) {
1821 // If |child|'s previous sibling is or contains a self-collapsing block that 1823 // If |child|'s previous sibling is or contains a self-collapsing block that
(...skipping 2742 matching lines...) Expand 10 before | Expand all | Expand 10 after
4564 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); 4566 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState);
4565 } 4567 }
4566 4568
4567 void LayoutBlockFlow::invalidateDisplayItemClients( 4569 void LayoutBlockFlow::invalidateDisplayItemClients(
4568 PaintInvalidationReason invalidationReason) const { 4570 PaintInvalidationReason invalidationReason) const {
4569 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( 4571 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(
4570 invalidationReason); 4572 invalidationReason);
4571 } 4573 }
4572 4574
4573 } // namespace blink 4575 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698