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

Side by Side Diff: Source/core/layout/line/LineWidth.cpp

Issue 1263923002: Revert of Refactor the treatment of shape-outside objects in float overlapping checks (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/layout/api/LineLayoutBlockFlow.h ('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 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2013 Adobe Systems Incorporated. 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 LayoutUnit lastFloatLogicalBottom = m_block.logicalHeight(); 172 LayoutUnit lastFloatLogicalBottom = m_block.logicalHeight();
173 float newLineWidth = m_availableWidth; 173 float newLineWidth = m_availableWidth;
174 float newLineLeft = m_left; 174 float newLineLeft = m_left;
175 float newLineRight = m_right; 175 float newLineRight = m_right;
176 176
177 FloatingObject* lastFloatFromPreviousLine = m_block.lastFloatFromPreviousLin e(); 177 FloatingObject* lastFloatFromPreviousLine = m_block.lastFloatFromPreviousLin e();
178 if (lastFloatFromPreviousLine && lastFloatFromPreviousLine->layoutObject ()->shapeOutsideInfo()) 178 if (lastFloatFromPreviousLine && lastFloatFromPreviousLine->layoutObject ()->shapeOutsideInfo())
179 return wrapNextToShapeOutside(isFirstLine); 179 return wrapNextToShapeOutside(isFirstLine);
180 180
181 while (true) { 181 while (true) {
182 floatLogicalBottom = m_block.nextFloatLogicalBottomBelow(lastFloatLogica lBottom); 182 floatLogicalBottom = m_block.nextFloatLogicalBottomBelow(lastFloatLogica lBottom, ShapeOutsideFloatShapeOffset);
183 if (floatLogicalBottom <= lastFloatLogicalBottom) 183 if (floatLogicalBottom <= lastFloatLogicalBottom)
184 break; 184 break;
185 185
186 newLineWidth = availableWidthAtOffset(m_block, floatLogicalBottom, shoul dIndentText(), newLineLeft, newLineRight); 186 newLineWidth = availableWidthAtOffset(m_block, floatLogicalBottom, shoul dIndentText(), newLineLeft, newLineRight);
187 lastFloatLogicalBottom = floatLogicalBottom; 187 lastFloatLogicalBottom = floatLogicalBottom;
188 188
189 if (newLineWidth >= m_uncommittedWidth) 189 if (newLineWidth >= m_uncommittedWidth)
190 break; 190 break;
191 } 191 }
192 updateLineDimension(lastFloatLogicalBottom, newLineWidth, newLineLeft, newLi neRight); 192 updateLineDimension(lastFloatLogicalBottom, newLineWidth, newLineLeft, newLi neRight);
193 } 193 }
194 194
195 void LineWidth::computeAvailableWidthFromLeftAndRight() 195 void LineWidth::computeAvailableWidthFromLeftAndRight()
196 { 196 {
197 m_availableWidth = max(0.0f, m_right - m_left) + m_overhangWidth; 197 m_availableWidth = max(0.0f, m_right - m_left) + m_overhangWidth;
198 } 198 }
199 199
200 } 200 }
OLDNEW
« no previous file with comments | « Source/core/layout/api/LineLayoutBlockFlow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698