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 // then nextPageLogicalTop with ExcludePageBoundary will still move to the t
op of the next page. nextPageLogicalTop with | 449 // then nextPageLogicalTop with ExcludePageBoundary will still move to the t
op of the next page. nextPageLogicalTop with |
450 // IncludePageBoundary set will not. | 450 // IncludePageBoundary set will not. |
451 // | 451 // |
452 // For a page height of 800px, the first rule will return 800 if the value p
assed in is 0. The second rule will simply return 0. | 452 // For a page height of 800px, the first rule will return 800 if the value p
assed in is 0. The second rule will simply return 0. |
453 enum PageBoundaryRule { ExcludePageBoundary, IncludePageBoundary }; | 453 enum PageBoundaryRule { ExcludePageBoundary, IncludePageBoundary }; |
454 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule = E
xcludePageBoundary) const; | 454 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule = E
xcludePageBoundary) const; |
455 | 455 |
456 bool createsBlockFormattingContext() const; | 456 bool createsBlockFormattingContext() const; |
457 | 457 |
458 public: | 458 public: |
| 459 LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const; |
459 LayoutUnit pageLogicalHeightForOffset(LayoutUnit offset) const; | 460 LayoutUnit pageLogicalHeightForOffset(LayoutUnit offset) const; |
460 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit offset, PageBounda
ryRule = IncludePageBoundary) const; | 461 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit offset, PageBounda
ryRule = IncludePageBoundary) const; |
461 | 462 |
462 protected: | 463 protected: |
463 // A page break is required at some offset due to space shortage in the curr
ent fragmentainer. | 464 // A page break is required at some offset due to space shortage in the curr
ent fragmentainer. |
464 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage); | 465 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage); |
465 | 466 |
466 // Update minimum page height required to avoid fragmentation where it shoul
dn't occur (inside | 467 // Update minimum page height required to avoid fragmentation where it shoul
dn't occur (inside |
467 // unbreakable content, between orphans and widows, etc.). This will be used
as a hint to the | 468 // unbreakable content, between orphans and widows, etc.). This will be used
as a hint to the |
468 // column balancer to help set a good minimum column height. | 469 // column balancer to help set a good minimum column height. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 // FIXME: This is temporary as we move code that accesses block flow | 506 // FIXME: This is temporary as we move code that accesses block flow |
506 // member variables out of RenderBlock and into RenderBlockFlow. | 507 // member variables out of RenderBlock and into RenderBlockFlow. |
507 friend class RenderBlockFlow; | 508 friend class RenderBlockFlow; |
508 }; | 509 }; |
509 | 510 |
510 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 511 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
511 | 512 |
512 } // namespace blink | 513 } // namespace blink |
513 | 514 |
514 #endif // RenderBlock_h | 515 #endif // RenderBlock_h |
OLD | NEW |