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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 private: | 380 private: |
381 LayoutObjectChildList* virtualChildren() final { return children(); } | 381 LayoutObjectChildList* virtualChildren() final { return children(); } |
382 const LayoutObjectChildList* virtualChildren() const final { return children
(); } | 382 const LayoutObjectChildList* virtualChildren() const final { return children
(); } |
383 | 383 |
384 bool isLayoutBlock() const final { return true; } | 384 bool isLayoutBlock() const final { return true; } |
385 | 385 |
386 void makeChildrenNonInline(LayoutObject* insertionPoint = nullptr); | 386 void makeChildrenNonInline(LayoutObject* insertionPoint = nullptr); |
387 | 387 |
388 virtual void removeLeftoverAnonymousBlock(LayoutBlock* child); | 388 virtual void removeLeftoverAnonymousBlock(LayoutBlock* child); |
389 | 389 |
390 static void collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock* ch
ild); | |
391 void makeChildrenInlineIfPossible(); | 390 void makeChildrenInlineIfPossible(); |
392 | 391 |
393 void dirtyLinesFromChangedChild(LayoutObject* child) final { m_lineBoxes.dir
tyLinesFromChangedChild(LineLayoutItem(this), LineLayoutItem(child)); } | 392 void dirtyLinesFromChangedChild(LayoutObject* child) final { m_lineBoxes.dir
tyLinesFromChangedChild(LineLayoutItem(this), LineLayoutItem(child)); } |
394 | 393 |
395 void addChildIgnoringContinuation(LayoutObject* newChild, LayoutObject* befo
reChild) override; | 394 void addChildIgnoringContinuation(LayoutObject* newChild, LayoutObject* befo
reChild) override; |
396 | 395 |
397 bool isSelfCollapsingBlock() const override; | 396 bool isSelfCollapsingBlock() const override; |
398 | 397 |
399 TrackedLayoutBoxListHashSet* positionedObjectsInternal() const; | 398 TrackedLayoutBoxListHashSet* positionedObjectsInternal() const; |
400 TrackedLayoutBoxListHashSet* percentHeightDescendantsInternal() const; | 399 TrackedLayoutBoxListHashSet* percentHeightDescendantsInternal() const; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 | 447 |
449 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const; | 448 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const; |
450 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule)
const; | 449 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule)
const; |
451 | 450 |
452 // Calculate the strut to insert in order fit content of size |contentLogica
lHeight|. | 451 // Calculate the strut to insert in order fit content of size |contentLogica
lHeight|. |
453 // |strutToNextPage| is the strut to add to |offset| to merely get to the to
p of the next page | 452 // |strutToNextPage| is the strut to add to |offset| to merely get to the to
p of the next page |
454 // or column. This is what will be returned if the content can actually fit
there. Otherwise, | 453 // or column. This is what will be returned if the content can actually fit
there. Otherwise, |
455 // return the distance to the next fragmentainer that can fit this piece of
content. | 454 // return the distance to the next fragmentainer that can fit this piece of
content. |
456 LayoutUnit calculatePaginationStrutToFitContent(LayoutUnit offset, LayoutUni
t strutToNextPage, LayoutUnit contentLogicalHeight) const; | 455 LayoutUnit calculatePaginationStrutToFitContent(LayoutUnit offset, LayoutUni
t strutToNextPage, LayoutUnit contentLogicalHeight) const; |
457 | 456 |
| 457 static void collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock* ch
ild); |
458 protected: | 458 protected: |
459 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL
ogicalHeightForOffset(logicalOffset); } | 459 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL
ogicalHeightForOffset(logicalOffset); } |
460 | 460 |
461 // Returns the logical offset at the top of the next page, for a given offse
t. | 461 // Returns the logical offset at the top of the next page, for a given offse
t. |
462 // | 462 // |
463 // If the given offset is at a page boundary, using AssociateWithLatterPage
as PageBoundaryRule | 463 // If the given offset is at a page boundary, using AssociateWithLatterPage
as PageBoundaryRule |
464 // will move us one page ahead (since the offset is at the top of the "curre
nt" page). Using | 464 // will move us one page ahead (since the offset is at the top of the "curre
nt" page). Using |
465 // AssociateWithFormerPage instead will keep us where we are (since the offs
et is at the bottom | 465 // AssociateWithFormerPage instead will keep us where we are (since the offs
et is at the bottom |
466 // of the "current" page, which is exactly the same offset as the top offset
on the next page). | 466 // of the "current" page, which is exactly the same offset as the top offset
on the next page). |
467 // | 467 // |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 // FIXME: This is temporary as we move code that accesses block flow | 505 // FIXME: This is temporary as we move code that accesses block flow |
506 // member variables out of LayoutBlock and into LayoutBlockFlow. | 506 // member variables out of LayoutBlock and into LayoutBlockFlow. |
507 friend class LayoutBlockFlow; | 507 friend class LayoutBlockFlow; |
508 }; | 508 }; |
509 | 509 |
510 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); | 510 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); |
511 | 511 |
512 } // namespace blink | 512 } // namespace blink |
513 | 513 |
514 #endif // LayoutBlock_h | 514 #endif // LayoutBlock_h |
OLD | NEW |