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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerClipper.h

Issue 2856373002: [blink] Unify PaintLayerClipper behavior with kIgnoreOverflowClip (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerClipper.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 /* 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 DCHECK(respect_overflow_clip == kRespectOverflowClip); 89 DCHECK(respect_overflow_clip == kRespectOverflowClip);
90 if (UsesCache()) 90 if (UsesCache())
91 cache_slot_ = kPaintingClipRectsIgnoringOverflowClip; 91 cache_slot_ = kPaintingClipRectsIgnoringOverflowClip;
92 respect_overflow_clip = kIgnoreOverflowClip; 92 respect_overflow_clip = kIgnoreOverflowClip;
93 } 93 }
94 94
95 bool UsesCache() const { return cache_slot_ != kUncachedClipRects; } 95 bool UsesCache() const { return cache_slot_ != kUncachedClipRects; }
96 96
97 ClipRectsCacheSlot CacheSlot() const { return cache_slot_; } 97 ClipRectsCacheSlot CacheSlot() const { return cache_slot_; }
98 98
99 bool ShouldRespectRootLayerClip() const;
100
99 const PaintLayer* root_layer; 101 const PaintLayer* root_layer;
100 const OverlayScrollbarClipBehavior overlay_scrollbar_clip_behavior; 102 const OverlayScrollbarClipBehavior overlay_scrollbar_clip_behavior;
101 103
102 private: 104 private:
103 friend class PaintLayerClipper; 105 friend class PaintLayerClipper;
104 106
105 ClipRectsCacheSlot cache_slot_; 107 ClipRectsCacheSlot cache_slot_;
106 LayoutSize sub_pixel_accumulation; 108 LayoutSize sub_pixel_accumulation;
107 ShouldRespectOverflowClipType respect_overflow_clip; 109 ShouldRespectOverflowClipType respect_overflow_clip;
108 ShouldRespectOverflowClipType respect_overflow_clip_for_viewport; 110 ShouldRespectOverflowClipType respect_overflow_clip_for_viewport;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 215
214 void CalculateClipRects(const ClipRectsContext&, ClipRects&) const; 216 void CalculateClipRects(const ClipRectsContext&, ClipRects&) const;
215 ClipRects* ClipRectsIfCached(const ClipRectsContext&) const; 217 ClipRects* ClipRectsIfCached(const ClipRectsContext&) const;
216 ClipRects& StoreClipRectsInCache(const ClipRectsContext&, 218 ClipRects& StoreClipRectsInCache(const ClipRectsContext&,
217 ClipRects* parent_clip_rects, 219 ClipRects* parent_clip_rects,
218 const ClipRects&) const; 220 const ClipRects&) const;
219 221
220 void GetOrCalculateClipRects(const ClipRectsContext&, ClipRects&) const; 222 void GetOrCalculateClipRects(const ClipRectsContext&, ClipRects&) const;
221 223
222 ALWAYS_INLINE bool ShouldClipOverflow(const ClipRectsContext&) const; 224 ALWAYS_INLINE bool ShouldClipOverflow(const ClipRectsContext&) const;
223 ALWAYS_INLINE bool ShouldRespectOverflowClip(const ClipRectsContext&) const;
224 225
225 // Returned clip rect in |output| is in the space of the context's rootLayer. 226 // Returned clip rect in |output| is in the space of the context's rootLayer.
226 ALWAYS_INLINE void CalculateBackgroundClipRectWithGeometryMapper( 227 ALWAYS_INLINE void CalculateBackgroundClipRectWithGeometryMapper(
227 const ClipRectsContext&, 228 const ClipRectsContext&,
228 ClipRect& output) const; 229 ClipRect& output) const;
229 230
230 ALWAYS_INLINE void InitializeCommonClipRectState( 231 ALWAYS_INLINE void InitializeCommonClipRectState(
231 const ClipRectsContext&, 232 const ClipRectsContext&,
232 PropertyTreeState& descendant_property_tree_state, 233 PropertyTreeState& descendant_property_tree_state,
233 PropertyTreeState& ancestor_property_tree_state) const; 234 PropertyTreeState& ancestor_property_tree_state) const;
(...skipping 13 matching lines...) Expand all
247 248
248 const PaintLayer& layer_; 249 const PaintLayer& layer_;
249 bool use_geometry_mapper_; 250 bool use_geometry_mapper_;
250 251
251 friend class PaintLayerClipperTest; 252 friend class PaintLayerClipperTest;
252 }; 253 };
253 254
254 } // namespace blink 255 } // namespace blink
255 256
256 #endif // LayerClipper_h 257 #endif // LayerClipper_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698