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