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

Side by Side Diff: sky/engine/core/rendering/RenderLayerClipper.h

Issue 715453002: Remove OverlayScrollbarSizeRelevancy. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 class RenderLayer; 53 class RenderLayer;
54 54
55 enum ShouldRespectOverflowClip { 55 enum ShouldRespectOverflowClip {
56 IgnoreOverflowClip, 56 IgnoreOverflowClip,
57 RespectOverflowClip 57 RespectOverflowClip
58 }; 58 };
59 59
60 class ClipRectsContext { 60 class ClipRectsContext {
61 public: 61 public:
62 ClipRectsContext(const RenderLayer* root, ClipRectsCacheSlot slot, OverlaySc rollbarSizeRelevancy relevancy = IgnoreOverlayScrollbarSize, const LayoutSize& a ccumulation = LayoutSize()) 62 ClipRectsContext(const RenderLayer* root, ClipRectsCacheSlot slot, const Lay outSize& accumulation = LayoutSize())
63 : rootLayer(root) 63 : rootLayer(root)
64 , scrollbarRelevancy(relevancy)
65 , cacheSlot(slot) 64 , cacheSlot(slot)
66 , subPixelAccumulation(accumulation) 65 , subPixelAccumulation(accumulation)
67 , respectOverflowClip(slot == PaintingClipRectsIgnoringOverflowClip ? Ig noreOverflowClip : RespectOverflowClip) 66 , respectOverflowClip(slot == PaintingClipRectsIgnoringOverflowClip ? Ig noreOverflowClip : RespectOverflowClip)
68 { 67 {
69 } 68 }
70 69
71 void setIgnoreOverflowClip() 70 void setIgnoreOverflowClip()
72 { 71 {
73 ASSERT(!usesCache() || cacheSlot == PaintingClipRects); 72 ASSERT(!usesCache() || cacheSlot == PaintingClipRects);
74 ASSERT(respectOverflowClip == RespectOverflowClip); 73 ASSERT(respectOverflowClip == RespectOverflowClip);
75 if (usesCache()) 74 if (usesCache())
76 cacheSlot = PaintingClipRectsIgnoringOverflowClip; 75 cacheSlot = PaintingClipRectsIgnoringOverflowClip;
77 respectOverflowClip = IgnoreOverflowClip; 76 respectOverflowClip = IgnoreOverflowClip;
78 } 77 }
79 78
80 bool usesCache() const 79 bool usesCache() const
81 { 80 {
82 return cacheSlot != UncachedClipRects; 81 return cacheSlot != UncachedClipRects;
83 } 82 }
84 83
85 const RenderLayer* const rootLayer; 84 const RenderLayer* const rootLayer;
86 const OverlayScrollbarSizeRelevancy scrollbarRelevancy;
87 85
88 private: 86 private:
89 friend class RenderLayerClipper; 87 friend class RenderLayerClipper;
90 88
91 ClipRectsCacheSlot cacheSlot; 89 ClipRectsCacheSlot cacheSlot;
92 LayoutSize subPixelAccumulation; 90 LayoutSize subPixelAccumulation;
93 ShouldRespectOverflowClip respectOverflowClip; 91 ShouldRespectOverflowClip respectOverflowClip;
94 }; 92 };
95 93
96 class RenderLayerClipper { 94 class RenderLayerClipper {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 138 }
141 139
142 // FIXME: Could this be a RenderBox? 140 // FIXME: Could this be a RenderBox?
143 RenderLayerModelObject& m_renderer; 141 RenderLayerModelObject& m_renderer;
144 mutable OwnPtr<ClipRectsCache> m_cache; 142 mutable OwnPtr<ClipRectsCache> m_cache;
145 }; 143 };
146 144
147 } // namespace blink 145 } // namespace blink
148 146
149 #endif // RenderLayerClipper_h 147 #endif // RenderLayerClipper_h
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayer.cpp ('k') | sky/engine/core/rendering/RenderLayerClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698