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

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

Issue 2504173002: When placing a float, pay attention to its final logical top. (Closed)
Patch Set: Created 4 years, 1 month 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 | « third_party/WebKit/LayoutTests/fast/block/float/float-on-line-large-and-small-float-below.html ('k') | 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 3614 matching lines...) Expand 10 before | Expand all | Expand 10 after
3625 std::max(logicalTopForFloat(*lastPlacedFloatingObject), logicalTop); 3625 std::max(logicalTopForFloat(*lastPlacedFloatingObject), logicalTop);
3626 3626
3627 FloatingObjectSetIterator end = floatingObjectSet.end(); 3627 FloatingObjectSetIterator end = floatingObjectSet.end();
3628 // Now walk through the set of unpositioned floats and place them. 3628 // Now walk through the set of unpositioned floats and place them.
3629 for (; it != end; ++it) { 3629 for (; it != end; ++it) {
3630 FloatingObject& floatingObject = *it->get(); 3630 FloatingObject& floatingObject = *it->get();
3631 // The containing block is responsible for positioning floats, so if we have 3631 // The containing block is responsible for positioning floats, so if we have
3632 // unplaced floats in our list that come from somewhere else, we have a bug. 3632 // unplaced floats in our list that come from somewhere else, we have a bug.
3633 DCHECK_EQ(floatingObject.layoutObject()->containingBlock(), this); 3633 DCHECK_EQ(floatingObject.layoutObject()->containingBlock(), this);
3634 3634
3635 positionAndLayoutFloat(floatingObject, logicalTop); 3635 logicalTop = positionAndLayoutFloat(floatingObject, logicalTop);
3636 3636
3637 m_floatingObjects->addPlacedObject(floatingObject); 3637 m_floatingObjects->addPlacedObject(floatingObject);
3638 3638
3639 if (width) 3639 if (width)
3640 width->shrinkAvailableWidthForNewFloatIfNeeded(floatingObject); 3640 width->shrinkAvailableWidthForNewFloatIfNeeded(floatingObject);
3641 } 3641 }
3642 return true; 3642 return true;
3643 } 3643 }
3644 3644
3645 LayoutUnit LayoutBlockFlow::positionAndLayoutFloat( 3645 LayoutUnit LayoutBlockFlow::positionAndLayoutFloat(
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
4570 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); 4570 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState);
4571 } 4571 }
4572 4572
4573 void LayoutBlockFlow::invalidateDisplayItemClients( 4573 void LayoutBlockFlow::invalidateDisplayItemClients(
4574 PaintInvalidationReason invalidationReason) const { 4574 PaintInvalidationReason invalidationReason) const {
4575 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( 4575 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(
4576 invalidationReason); 4576 invalidationReason);
4577 } 4577 }
4578 4578
4579 } // namespace blink 4579 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/block/float/float-on-line-large-and-small-float-below.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698