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

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

Issue 2512163002: Force re-layout of a float when we just became unfragmented. (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/fragmentation/become-unfragmented-with-float.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 3678 matching lines...) Expand 10 before | Expand all | Expand 10 after
3689 logicalTopMarginEdge = floatLogicalLocation.y(); 3689 logicalTopMarginEdge = floatLogicalLocation.y();
3690 3690
3691 setLogicalLeftForFloat(floatingObject, floatLogicalLocation.x()); 3691 setLogicalLeftForFloat(floatingObject, floatLogicalLocation.x());
3692 3692
3693 setLogicalLeftForChild(child, 3693 setLogicalLeftForChild(child,
3694 floatLogicalLocation.x() + childLogicalLeftMargin); 3694 floatLogicalLocation.x() + childLogicalLeftMargin);
3695 setLogicalTopForChild(child, 3695 setLogicalTopForChild(child,
3696 logicalTopMarginEdge + marginBeforeForChild(child)); 3696 logicalTopMarginEdge + marginBeforeForChild(child));
3697 3697
3698 SubtreeLayoutScope layoutScope(child); 3698 SubtreeLayoutScope layoutScope(child);
3699 if (isPaginated && !child.needsLayout()) 3699 if (!child.needsLayout())
3700 markChildForPaginationRelayoutIfNeeded(child, layoutScope); 3700 markChildForPaginationRelayoutIfNeeded(child, layoutScope);
3701 3701
3702 child.layoutIfNeeded(); 3702 child.layoutIfNeeded();
3703 3703
3704 if (isPaginated) { 3704 if (isPaginated) {
3705 LayoutUnit newLogicalTopMarginEdge = 3705 LayoutUnit newLogicalTopMarginEdge =
3706 adjustFloatLogicalTopForPagination(child, logicalTopMarginEdge); 3706 adjustFloatLogicalTopForPagination(child, logicalTopMarginEdge);
3707 if (logicalTopMarginEdge != newLogicalTopMarginEdge) { 3707 if (logicalTopMarginEdge != newLogicalTopMarginEdge) {
3708 floatLogicalLocation = computeLogicalLocationForFloat( 3708 floatLogicalLocation = computeLogicalLocationForFloat(
3709 floatingObject, newLogicalTopMarginEdge); 3709 floatingObject, newLogicalTopMarginEdge);
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
4551 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); 4551 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState);
4552 } 4552 }
4553 4553
4554 void LayoutBlockFlow::invalidateDisplayItemClients( 4554 void LayoutBlockFlow::invalidateDisplayItemClients(
4555 PaintInvalidationReason invalidationReason) const { 4555 PaintInvalidationReason invalidationReason) const {
4556 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( 4556 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(
4557 invalidationReason); 4557 invalidationReason);
4558 } 4558 }
4559 4559
4560 } // namespace blink 4560 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fragmentation/become-unfragmented-with-float.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698