OLD | NEW |
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // Returns the background clip rect of the layer in the local coordinate spa
ce. Only looks for clips up to the given ancestor. | 159 // Returns the background clip rect of the layer in the local coordinate spa
ce. Only looks for clips up to the given ancestor. |
160 LayoutRect localClipRect(const PaintLayer* ancestorLayer) const; | 160 LayoutRect localClipRect(const PaintLayer* ancestorLayer) const; |
161 | 161 |
162 ClipRect backgroundClipRect(const ClipRectsContext&) const; | 162 ClipRect backgroundClipRect(const ClipRectsContext&) const; |
163 | 163 |
164 // This method figures out our layerBounds in coordinates relative to | 164 // This method figures out our layerBounds in coordinates relative to |
165 // |rootLayer|. It also computes our background and foreground clip rects | 165 // |rootLayer|. It also computes our background and foreground clip rects |
166 // for painting/event handling. | 166 // for painting/event handling. |
167 // Pass offsetFromRoot if known. | 167 // Pass offsetFromRoot if known. |
168 void calculateRects(const ClipRectsContext&, const LayoutRect& paintDirtyRec
t, LayoutRect& layerBounds, | 168 void calculateRects(const ClipRectsContext&, const LayoutRect& paintDirtyRec
t, LayoutRect& layerBounds, |
169 ClipRect& backgroundRect, ClipRect& foregroundRect, const LayoutPoint* o
ffsetFromRoot = 0) const; | 169 ClipRect& backgroundRect, ClipRect& foregroundRect, const LayoutPoint* o
ffsetFromRoot = 0, |
| 170 const bool addAncestorClips = false) const; |
170 | 171 |
171 ClipRects& paintingClipRects(const PaintLayer* rootLayer, ShouldRespectOverf
lowClipType, const LayoutSize& subpixelAccumulation) const; | 172 ClipRects& paintingClipRects(const PaintLayer* rootLayer, ShouldRespectOverf
lowClipType, const LayoutSize& subpixelAccumulation) const; |
172 | 173 |
173 private: | 174 private: |
174 ClipRects& getClipRects(const ClipRectsContext&) const; | 175 ClipRects& getClipRects(const ClipRectsContext&) const; |
175 | 176 |
176 void calculateClipRects(const ClipRectsContext&, ClipRects&) const; | 177 void calculateClipRects(const ClipRectsContext&, ClipRects&) const; |
177 ClipRects* clipRectsIfCached(const ClipRectsContext&) const; | 178 ClipRects* clipRectsIfCached(const ClipRectsContext&) const; |
178 ClipRects& storeClipRectsInCache(const ClipRectsContext&, ClipRects* parentC
lipRects, const ClipRects&) const; | 179 ClipRects& storeClipRectsInCache(const ClipRectsContext&, ClipRects* parentC
lipRects, const ClipRects&) const; |
179 | 180 |
180 void getOrCalculateClipRects(const ClipRectsContext&, ClipRects&) const; | 181 void getOrCalculateClipRects(const ClipRectsContext&, ClipRects&) const; |
181 | 182 |
182 bool shouldRespectOverflowClip(const ClipRectsContext&) const; | 183 bool shouldRespectOverflowClip(const ClipRectsContext&) const; |
183 | 184 |
184 const PaintLayer& m_layer; | 185 const PaintLayer& m_layer; |
185 }; | 186 }; |
186 | 187 |
187 } // namespace blink | 188 } // namespace blink |
188 | 189 |
189 #endif // LayerClipper_h | 190 #endif // LayerClipper_h |
OLD | NEW |