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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 bool widthAvailableToChildrenHasChanged(); | 429 bool widthAvailableToChildrenHasChanged(); |
430 | 430 |
431 public: | 431 public: |
432 // Specify which page or column to associate with an offset, if said offset
is exactly at a page | 432 // Specify which page or column to associate with an offset, if said offset
is exactly at a page |
433 // or column boundary. | 433 // or column boundary. |
434 enum PageBoundaryRule { AssociateWithFormerPage, AssociateWithLatterPage }; | 434 enum PageBoundaryRule { AssociateWithFormerPage, AssociateWithLatterPage }; |
435 | 435 |
436 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const; | 436 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const; |
437 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule)
const; | 437 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule)
const; |
438 | 438 |
| 439 // Calculate the strut to insert in order fit content of size |contentLogica
lHeight|. |
| 440 // |strutToNextPage| is the strut to add to |offset| to merely get to the to
p of the next page |
| 441 // or column. This is what will be returned if the content can actually fit
there. Otherwise, |
| 442 // return the distance to the next fragmentainer that can fit this piece of
content. |
| 443 LayoutUnit calculatePaginationStrutToFitContent(LayoutUnit offset, LayoutUni
t strutToNextPage, LayoutUnit contentLogicalHeight) const; |
| 444 |
439 protected: | 445 protected: |
440 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL
ogicalHeightForOffset(logicalOffset); } | 446 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL
ogicalHeightForOffset(logicalOffset); } |
441 | 447 |
442 // Returns the logical offset at the top of the next page, for a given offse
t. | 448 // Returns the logical offset at the top of the next page, for a given offse
t. |
443 // | 449 // |
444 // If the given offset is at a page boundary, using AssociateWithLatterPage
as PageBoundaryRule | 450 // If the given offset is at a page boundary, using AssociateWithLatterPage
as PageBoundaryRule |
445 // will move us one page ahead (since the offset is at the top of the "curre
nt" page). Using | 451 // will move us one page ahead (since the offset is at the top of the "curre
nt" page). Using |
446 // AssociateWithFormerPage instead will keep us where we are (since the offs
et is at the bottom | 452 // AssociateWithFormerPage instead will keep us where we are (since the offs
et is at the bottom |
447 // of the "current" page, which is exactly the same offset as the top offset
on the next page). | 453 // of the "current" page, which is exactly the same offset as the top offset
on the next page). |
448 // | 454 // |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 // FIXME: This is temporary as we move code that accesses block flow | 489 // FIXME: This is temporary as we move code that accesses block flow |
484 // member variables out of LayoutBlock and into LayoutBlockFlow. | 490 // member variables out of LayoutBlock and into LayoutBlockFlow. |
485 friend class LayoutBlockFlow; | 491 friend class LayoutBlockFlow; |
486 }; | 492 }; |
487 | 493 |
488 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); | 494 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); |
489 | 495 |
490 } // namespace blink | 496 } // namespace blink |
491 | 497 |
492 #endif // LayoutBlock_h | 498 #endif // LayoutBlock_h |
OLD | NEW |