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 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 // Used to resolve margins in the containing block's block-flow direction. | 580 // Used to resolve margins in the containing block's block-flow direction. |
581 void computeAndSetBlockDirectionMargins(const LayoutBlock* containingBlock); | 581 void computeAndSetBlockDirectionMargins(const LayoutBlock* containingBlock); |
582 | 582 |
583 LayoutUnit offsetFromLogicalTopOfFirstPage() const; | 583 LayoutUnit offsetFromLogicalTopOfFirstPage() const; |
584 | 584 |
585 // The page logical offset is the object's offset from the top of the page i
n the page progression | 585 // The page logical offset is the object's offset from the top of the page i
n the page progression |
586 // direction (so an x-offset in vertical text and a y-offset for horizontal
text). | 586 // direction (so an x-offset in vertical text and a y-offset for horizontal
text). |
587 LayoutUnit pageLogicalOffset() const { return m_rareData ? m_rareData->m_pag
eLogicalOffset : LayoutUnit(); } | 587 LayoutUnit pageLogicalOffset() const { return m_rareData ? m_rareData->m_pag
eLogicalOffset : LayoutUnit(); } |
588 void setPageLogicalOffset(LayoutUnit); | 588 void setPageLogicalOffset(LayoutUnit); |
589 | 589 |
| 590 // Specify which page or column to associate with an offset, if said offset
is exactly at a page |
| 591 // or column boundary. |
| 592 enum PageBoundaryRule { AssociateWithFormerPage, AssociateWithLatterPage }; |
| 593 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const; |
| 594 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule)
const; |
| 595 |
| 596 // Calculate the strut to insert in order fit content of size |contentLogica
lHeight|. |
| 597 // |strutToNextPage| is the strut to add to |offset| to merely get to the to
p of the next page |
| 598 // or column. This is what will be returned if the content can actually fit
there. Otherwise, |
| 599 // return the distance to the next fragmentainer that can fit this piece of
content. |
| 600 virtual LayoutUnit calculatePaginationStrutToFitContent(LayoutUnit offset, L
ayoutUnit strutToNextPage, LayoutUnit contentLogicalHeight) const; |
| 601 |
590 void positionLineBox(InlineBox*); | 602 void positionLineBox(InlineBox*); |
591 void moveWithEdgeOfInlineContainerIfNecessary(bool isHorizontal); | 603 void moveWithEdgeOfInlineContainerIfNecessary(bool isHorizontal); |
592 | 604 |
593 virtual InlineBox* createInlineBox(); | 605 virtual InlineBox* createInlineBox(); |
594 void dirtyLineBoxes(bool fullLayout); | 606 void dirtyLineBoxes(bool fullLayout); |
595 | 607 |
596 // For atomic inline elements, this function returns the inline box that con
tains us. Enables | 608 // For atomic inline elements, this function returns the inline box that con
tains us. Enables |
597 // the atomic inline LayoutObject to quickly determine what line it is conta
ined on and to easily | 609 // the atomic inline LayoutObject to quickly determine what line it is conta
ined on and to easily |
598 // iterate over structures on the line. | 610 // iterate over structures on the line. |
599 InlineBox* inlineBoxWrapper() const { return m_inlineBoxWrapper; } | 611 InlineBox* inlineBoxWrapper() const { return m_inlineBoxWrapper; } |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 || breakValue == BreakLeft | 1152 || breakValue == BreakLeft |
1141 || breakValue == BreakPage | 1153 || breakValue == BreakPage |
1142 || breakValue == BreakRecto | 1154 || breakValue == BreakRecto |
1143 || breakValue == BreakRight | 1155 || breakValue == BreakRight |
1144 || breakValue == BreakVerso; | 1156 || breakValue == BreakVerso; |
1145 } | 1157 } |
1146 | 1158 |
1147 } // namespace blink | 1159 } // namespace blink |
1148 | 1160 |
1149 #endif // LayoutBox_h | 1161 #endif // LayoutBox_h |
OLD | NEW |