| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // Now instead if we add "clip: rect(0px, 100px, 100px, 0px)" to #container, | 165 // Now instead if we add "clip: rect(0px, 100px, 100px, 0px)" to #container, |
| 166 // the clip will apply to both #inflow and #fixed. That's because 'clip' | 166 // the clip will apply to both #inflow and #fixed. That's because 'clip' |
| 167 // applies to any descendant, regardless of containing blocks. Note that | 167 // applies to any descendant, regardless of containing blocks. Note that |
| 168 // #container and #fixed are siblings in the paint tree but #container does | 168 // #container and #fixed are siblings in the paint tree but #container does |
| 169 // clip #fixed. This is the reason why we compute the painting clip rects during | 169 // clip #fixed. This is the reason why we compute the painting clip rects during |
| 170 // a layout tree walk and cache them for painting. | 170 // a layout tree walk and cache them for painting. |
| 171 class CORE_EXPORT PaintLayerClipper { | 171 class CORE_EXPORT PaintLayerClipper { |
| 172 DISALLOW_NEW(); | 172 DISALLOW_NEW(); |
| 173 | 173 |
| 174 public: | 174 public: |
| 175 explicit PaintLayerClipper(const PaintLayer&, bool useGeometryMapper); | 175 explicit PaintLayerClipper(const PaintLayer&, GeometryMapper*); |
| 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 // applying CSS clip and the visualOverflowRect() of |m_layer|. | 185 // applying CSS clip and the visualOverflowRect() of |m_layer|. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 LayoutRect& layerBounds, | 228 LayoutRect& layerBounds, |
| 229 ClipRect& backgroundRect, | 229 ClipRect& backgroundRect, |
| 230 ClipRect& foregroundRect, | 230 ClipRect& foregroundRect, |
| 231 const LayoutPoint* offsetFromRoot = 0) const; | 231 const LayoutPoint* offsetFromRoot = 0) const; |
| 232 | 232 |
| 233 void applyOverflowClipToBackgroundRectWithGeometryMapper( | 233 void applyOverflowClipToBackgroundRectWithGeometryMapper( |
| 234 const ClipRectsContext&, | 234 const ClipRectsContext&, |
| 235 ClipRect&) const; | 235 ClipRect&) const; |
| 236 | 236 |
| 237 const PaintLayer& m_layer; | 237 const PaintLayer& m_layer; |
| 238 std::unique_ptr<GeometryMapper> m_geometryMapper; | 238 GeometryMapper* m_geometryMapper; |
| 239 | 239 |
| 240 friend class PaintLayerClipperTest; | 240 friend class PaintLayerClipperTest; |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 } // namespace blink | 243 } // namespace blink |
| 244 | 244 |
| 245 #endif // LayerClipper_h | 245 #endif // LayerClipper_h |
| OLD | NEW |