| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 return remainingLogicalHeight; | 92 return remainingLogicalHeight; |
| 93 } | 93 } |
| 94 | 94 |
| 95 bool LayoutMultiColumnSet::isPageLogicalHeightKnown() const | 95 bool LayoutMultiColumnSet::isPageLogicalHeightKnown() const |
| 96 { | 96 { |
| 97 return firstFragmentainerGroup().logicalHeight(); | 97 return firstFragmentainerGroup().logicalHeight(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 LayoutUnit LayoutMultiColumnSet::nextLogicalTopForUnbreakableContent(LayoutUnit
flowThreadOffset, LayoutUnit contentLogicalHeight) const | 100 LayoutUnit LayoutMultiColumnSet::nextLogicalTopForUnbreakableContent(LayoutUnit
flowThreadOffset, LayoutUnit contentLogicalHeight) const |
| 101 { | 101 { |
| 102 ASSERT(pageLogicalTopForOffset(flowThreadOffset) == flowThreadOffset); | 102 ASSERT(flowThreadOffset.mightBeSaturated() || pageLogicalTopForOffset(flowTh
readOffset) == flowThreadOffset); |
| 103 FragmentationContext* enclosingFragmentationContext = multiColumnFlowThread(
)->enclosingFragmentationContext(); | 103 FragmentationContext* enclosingFragmentationContext = multiColumnFlowThread(
)->enclosingFragmentationContext(); |
| 104 if (!enclosingFragmentationContext) { | 104 if (!enclosingFragmentationContext) { |
| 105 // If there's no enclosing fragmentation context, there'll ever be only
one row, and all | 105 // If there's no enclosing fragmentation context, there'll ever be only
one row, and all |
| 106 // columns there will have the same height. | 106 // columns there will have the same height. |
| 107 return flowThreadOffset; | 107 return flowThreadOffset; |
| 108 } | 108 } |
| 109 | 109 |
| 110 // Assert the problematic situation. If we have no problem with the column h
eight, why are we | 110 // Assert the problematic situation. If we have no problem with the column h
eight, why are we |
| 111 // even here? | 111 // even here? |
| 112 ASSERT(pageLogicalHeightForOffset(flowThreadOffset) < contentLogicalHeight); | 112 ASSERT(pageLogicalHeightForOffset(flowThreadOffset) < contentLogicalHeight); |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 | 397 |
| 398 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const | 398 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const |
| 399 { | 399 { |
| 400 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi
dth(), logicalHeightInFlowThread()); | 400 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi
dth(), logicalHeightInFlowThread()); |
| 401 if (!isHorizontalWritingMode()) | 401 if (!isHorizontalWritingMode()) |
| 402 return portionRect.transposedRect(); | 402 return portionRect.transposedRect(); |
| 403 return portionRect; | 403 return portionRect; |
| 404 } | 404 } |
| 405 | 405 |
| 406 } | 406 } |
| OLD | NEW |