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

Side by Side Diff: Source/core/paint/BoxClipper.h

Issue 1212293003: Clean up BoxClipper (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 | « Source/core/layout/LayoutTable.cpp ('k') | Source/core/paint/BoxClipper.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 // 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 10
11 namespace blink { 11 namespace blink {
12 12
13 class LayoutBox; 13 class LayoutBox;
14 struct PaintInfo; 14 struct PaintInfo;
15 15
16 enum ContentsClipBehavior { ForceContentsClip, SkipContentsClipIfPossible }; 16 enum ContentsClipBehavior { ForceContentsClip, SkipContentsClipIfPossible };
17 17
18 class BoxClipper { 18 class BoxClipper {
19 public: 19 public:
20 BoxClipper(LayoutBox&, const PaintInfo&, const LayoutPoint& accumulatedOffse t, ContentsClipBehavior); 20 BoxClipper(const LayoutBox&, const PaintInfo&, const LayoutPoint& accumulate dOffset, ContentsClipBehavior);
21 ~BoxClipper(); 21 ~BoxClipper();
22
23 bool pushedClip() { return m_pushedClip; }
24 private: 22 private:
25 bool m_pushedClip; 23 const LayoutBox& m_box;
26 LayoutPoint m_accumulatedOffset;
27 const PaintInfo& m_paintInfo; 24 const PaintInfo& m_paintInfo;
28 LayoutBox& m_box;
29 DisplayItem::Type m_clipType; 25 DisplayItem::Type m_clipType;
30 }; 26 };
31 27
32 } // namespace blink 28 } // namespace blink
33 29
34 #endif // BoxClipper_h 30 #endif // BoxClipper_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTable.cpp ('k') | Source/core/paint/BoxClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698