OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BoxClipper_h | 5 #ifndef BoxClipper_h |
6 #define BoxClipper_h | 6 #define BoxClipper_h |
7 | 7 |
8 #include "platform/geometry/LayoutPoint.h" | 8 #include "platform/geometry/LayoutPoint.h" |
9 #include "platform/graphics/paint/DisplayItem.h" | 9 #include "platform/graphics/paint/DisplayItem.h" |
10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class LayoutBox; | 14 class LayoutBox; |
15 struct PaintInfo; | 15 struct PaintInfo; |
16 | 16 |
17 enum ContentsClipBehavior { ForceContentsClip, SkipContentsClipIfPossible }; | 17 enum ContentsClipBehavior { |
| 18 ForceContentsClip, |
| 19 SkipContentsClipIfPossible, |
| 20 ClipForScrollbars |
| 21 }; |
18 | 22 |
19 class BoxClipper { | 23 class BoxClipper { |
20 STACK_ALLOCATED(); | 24 STACK_ALLOCATED(); |
21 public: | 25 public: |
22 BoxClipper(const LayoutBox&, const PaintInfo&, const LayoutPoint& accumulate
dOffset, ContentsClipBehavior); | 26 BoxClipper(const LayoutBox&, const PaintInfo&, const LayoutPoint& accumulate
dOffset, ContentsClipBehavior); |
23 ~BoxClipper(); | 27 ~BoxClipper(); |
24 private: | 28 private: |
25 const LayoutBox& m_box; | 29 const LayoutBox& m_box; |
26 const PaintInfo& m_paintInfo; | 30 const PaintInfo& m_paintInfo; |
27 DisplayItem::Type m_clipType; | 31 DisplayItem::Type m_clipType; |
28 }; | 32 }; |
29 | 33 |
30 } // namespace blink | 34 } // namespace blink |
31 | 35 |
32 #endif // BoxClipper_h | 36 #endif // BoxClipper_h |
OLD | NEW |