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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
579 // Used to resolve margins in the containing block's block-flow direction. | 579 // Used to resolve margins in the containing block's block-flow direction. |
580 void computeAndSetBlockDirectionMargins(const LayoutBlock* containingBlock); | 580 void computeAndSetBlockDirectionMargins(const LayoutBlock* containingBlock); |
581 | 581 |
582 LayoutUnit offsetFromLogicalTopOfFirstPage() const; | 582 LayoutUnit offsetFromLogicalTopOfFirstPage() const; |
583 | 583 |
584 // The page logical offset is the object's offset from the top of the page i n the page progression | 584 // The page logical offset is the object's offset from the top of the page i n the page progression |
585 // direction (so an x-offset in vertical text and a y-offset for horizontal text). | 585 // direction (so an x-offset in vertical text and a y-offset for horizontal text). |
586 LayoutUnit pageLogicalOffset() const { return m_rareData ? m_rareData->m_pag eLogicalOffset : LayoutUnit(); } | 586 LayoutUnit pageLogicalOffset() const { return m_rareData ? m_rareData->m_pag eLogicalOffset : LayoutUnit(); } |
587 void setPageLogicalOffset(LayoutUnit); | 587 void setPageLogicalOffset(LayoutUnit); |
588 | 588 |
589 // Specify which page or column to associate with an offset, if said offset is exactly at a page | |
mstensho (USE GERRIT)
2016/03/17 14:04:03
YES! This belongs in LayoutBox, and finally we hav
| |
590 // or column boundary. | |
591 enum PageBoundaryRule { AssociateWithFormerPage, AssociateWithLatterPage }; | |
592 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const; | |
593 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule) const; | |
594 | |
595 // Calculate the strut to insert in order fit content of size |contentLogica lHeight|. | |
596 // |strutToNextPage| is the strut to add to |offset| to merely get to the to p of the next page | |
597 // or column. This is what will be returned if the content can actually fit there. Otherwise, | |
598 // return the distance to the next fragmentainer that can fit this piece of content. | |
599 LayoutUnit calculatePaginationStrutToFitContent(LayoutUnit offset, LayoutUni t strutToNextPage, LayoutUnit contentLogicalHeight) const; | |
600 | |
589 void positionLineBox(InlineBox*); | 601 void positionLineBox(InlineBox*); |
590 void moveWithEdgeOfInlineContainerIfNecessary(bool isHorizontal); | 602 void moveWithEdgeOfInlineContainerIfNecessary(bool isHorizontal); |
591 | 603 |
592 virtual InlineBox* createInlineBox(); | 604 virtual InlineBox* createInlineBox(); |
593 void dirtyLineBoxes(bool fullLayout); | 605 void dirtyLineBoxes(bool fullLayout); |
594 | 606 |
595 // For atomic inline elements, this function returns the inline box that con tains us. Enables | 607 // For atomic inline elements, this function returns the inline box that con tains us. Enables |
596 // the atomic inline LayoutObject to quickly determine what line it is conta ined on and to easily | 608 // the atomic inline LayoutObject to quickly determine what line it is conta ined on and to easily |
597 // iterate over structures on the line. | 609 // iterate over structures on the line. |
598 InlineBox* inlineBoxWrapper() const { return m_inlineBoxWrapper; } | 610 InlineBox* inlineBoxWrapper() const { return m_inlineBoxWrapper; } |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1132 if (UNLIKELY(m_inlineBoxWrapper != nullptr)) | 1144 if (UNLIKELY(m_inlineBoxWrapper != nullptr)) |
1133 deleteLineBoxWrapper(); | 1145 deleteLineBoxWrapper(); |
1134 } | 1146 } |
1135 | 1147 |
1136 m_inlineBoxWrapper = boxWrapper; | 1148 m_inlineBoxWrapper = boxWrapper; |
1137 } | 1149 } |
1138 | 1150 |
1139 } // namespace blink | 1151 } // namespace blink |
1140 | 1152 |
1141 #endif // LayoutBox_h | 1153 #endif // LayoutBox_h |
OLD | NEW |