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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 | 443 |
444 Position positionForBox(InlineBox*, bool start = true) const; | 444 Position positionForBox(InlineBox*, bool start = true) const; |
445 PositionWithAffinity positionForPointWithInlineChildren(const LayoutPoint&); | 445 PositionWithAffinity positionForPointWithInlineChildren(const LayoutPoint&); |
446 | 446 |
447 // End helper functions and structs used by layoutBlockChildren. | 447 // End helper functions and structs used by layoutBlockChildren. |
448 | 448 |
449 void removeFromGlobalMaps(); | 449 void removeFromGlobalMaps(); |
450 bool widthAvailableToChildrenHasChanged(); | 450 bool widthAvailableToChildrenHasChanged(); |
451 | 451 |
452 public: | 452 public: |
453 // Specify which page or column to associate with an offset, if said offset
is exactly at a page | |
454 // or column boundary. | |
455 enum PageBoundaryRule { AssociateWithFormerPage, AssociateWithLatterPage }; | |
456 | |
457 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const; | |
458 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule)
const; | |
459 | |
460 // Calculate the strut to insert in order fit content of size |contentLogica
lHeight|. | |
461 // |strutToNextPage| is the strut to add to |offset| to merely get to the to
p of the next page | |
462 // or column. This is what will be returned if the content can actually fit
there. Otherwise, | |
463 // return the distance to the next fragmentainer that can fit this piece of
content. | |
464 LayoutUnit calculatePaginationStrutToFitContent(LayoutUnit offset, LayoutUni
t strutToNextPage, LayoutUnit contentLogicalHeight) const; | |
465 | |
466 static void collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock* ch
ild); | 453 static void collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock* ch
ild); |
467 protected: | 454 protected: |
468 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL
ogicalHeightForOffset(logicalOffset); } | 455 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL
ogicalHeightForOffset(logicalOffset); } |
469 | 456 |
470 // Returns the logical offset at the top of the next page, for a given offse
t. | 457 // Returns the logical offset at the top of the next page, for a given offse
t. |
471 // | 458 // |
472 // If the given offset is at a page boundary, using AssociateWithLatterPage
as PageBoundaryRule | 459 // If the given offset is at a page boundary, using AssociateWithLatterPage
as PageBoundaryRule |
473 // will move us one page ahead (since the offset is at the top of the "curre
nt" page). Using | 460 // will move us one page ahead (since the offset is at the top of the "curre
nt" page). Using |
474 // AssociateWithFormerPage instead will keep us where we are (since the offs
et is at the bottom | 461 // AssociateWithFormerPage instead will keep us where we are (since the offs
et is at the bottom |
475 // of the "current" page, which is exactly the same offset as the top offset
on the next page). | 462 // of the "current" page, which is exactly the same offset as the top offset
on the next page). |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 // FIXME: This is temporary as we move code that accesses block flow | 501 // FIXME: This is temporary as we move code that accesses block flow |
515 // member variables out of LayoutBlock and into LayoutBlockFlow. | 502 // member variables out of LayoutBlock and into LayoutBlockFlow. |
516 friend class LayoutBlockFlow; | 503 friend class LayoutBlockFlow; |
517 }; | 504 }; |
518 | 505 |
519 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); | 506 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); |
520 | 507 |
521 } // namespace blink | 508 } // namespace blink |
522 | 509 |
523 #endif // LayoutBlock_h | 510 #endif // LayoutBlock_h |
OLD | NEW |