Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.h

Issue 1856993004: Let mapToVisualRectInAncestorSpace apply ancestor clip if not scrollsOverflow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Saturated
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayS crollbarSize }; 42 enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayS crollbarSize };
43 enum MarginDirection { BlockDirection, InlineDirection }; 43 enum MarginDirection { BlockDirection, InlineDirection };
44 44
45 enum ShouldComputePreferred { ComputeActual, ComputePreferred }; 45 enum ShouldComputePreferred { ComputeActual, ComputePreferred };
46 46
47 enum ScrollOffsetClamping { 47 enum ScrollOffsetClamping {
48 ScrollOffsetUnclamped, 48 ScrollOffsetUnclamped,
49 ScrollOffsetClamped 49 ScrollOffsetClamped
50 }; 50 };
51 51
52 enum ApplyOverflowClipFlag {
53 ApplyOverflowClip,
54 ApplyNonScrollOverflowClip
55 };
56
52 struct LayoutBoxRareData { 57 struct LayoutBoxRareData {
53 WTF_MAKE_NONCOPYABLE(LayoutBoxRareData); USING_FAST_MALLOC(LayoutBoxRareData ); 58 WTF_MAKE_NONCOPYABLE(LayoutBoxRareData); USING_FAST_MALLOC(LayoutBoxRareData );
54 public: 59 public:
55 LayoutBoxRareData() 60 LayoutBoxRareData()
56 : m_spannerPlaceholder(nullptr) 61 : m_spannerPlaceholder(nullptr)
57 , m_overrideLogicalContentHeight(-1) 62 , m_overrideLogicalContentHeight(-1)
58 , m_overrideLogicalContentWidth(-1) 63 , m_overrideLogicalContentWidth(-1)
59 , m_previousBorderBoxSize(LayoutUnit(-1), LayoutUnit(-1)) 64 , m_previousBorderBoxSize(LayoutUnit(-1), LayoutUnit(-1))
60 , m_percentHeightContainer(nullptr) 65 , m_percentHeightContainer(nullptr)
61 { 66 {
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 LayoutRect visualOverflowRectForPropagation(const ComputedStyle&) const; 833 LayoutRect visualOverflowRectForPropagation(const ComputedStyle&) const;
829 LayoutRect logicalLayoutOverflowRectForPropagation(const ComputedStyle&) con st; 834 LayoutRect logicalLayoutOverflowRectForPropagation(const ComputedStyle&) con st;
830 LayoutRect layoutOverflowRectForPropagation(const ComputedStyle&) const; 835 LayoutRect layoutOverflowRectForPropagation(const ComputedStyle&) const;
831 836
832 bool hasOverflowModel() const { return m_overflow; } 837 bool hasOverflowModel() const { return m_overflow; }
833 bool hasVisualOverflow() const { return m_overflow && !borderBoxRect().conta ins(m_overflow->visualOverflowRect()); } 838 bool hasVisualOverflow() const { return m_overflow && !borderBoxRect().conta ins(m_overflow->visualOverflowRect()); }
834 839
835 virtual bool needsPreferredWidthsRecalculation() const; 840 virtual bool needsPreferredWidthsRecalculation() const;
836 841
837 IntSize scrolledContentOffset() const; 842 IntSize scrolledContentOffset() const;
838 void mapScrollingContentsRectToBoxSpace(LayoutRect&) const;
839 843
840 // Returns true if the rect actually intersects the clipping region. 844 // Maps a rect in scrolling contents space to box space and apply overflow c lip if needed.
845 // Returns true if no clipping applied or the rect actually intersects the c lipping region.
841 // If edgeInclusive is true, then this method may return true even 846 // If edgeInclusive is true, then this method may return true even
842 // if the resulting rect has zero area. 847 // if the resulting rect has zero area.
843 bool applyOverflowClip(LayoutRect&, VisualRectFlags = DefaultVisualRectFlags ) const; 848 bool mapScrollingContentsRectToBoxSpace(LayoutRect&, ApplyOverflowClipFlag, VisualRectFlags = DefaultVisualRectFlags) const;
844 849
845 virtual bool hasRelativeLogicalWidth() const; 850 virtual bool hasRelativeLogicalWidth() const;
846 virtual bool hasRelativeLogicalHeight() const; 851 virtual bool hasRelativeLogicalHeight() const;
847 852
848 bool hasHorizontalLayoutOverflow() const 853 bool hasHorizontalLayoutOverflow() const
849 { 854 {
850 if (!m_overflow) 855 if (!m_overflow)
851 return false; 856 return false;
852 857
853 LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect(); 858 LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect();
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 || breakValue == BreakLeft 1145 || breakValue == BreakLeft
1141 || breakValue == BreakPage 1146 || breakValue == BreakPage
1142 || breakValue == BreakRecto 1147 || breakValue == BreakRecto
1143 || breakValue == BreakRight 1148 || breakValue == BreakRight
1144 || breakValue == BreakVerso; 1149 || breakValue == BreakVerso;
1145 } 1150 }
1146 1151
1147 } // namespace blink 1152 } // namespace blink
1148 1153
1149 #endif // LayoutBox_h 1154 #endif // LayoutBox_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698