| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const; | 449 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const; |
| 450 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule)
const; | 450 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule)
const; |
| 451 | 451 |
| 452 // Calculate the strut to insert in order fit content of size |contentLogica
lHeight|. | 452 // Calculate the strut to insert in order fit content of size |contentLogica
lHeight|. |
| 453 // |strutToNextPage| is the strut to add to |offset| to merely get to the to
p of the next page | 453 // |strutToNextPage| is the strut to add to |offset| to merely get to the to
p of the next page |
| 454 // or column. This is what will be returned if the content can actually fit
there. Otherwise, | 454 // or column. This is what will be returned if the content can actually fit
there. Otherwise, |
| 455 // return the distance to the next fragmentainer that can fit this piece of
content. | 455 // return the distance to the next fragmentainer that can fit this piece of
content. |
| 456 LayoutUnit calculatePaginationStrutToFitContent(LayoutUnit offset, LayoutUni
t strutToNextPage, LayoutUnit contentLogicalHeight) const; | 456 LayoutUnit calculatePaginationStrutToFitContent(LayoutUnit offset, LayoutUni
t strutToNextPage, LayoutUnit contentLogicalHeight) const; |
| 457 | 457 |
| 458 static void collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock* ch
ild); | 458 static void collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock* ch
ild); |
| 459 void collapseAnonymousBlockChildAfterMerge(LayoutObject* prev, LayoutObject*
next, bool canMergeAnonymousBlocks); |
| 460 |
| 459 protected: | 461 protected: |
| 460 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL
ogicalHeightForOffset(logicalOffset); } | 462 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL
ogicalHeightForOffset(logicalOffset); } |
| 461 | 463 |
| 462 // Returns the logical offset at the top of the next page, for a given offse
t. | 464 // Returns the logical offset at the top of the next page, for a given offse
t. |
| 463 // | 465 // |
| 464 // If the given offset is at a page boundary, using AssociateWithLatterPage
as PageBoundaryRule | 466 // If the given offset is at a page boundary, using AssociateWithLatterPage
as PageBoundaryRule |
| 465 // will move us one page ahead (since the offset is at the top of the "curre
nt" page). Using | 467 // will move us one page ahead (since the offset is at the top of the "curre
nt" page). Using |
| 466 // AssociateWithFormerPage instead will keep us where we are (since the offs
et is at the bottom | 468 // AssociateWithFormerPage instead will keep us where we are (since the offs
et is at the bottom |
| 467 // of the "current" page, which is exactly the same offset as the top offset
on the next page). | 469 // of the "current" page, which is exactly the same offset as the top offset
on the next page). |
| 468 // | 470 // |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 // FIXME: This is temporary as we move code that accesses block flow | 508 // FIXME: This is temporary as we move code that accesses block flow |
| 507 // member variables out of LayoutBlock and into LayoutBlockFlow. | 509 // member variables out of LayoutBlock and into LayoutBlockFlow. |
| 508 friend class LayoutBlockFlow; | 510 friend class LayoutBlockFlow; |
| 509 }; | 511 }; |
| 510 | 512 |
| 511 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); | 513 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); |
| 512 | 514 |
| 513 } // namespace blink | 515 } // namespace blink |
| 514 | 516 |
| 515 #endif // LayoutBlock_h | 517 #endif // LayoutBlock_h |
| OLD | NEW |