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 "core/layout/PaintPhase.h" | 8 #include "core/layout/PaintPhase.h" |
9 #include "platform/geometry/LayoutPoint.h" | 9 #include "platform/geometry/LayoutPoint.h" |
10 #include "platform/graphics/paint/DisplayItem.h" | 10 #include "platform/graphics/paint/DisplayItem.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class RenderBox; | 14 class LayoutBox; |
15 struct PaintInfo; | 15 struct PaintInfo; |
16 | 16 |
17 enum ContentsClipBehavior { ForceContentsClip, SkipContentsClipIfPossible }; | 17 enum ContentsClipBehavior { ForceContentsClip, SkipContentsClipIfPossible }; |
18 | 18 |
19 class BoxClipper { | 19 class BoxClipper { |
20 public: | 20 public: |
21 BoxClipper(RenderBox&, const PaintInfo&, const LayoutPoint& accumulatedOffse
t, ContentsClipBehavior); | 21 BoxClipper(LayoutBox&, const PaintInfo&, const LayoutPoint& accumulatedOffse
t, ContentsClipBehavior); |
22 ~BoxClipper(); | 22 ~BoxClipper(); |
23 | 23 |
24 bool pushedClip() { return m_pushedClip; } | 24 bool pushedClip() { return m_pushedClip; } |
25 private: | 25 private: |
26 bool m_pushedClip; | 26 bool m_pushedClip; |
27 LayoutPoint m_accumulatedOffset; | 27 LayoutPoint m_accumulatedOffset; |
28 const PaintInfo& m_paintInfo; | 28 const PaintInfo& m_paintInfo; |
29 RenderBox& m_box; | 29 LayoutBox& m_box; |
30 DisplayItem::Type m_clipType; | 30 DisplayItem::Type m_clipType; |
31 }; | 31 }; |
32 | 32 |
33 } // namespace blink | 33 } // namespace blink |
34 | 34 |
35 #endif // BoxClipper_h | 35 #endif // BoxClipper_h |
OLD | NEW |