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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 | 379 |
380 void LayoutMultiColumnFlowThread::layoutColumns(SubtreeLayoutScope& layoutScope) | 380 void LayoutMultiColumnFlowThread::layoutColumns(SubtreeLayoutScope& layoutScope) |
381 { | 381 { |
382 // Since we ended up here, it means that the multicol container (our parent)
needed | 382 // Since we ended up here, it means that the multicol container (our parent)
needed |
383 // layout. Since contents of the multicol container are diverted to the flow
thread, the flow | 383 // layout. Since contents of the multicol container are diverted to the flow
thread, the flow |
384 // thread needs layout as well. | 384 // thread needs layout as well. |
385 layoutScope.setChildNeedsLayout(this); | 385 layoutScope.setChildNeedsLayout(this); |
386 | 386 |
387 if (FragmentationContext* enclosingFragmentationContext = this->enclosingFra
gmentationContext()) { | 387 if (FragmentationContext* enclosingFragmentationContext = this->enclosingFra
gmentationContext()) { |
388 m_blockOffsetInEnclosingFragmentationContext = multiColumnBlockFlow()->o
ffsetFromLogicalTopOfFirstPage(); | 388 m_blockOffsetInEnclosingFragmentationContext = multiColumnBlockFlow()->o
ffsetFromLogicalTopOfFirstPage(); |
| 389 m_blockOffsetInEnclosingFragmentationContext += multiColumnBlockFlow()->
borderAndPaddingBefore(); |
389 | 390 |
390 if (LayoutMultiColumnFlowThread* enclosingFlowThread = enclosingFragment
ationContext->associatedFlowThread()) { | 391 if (LayoutMultiColumnFlowThread* enclosingFlowThread = enclosingFragment
ationContext->associatedFlowThread()) { |
391 if (LayoutMultiColumnSet* firstSet = firstMultiColumnSet()) { | 392 if (LayoutMultiColumnSet* firstSet = firstMultiColumnSet()) { |
392 // Before we can start to lay out the contents of this multicol
container, we need | 393 // Before we can start to lay out the contents of this multicol
container, we need |
393 // to make sure that all ancestor multicol containers have estab
lished a row to hold | 394 // to make sure that all ancestor multicol containers have estab
lished a row to hold |
394 // the first column contents of this container (this multicol co
ntainer may start at | 395 // the first column contents of this container (this multicol co
ntainer may start at |
395 // the beginning of a new outer row). Without sufficient rows in
all ancestor | 396 // the beginning of a new outer row). Without sufficient rows in
all ancestor |
396 // multicol containers, we may use the wrong column height. | 397 // multicol containers, we may use the wrong column height. |
397 LayoutUnit offset = m_blockOffsetInEnclosingFragmentationContext
+ firstSet->logicalTopFromMulticolContentEdge(); | 398 LayoutUnit offset = m_blockOffsetInEnclosingFragmentationContext
+ firstSet->logicalTopFromMulticolContentEdge(); |
398 enclosingFlowThread->appendNewFragmentainerGroupIfNeeded(offset,
AssociateWithLatterPage); | 399 enclosingFlowThread->appendNewFragmentainerGroupIfNeeded(offset,
AssociateWithLatterPage); |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 } | 992 } |
992 if (canContainSpannerInParentFragmentationContext(*object)) | 993 if (canContainSpannerInParentFragmentationContext(*object)) |
993 next = object->nextInPreOrder(&root); | 994 next = object->nextInPreOrder(&root); |
994 else | 995 else |
995 next = object->nextInPreOrderAfterChildren(&root); | 996 next = object->nextInPreOrderAfterChildren(&root); |
996 } | 997 } |
997 return true; | 998 return true; |
998 } | 999 } |
999 | 1000 |
1000 } // namespace blink | 1001 } // namespace blink |
OLD | NEW |