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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 LayoutObjectChildList* children() { return &m_children; } | 125 LayoutObjectChildList* children() { return &m_children; } |
126 | 126 |
127 bool beingDestroyed() const { return m_beingDestroyed; } | 127 bool beingDestroyed() const { return m_beingDestroyed; } |
128 | 128 |
129 // These two functions are overridden for inline-block. | 129 // These two functions are overridden for inline-block. |
130 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode =
PositionOnContainingLine) const final; | 130 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode =
PositionOnContainingLine) const final; |
131 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo
sitionMode = PositionOnContainingLine) const override; | 131 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo
sitionMode = PositionOnContainingLine) const override; |
132 | 132 |
133 LayoutUnit minLineHeightForReplacedObject(bool isFirstLine, LayoutUnit repla
cedHeight) const; | 133 LayoutUnit minLineHeightForReplacedObject(bool isFirstLine, LayoutUnit repla
cedHeight) const; |
134 | 134 |
| 135 bool createsNewFormattingContext() const; |
| 136 |
135 const LineBoxList& lineBoxes() const { return m_lineBoxes; } | 137 const LineBoxList& lineBoxes() const { return m_lineBoxes; } |
136 LineBoxList* lineBoxes() { return &m_lineBoxes; } | 138 LineBoxList* lineBoxes() { return &m_lineBoxes; } |
137 | 139 |
138 const char* name() const override; | 140 const char* name() const override; |
139 | 141 |
140 protected: | 142 protected: |
141 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } | 143 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } |
142 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } | 144 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } |
143 | 145 |
144 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir
stLineBox()); } | 146 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir
stLineBox()); } |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 // | 443 // |
442 // If the given offset is at a page boundary, using AssociateWithLatterPage
as PageBoundaryRule | 444 // If the given offset is at a page boundary, using AssociateWithLatterPage
as PageBoundaryRule |
443 // will move us one page ahead (since the offset is at the top of the "curre
nt" page). Using | 445 // will move us one page ahead (since the offset is at the top of the "curre
nt" page). Using |
444 // AssociateWithFormerPage instead will keep us where we are (since the offs
et is at the bottom | 446 // AssociateWithFormerPage instead will keep us where we are (since the offs
et is at the bottom |
445 // of the "current" page, which is exactly the same offset as the top offset
on the next page). | 447 // of the "current" page, which is exactly the same offset as the top offset
on the next page). |
446 // | 448 // |
447 // For a page height of 800px, AssociateWithLatterPage will return 1600 if t
he value passed in | 449 // For a page height of 800px, AssociateWithLatterPage will return 1600 if t
he value passed in |
448 // is 800. AssociateWithFormerPage will simply return 800. | 450 // is 800. AssociateWithFormerPage will simply return 800. |
449 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule) co
nst; | 451 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule) co
nst; |
450 | 452 |
451 bool createsNewFormattingContext() const; | |
452 | |
453 // Paginated content inside this block was laid out. | 453 // Paginated content inside this block was laid out. |
454 // |logicalTopOffsetAfterPagination| is the logical top offset of the child
content after | 454 // |logicalTopOffsetAfterPagination| is the logical top offset of the child
content after |
455 // applying any forced or unforced break, if needed. | 455 // applying any forced or unforced break, if needed. |
456 void paginatedContentWasLaidOut(LayoutUnit logicalTopOffsetAfterPagination); | 456 void paginatedContentWasLaidOut(LayoutUnit logicalTopOffsetAfterPagination); |
457 | 457 |
458 // Update minimum page height required to avoid fragmentation where it shoul
dn't occur (inside | 458 // Update minimum page height required to avoid fragmentation where it shoul
dn't occur (inside |
459 // unbreakable content, between orphans and widows, etc.). This will be used
as a hint to the | 459 // unbreakable content, between orphans and widows, etc.). This will be used
as a hint to the |
460 // column balancer to help set a good minimum column height. | 460 // column balancer to help set a good minimum column height. |
461 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight); | 461 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight); |
462 | 462 |
(...skipping 25 matching lines...) Expand all Loading... |
488 // FIXME: This is temporary as we move code that accesses block flow | 488 // FIXME: This is temporary as we move code that accesses block flow |
489 // member variables out of LayoutBlock and into LayoutBlockFlow. | 489 // member variables out of LayoutBlock and into LayoutBlockFlow. |
490 friend class LayoutBlockFlow; | 490 friend class LayoutBlockFlow; |
491 }; | 491 }; |
492 | 492 |
493 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); | 493 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); |
494 | 494 |
495 } // namespace blink | 495 } // namespace blink |
496 | 496 |
497 #endif // LayoutBlock_h | 497 #endif // LayoutBlock_h |
OLD | NEW |