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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 IncludeMarginBorderPadding | 45 IncludeMarginBorderPadding |
46 }; | 46 }; |
47 // When painting, overlay scrollbars do not take up space and should not affect | 47 // When painting, overlay scrollbars do not take up space and should not affect |
48 // clipping behavior. During hit testing, overlay scrollbars behave like regular | 48 // clipping behavior. During hit testing, overlay scrollbars behave like regular |
49 // scrollbars and should change how hit testing is clipped. | 49 // scrollbars and should change how hit testing is clipped. |
50 enum MarginDirection { BlockDirection, InlineDirection }; | 50 enum MarginDirection { BlockDirection, InlineDirection }; |
51 enum BackgroundRectType { BackgroundClipRect, BackgroundKnownOpaqueRect }; | 51 enum BackgroundRectType { BackgroundClipRect, BackgroundKnownOpaqueRect }; |
52 | 52 |
53 enum ShouldComputePreferred { ComputeActual, ComputePreferred }; | 53 enum ShouldComputePreferred { ComputeActual, ComputePreferred }; |
54 | 54 |
55 enum ApplyOverflowClipFlag { | |
56 ApplyOverflowClip, | |
57 // Don't apply overflow clipping or scrolling. | |
58 ApplyNonScrollOverflowClip | |
59 }; | |
60 | |
61 using SnapAreaSet = HashSet<const LayoutBox*>; | 55 using SnapAreaSet = HashSet<const LayoutBox*>; |
62 | 56 |
63 struct LayoutBoxRareData { | 57 struct LayoutBoxRareData { |
64 WTF_MAKE_NONCOPYABLE(LayoutBoxRareData); | 58 WTF_MAKE_NONCOPYABLE(LayoutBoxRareData); |
65 USING_FAST_MALLOC(LayoutBoxRareData); | 59 USING_FAST_MALLOC(LayoutBoxRareData); |
66 | 60 |
67 public: | 61 public: |
68 LayoutBoxRareData() | 62 LayoutBoxRareData() |
69 : m_spannerPlaceholder(nullptr), | 63 : m_spannerPlaceholder(nullptr), |
70 m_overrideLogicalContentWidth(-1), | 64 m_overrideLogicalContentWidth(-1), |
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 // See README.md for an explanation of scroll origin. | 1204 // See README.md for an explanation of scroll origin. |
1211 virtual IntSize originAdjustmentForScrollbars() const; | 1205 virtual IntSize originAdjustmentForScrollbars() const; |
1212 IntSize scrolledContentOffset() const; | 1206 IntSize scrolledContentOffset() const; |
1213 | 1207 |
1214 // Maps a rect in scrolling contents space to box space and apply overflow | 1208 // Maps a rect in scrolling contents space to box space and apply overflow |
1215 // clip if needed. Returns true if no clipping applied or the rect actually | 1209 // clip if needed. Returns true if no clipping applied or the rect actually |
1216 // intersects the clipping region. If edgeInclusive is true, then this method | 1210 // intersects the clipping region. If edgeInclusive is true, then this method |
1217 // may return true even if the resulting rect has zero area. | 1211 // may return true even if the resulting rect has zero area. |
1218 bool mapScrollingContentsRectToBoxSpace( | 1212 bool mapScrollingContentsRectToBoxSpace( |
1219 LayoutRect&, | 1213 LayoutRect&, |
1220 ApplyOverflowClipFlag, | |
1221 VisualRectFlags = DefaultVisualRectFlags) const; | 1214 VisualRectFlags = DefaultVisualRectFlags) const; |
1222 | 1215 |
1223 virtual bool hasRelativeLogicalWidth() const; | 1216 virtual bool hasRelativeLogicalWidth() const; |
1224 virtual bool hasRelativeLogicalHeight() const; | 1217 virtual bool hasRelativeLogicalHeight() const; |
1225 | 1218 |
1226 bool hasHorizontalLayoutOverflow() const { | 1219 bool hasHorizontalLayoutOverflow() const { |
1227 if (!m_overflow) | 1220 if (!m_overflow) |
1228 return false; | 1221 return false; |
1229 | 1222 |
1230 LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect(); | 1223 LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect(); |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 | 1615 |
1623 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) { | 1616 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) { |
1624 return breakValue == BreakColumn || breakValue == BreakLeft || | 1617 return breakValue == BreakColumn || breakValue == BreakLeft || |
1625 breakValue == BreakPage || breakValue == BreakRecto || | 1618 breakValue == BreakPage || breakValue == BreakRecto || |
1626 breakValue == BreakRight || breakValue == BreakVerso; | 1619 breakValue == BreakRight || breakValue == BreakVerso; |
1627 } | 1620 } |
1628 | 1621 |
1629 } // namespace blink | 1622 } // namespace blink |
1630 | 1623 |
1631 #endif // LayoutBox_h | 1624 #endif // LayoutBox_h |
OLD | NEW |