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 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 } | 829 } |
830 void setPaginationStrut(LayoutUnit); | 830 void setPaginationStrut(LayoutUnit); |
831 void resetPaginationStrut() { | 831 void resetPaginationStrut() { |
832 if (m_rareData) | 832 if (m_rareData) |
833 m_rareData->m_paginationStrut = LayoutUnit(); | 833 m_rareData->m_paginationStrut = LayoutUnit(); |
834 } | 834 } |
835 | 835 |
836 // Is the specified break-before or break-after value supported on this | 836 // Is the specified break-before or break-after value supported on this |
837 // object? It needs to be in-flow all the way up to a fragmentation context | 837 // object? It needs to be in-flow all the way up to a fragmentation context |
838 // that supports the specified value. | 838 // that supports the specified value. |
839 bool isBreakBetweenControllable(EBreak) const; | 839 bool isBreakBetweenControllable(EBreakBetween) const; |
840 | 840 |
841 // Is the specified break-inside value supported on this object? It needs to | 841 // Is the specified break-inside value supported on this object? It needs to |
842 // be contained by a fragmentation context that supports the specified value. | 842 // be contained by a fragmentation context that supports the specified value. |
843 bool isBreakInsideControllable(EBreak) const; | 843 bool isBreakInsideControllable(EBreakInside) const; |
844 | 844 |
845 virtual EBreak breakAfter() const; | 845 virtual EBreakBetween breakAfter() const; |
846 virtual EBreak breakBefore() const; | 846 virtual EBreakBetween breakBefore() const; |
847 EBreak breakInside() const; | 847 EBreakInside breakInside() const; |
848 | 848 |
849 // Join two adjacent break values specified on break-before and/or break- | 849 // Join two adjacent break values specified on break-before and/or break- |
850 // after. avoid* values win over auto values, and forced break values win over | 850 // after. avoid* values win over auto values, and forced break values win over |
851 // avoid* values. |firstValue| is specified on an element earlier in the flow | 851 // avoid* values. |firstValue| is specified on an element earlier in the flow |
852 // than |secondValue|. This method is used at class A break points [1], to | 852 // than |secondValue|. This method is used at class A break points [1], to |
853 // join the values of the previous break-after and the next break-before, to | 853 // join the values of the previous break-after and the next break-before, to |
854 // figure out whether we may, must, or should not, break at that point. It is | 854 // figure out whether we may, must, or should not, break at that point. It is |
855 // also used when propagating break-before values from first children and | 855 // also used when propagating break-before values from first children and |
856 // break-after values on last children to their container. | 856 // break-after values on last children to their container. |
857 // | 857 // |
858 // [1] https://drafts.csswg.org/css-break/#possible-breaks | 858 // [1] https://drafts.csswg.org/css-break/#possible-breaks |
859 static EBreak joinFragmentainerBreakValues(EBreak firstValue, | 859 static EBreakBetween joinFragmentainerBreakValues(EBreakBetween firstValue, |
860 EBreak secondValue); | 860 EBreakBetween secondValue); |
861 | 861 |
862 static bool isForcedFragmentainerBreakValue(EBreak); | 862 static bool isForcedFragmentainerBreakValue(EBreakBetween); |
863 | 863 |
864 EBreak classABreakPointValue(EBreak previousBreakAfterValue) const; | 864 EBreakBetween classABreakPointValue( |
| 865 EBreakBetween previousBreakAfterValue) const; |
865 | 866 |
866 // Return true if we should insert a break in front of this box. The box needs | 867 // Return true if we should insert a break in front of this box. The box needs |
867 // to start at a valid class A break point in order to allow a forced break. | 868 // to start at a valid class A break point in order to allow a forced break. |
868 // To determine whether or not to break, we also need to know the break-after | 869 // To determine whether or not to break, we also need to know the break-after |
869 // value of the previous in-flow sibling. | 870 // value of the previous in-flow sibling. |
870 bool needsForcedBreakBefore(EBreak previousBreakAfterValue) const; | 871 bool needsForcedBreakBefore(EBreakBetween previousBreakAfterValue) const; |
871 | 872 |
872 bool paintedOutputOfObjectHasNoEffectRegardlessOfSize() const override; | 873 bool paintedOutputOfObjectHasNoEffectRegardlessOfSize() const override; |
873 LayoutRect localVisualRect() const override; | 874 LayoutRect localVisualRect() const override; |
874 bool mapToVisualRectInAncestorSpace( | 875 bool mapToVisualRectInAncestorSpace( |
875 const LayoutBoxModelObject* ancestor, | 876 const LayoutBoxModelObject* ancestor, |
876 LayoutRect&, | 877 LayoutRect&, |
877 VisualRectFlags = DefaultVisualRectFlags) const override; | 878 VisualRectFlags = DefaultVisualRectFlags) const override; |
878 | 879 |
879 LayoutUnit containingBlockLogicalHeightForGetComputedStyle() const; | 880 LayoutUnit containingBlockLogicalHeightForGetComputedStyle() const; |
880 | 881 |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1623 // keeping the reference to this layoutObject, and only one will be notified | 1624 // keeping the reference to this layoutObject, and only one will be notified |
1624 // when the layoutObject is getting destroyed. The second line box wrapper | 1625 // when the layoutObject is getting destroyed. The second line box wrapper |
1625 // will keep a stale reference. | 1626 // will keep a stale reference. |
1626 if (UNLIKELY(m_inlineBoxWrapper != nullptr)) | 1627 if (UNLIKELY(m_inlineBoxWrapper != nullptr)) |
1627 deleteLineBoxWrapper(); | 1628 deleteLineBoxWrapper(); |
1628 } | 1629 } |
1629 | 1630 |
1630 m_inlineBoxWrapper = boxWrapper; | 1631 m_inlineBoxWrapper = boxWrapper; |
1631 } | 1632 } |
1632 | 1633 |
1633 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) { | 1634 inline bool LayoutBox::isForcedFragmentainerBreakValue( |
1634 return breakValue == BreakColumn || breakValue == BreakLeft || | 1635 EBreakBetween breakValue) { |
1635 breakValue == BreakPage || breakValue == BreakRecto || | 1636 return breakValue == EBreakBetween::kColumn || |
1636 breakValue == BreakRight || breakValue == BreakVerso; | 1637 breakValue == EBreakBetween::kLeft || |
| 1638 breakValue == EBreakBetween::kPage || |
| 1639 breakValue == EBreakBetween::kRecto || |
| 1640 breakValue == EBreakBetween::kRight || |
| 1641 breakValue == EBreakBetween::kVerso; |
1637 } | 1642 } |
1638 | 1643 |
1639 } // namespace blink | 1644 } // namespace blink |
1640 | 1645 |
1641 #endif // LayoutBox_h | 1646 #endif // LayoutBox_h |
OLD | NEW |