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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 LayoutUnit m_overrideLogicalContentHeight; | 70 LayoutUnit m_overrideLogicalContentHeight; |
71 LayoutUnit m_overrideLogicalContentWidth; | 71 LayoutUnit m_overrideLogicalContentWidth; |
72 | 72 |
73 // Set by LayoutBox::savePreviousBoxSizesIfNeeded(). | 73 // Set by LayoutBox::savePreviousBoxSizesIfNeeded(). |
74 LayoutSize m_previousBorderBoxSize; | 74 LayoutSize m_previousBorderBoxSize; |
75 LayoutRect m_previousContentBoxRect; | 75 LayoutRect m_previousContentBoxRect; |
76 LayoutRect m_previousLayoutOverflowRect; | 76 LayoutRect m_previousLayoutOverflowRect; |
77 | 77 |
78 LayoutUnit m_pageLogicalOffset; | 78 LayoutUnit m_pageLogicalOffset; |
| 79 |
| 80 LayoutUnit m_paginationStrut; |
79 }; | 81 }; |
80 | 82 |
81 class CORE_EXPORT LayoutBox : public LayoutBoxModelObject { | 83 class CORE_EXPORT LayoutBox : public LayoutBoxModelObject { |
82 public: | 84 public: |
83 explicit LayoutBox(ContainerNode*); | 85 explicit LayoutBox(ContainerNode*); |
84 | 86 |
85 PaintLayerType layerTypeRequired() const override; | 87 PaintLayerType layerTypeRequired() const override; |
86 | 88 |
87 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const ov
erride; | 89 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const ov
erride; |
88 | 90 |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 // the replaced LayoutObject to quickly determine what line it is contained
on and to easily | 478 // the replaced LayoutObject to quickly determine what line it is contained
on and to easily |
477 // iterate over structures on the line. | 479 // iterate over structures on the line. |
478 InlineBox* inlineBoxWrapper() const { return m_rareData ? m_rareData->m_inli
neBoxWrapper : 0; } | 480 InlineBox* inlineBoxWrapper() const { return m_rareData ? m_rareData->m_inli
neBoxWrapper : 0; } |
479 void setInlineBoxWrapper(InlineBox*); | 481 void setInlineBoxWrapper(InlineBox*); |
480 void deleteLineBoxWrapper(); | 482 void deleteLineBoxWrapper(); |
481 | 483 |
482 void setSpannerPlaceholder(LayoutMultiColumnSpannerPlaceholder&); | 484 void setSpannerPlaceholder(LayoutMultiColumnSpannerPlaceholder&); |
483 void clearSpannerPlaceholder(); | 485 void clearSpannerPlaceholder(); |
484 LayoutMultiColumnSpannerPlaceholder* spannerPlaceholder() const final { retu
rn m_rareData ? m_rareData->m_spannerPlaceholder : 0; } | 486 LayoutMultiColumnSpannerPlaceholder* spannerPlaceholder() const final { retu
rn m_rareData ? m_rareData->m_spannerPlaceholder : 0; } |
485 | 487 |
| 488 // A pagination strut is the amount of space needed to push an in-flow block
-level object (or |
| 489 // float) to the logical top of the next page or column. It will be set both
for forced breaks |
| 490 // (e.g. page-break-before:always) and soft breaks (when there's not enough
space in the current |
| 491 // page / column for the object). The strut is baked into the logicalTop() o
f the object, so |
| 492 // that logicalTop() - paginationStrut() == the original position in the pre
vious column before |
| 493 // deciding to break. |
| 494 // |
| 495 // Pagination struts are either set in front of a block-level box (here) or
before a line |
| 496 // (RootInlineBox::paginationStrut()). |
| 497 LayoutUnit paginationStrut() const { return m_rareData ? m_rareData->m_pagin
ationStrut : LayoutUnit(); } |
| 498 void setPaginationStrut(LayoutUnit); |
| 499 void resetPaginationStrut() |
| 500 { |
| 501 if (m_rareData) |
| 502 m_rareData->m_paginationStrut = LayoutUnit(); |
| 503 } |
| 504 |
486 LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObjec
t* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const ov
erride; | 505 LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObjec
t* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const ov
erride; |
487 void mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* paintInva
lidationContainer, LayoutRect&, const PaintInvalidationState*) const override; | 506 void mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* paintInva
lidationContainer, LayoutRect&, const PaintInvalidationState*) const override; |
488 virtual void invalidatePaintForOverhangingFloats(bool paintAllDescendants); | 507 virtual void invalidatePaintForOverhangingFloats(bool paintAllDescendants); |
489 | 508 |
490 LayoutUnit containingBlockLogicalHeightForGetComputedStyle() const; | 509 LayoutUnit containingBlockLogicalHeightForGetComputedStyle() const; |
491 | 510 |
492 LayoutUnit containingBlockLogicalWidthForContent() const override; | 511 LayoutUnit containingBlockLogicalWidthForContent() const override; |
493 LayoutUnit containingBlockLogicalHeightForContent(AvailableLogicalHeightType
) const; | 512 LayoutUnit containingBlockLogicalHeightForContent(AvailableLogicalHeightType
) const; |
494 | 513 |
495 LayoutUnit containingBlockAvailableLineWidth() const; | 514 LayoutUnit containingBlockAvailableLineWidth() const; |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 if (UNLIKELY(inlineBoxWrapper() != nullptr)) | 956 if (UNLIKELY(inlineBoxWrapper() != nullptr)) |
938 deleteLineBoxWrapper(); | 957 deleteLineBoxWrapper(); |
939 } | 958 } |
940 | 959 |
941 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 960 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
942 } | 961 } |
943 | 962 |
944 } // namespace blink | 963 } // namespace blink |
945 | 964 |
946 #endif // LayoutBox_h | 965 #endif // LayoutBox_h |
OLD | NEW |