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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 explicit PaintLayerClipper(const PaintLayer&, bool useGeometryMapper); | 175 explicit PaintLayerClipper(const PaintLayer&, bool useGeometryMapper); |
176 | 176 |
177 void clearClipRectsIncludingDescendants(); | 177 void clearClipRectsIncludingDescendants(); |
178 void clearClipRectsIncludingDescendants(ClipRectsCacheSlot); | 178 void clearClipRectsIncludingDescendants(ClipRectsCacheSlot); |
179 | 179 |
180 // Returns the background clip rect of the layer in the local coordinate | 180 // Returns the background clip rect of the layer in the local coordinate |
181 // space. Only looks for clips up to the given ancestor. | 181 // space. Only looks for clips up to the given ancestor. |
182 LayoutRect localClipRect(const PaintLayer* ancestorLayer) const; | 182 LayoutRect localClipRect(const PaintLayer* ancestorLayer) const; |
183 | 183 |
184 // Computes the same thing as backgroundRect in calculateRects(), but skips | 184 // Computes the same thing as backgroundRect in calculateRects(), but skips |
185 // apllying CSS clip and the visualOverflowRect() of |m_layer|. | 185 // applying CSS clip and the visualOverflowRect() of |m_layer|. |
186 ClipRect backgroundClipRect(const ClipRectsContext&) const; | 186 ClipRect backgroundClipRect(const ClipRectsContext&) const; |
187 | 187 |
188 // This method figures out our layerBounds in coordinates relative to | 188 // This method figures out our layerBounds in coordinates relative to |
189 // |rootLayer|. It also computes our background and foreground clip rects | 189 // |rootLayer|. It also computes our background and foreground clip rects |
190 // for painting/event handling. Pass offsetFromRoot if known. | 190 // for painting/event handling. Pass offsetFromRoot if known. |
191 void calculateRects(const ClipRectsContext&, | 191 void calculateRects(const ClipRectsContext&, |
192 const LayoutRect& paintDirtyRect, | 192 const LayoutRect& paintDirtyRect, |
193 LayoutRect& layerBounds, | 193 LayoutRect& layerBounds, |
194 ClipRect& backgroundRect, | 194 ClipRect& backgroundRect, |
195 ClipRect& foregroundRect, | 195 ClipRect& foregroundRect, |
196 const LayoutPoint* offsetFromRoot = 0) const; | 196 const LayoutPoint* offsetFromRoot = 0, |
| 197 const bool addAncestorClips = false) const; |
197 | 198 |
198 ClipRects& paintingClipRects(const PaintLayer* rootLayer, | 199 ClipRects& paintingClipRects(const PaintLayer* rootLayer, |
199 ShouldRespectOverflowClipType, | 200 ShouldRespectOverflowClipType, |
200 const LayoutSize& subpixelAccumulation) const; | 201 const LayoutSize& subpixelAccumulation) const; |
201 | 202 |
202 private: | 203 private: |
203 ClipRects& getClipRects(const ClipRectsContext&) const; | 204 ClipRects& getClipRects(const ClipRectsContext&) const; |
204 | 205 |
205 void calculateClipRects(const ClipRectsContext&, ClipRects&) const; | 206 void calculateClipRects(const ClipRectsContext&, ClipRects&) const; |
206 ClipRects* clipRectsIfCached(const ClipRectsContext&) const; | 207 ClipRects* clipRectsIfCached(const ClipRectsContext&) const; |
(...skipping 22 matching lines...) Expand all Loading... |
229 const ClipRectsContext&, | 230 const ClipRectsContext&, |
230 const ClipRect&) const; | 231 const ClipRect&) const; |
231 | 232 |
232 const PaintLayer& m_layer; | 233 const PaintLayer& m_layer; |
233 std::unique_ptr<GeometryMapper> m_geometryMapper; | 234 std::unique_ptr<GeometryMapper> m_geometryMapper; |
234 }; | 235 }; |
235 | 236 |
236 } // namespace blink | 237 } // namespace blink |
237 | 238 |
238 #endif // LayerClipper_h | 239 #endif // LayerClipper_h |
OLD | NEW |