Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 // Calculate the non-auto content box height, or set it to 0 if it's aut o. We need to know | 227 // Calculate the non-auto content box height, or set it to 0 if it's aut o. We need to know |
| 228 // this before layout, so that we can figure out where to insert column breaks. We also | 228 // this before layout, so that we can figure out where to insert column breaks. We also |
| 229 // treat LayoutView (which may be paginated, which uses the multicol imp lmentation) as | 229 // treat LayoutView (which may be paginated, which uses the multicol imp lmentation) as |
| 230 // having non-auto height, since its height is deduced from the viewport height. We use | 230 // having non-auto height, since its height is deduced from the viewport height. We use |
| 231 // computeLogicalHeight() to calculate the content box height. That meth od will clamp | 231 // computeLogicalHeight() to calculate the content box height. That meth od will clamp |
| 232 // against max-height and min-height. Since we're now at the beginning o f layout, and we | 232 // against max-height and min-height. Since we're now at the beginning o f layout, and we |
| 233 // don't know the actual height of the content yet, only call that metho d when height is | 233 // don't know the actual height of the content yet, only call that metho d when height is |
| 234 // definite, or we might fool ourselves into believing that columns have a definite height | 234 // definite, or we might fool ourselves into believing that columns have a definite height |
| 235 // when they in fact don't. | 235 // when they in fact don't. |
| 236 LayoutUnit columnHeight; | 236 LayoutUnit columnHeight; |
| 237 if (hasDefiniteLogicalHeight() || isLayoutView()) { | 237 if (!firstInFlowChildBox() || firstInFlowChildBox()->percentageLogicalHe ightIsResolvable() || isLayoutView()) { |
|
cbiesinger
2016/06/07 20:21:12
Can you add a comment here explaining the firstInF
Manuel Rego
2016/06/08 12:10:24
Yeah, I'll add a comment.
| |
| 238 LogicalExtentComputedValues computedValues; | 238 LogicalExtentComputedValues computedValues; |
| 239 computeLogicalHeight(LayoutUnit(), logicalTop(), computedValues); | 239 computeLogicalHeight(LayoutUnit(), logicalTop(), computedValues); |
| 240 columnHeight = computedValues.m_extent - borderAndPaddingLogicalHeig ht() - scrollbarLogicalHeight(); | 240 columnHeight = computedValues.m_extent - borderAndPaddingLogicalHeig ht() - scrollbarLogicalHeight(); |
| 241 } | 241 } |
| 242 pageLogicalHeightChanged = columnHeight != flowThread->columnHeightAvail able(); | 242 pageLogicalHeightChanged = columnHeight != flowThread->columnHeightAvail able(); |
| 243 flowThread->setColumnHeightAvailable(std::max(columnHeight, LayoutUnit() )); | 243 flowThread->setColumnHeightAvailable(std::max(columnHeight, LayoutUnit() )); |
| 244 } else if (isLayoutFlowThread()) { | 244 } else if (isLayoutFlowThread()) { |
| 245 LayoutFlowThread* flowThread = toLayoutFlowThread(this); | 245 LayoutFlowThread* flowThread = toLayoutFlowThread(this); |
| 246 | 246 |
| 247 // FIXME: This is a hack to always make sure we have a page logical heig ht, if said height | 247 // FIXME: This is a hack to always make sure we have a page logical heig ht, if said height |
| (...skipping 3579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3827 if (!rect.isEmpty()) | 3827 if (!rect.isEmpty()) |
| 3828 rects.append(rect); | 3828 rects.append(rect); |
| 3829 } | 3829 } |
| 3830 } | 3830 } |
| 3831 | 3831 |
| 3832 if (inlineElementContinuation) | 3832 if (inlineElementContinuation) |
| 3833 inlineElementContinuation->addOutlineRects(rects, additionalOffset + (in lineElementContinuation->containingBlock()->location() - location()), includeBlo ckOverflows); | 3833 inlineElementContinuation->addOutlineRects(rects, additionalOffset + (in lineElementContinuation->containingBlock()->location() - location()), includeBlo ckOverflows); |
| 3834 } | 3834 } |
| 3835 | 3835 |
| 3836 } // namespace blink | 3836 } // namespace blink |
| OLD | NEW |