| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 ClipRects* getClipRects(const ClipRectsContext&) const; | 170 ClipRects* getClipRects(const ClipRectsContext&) const; |
| 171 | 171 |
| 172 ClipRect backgroundClipRect(const ClipRectsContext&) const; | 172 ClipRect backgroundClipRect(const ClipRectsContext&) const; |
| 173 | 173 |
| 174 // This method figures out our layerBounds in coordinates relative to | 174 // This method figures out our layerBounds in coordinates relative to |
| 175 // |rootLayer|. It also computes our background and foreground clip rects | 175 // |rootLayer|. It also computes our background and foreground clip rects |
| 176 // for painting/event handling. | 176 // for painting/event handling. |
| 177 // Pass offsetFromRoot if known. | 177 // Pass offsetFromRoot if known. |
| 178 void calculateRects(const ClipRectsContext&, const LayoutRect& paintDirtyRec
t, LayoutRect& layerBounds, | 178 void calculateRects(const ClipRectsContext&, const LayoutRect& paintDirtyRec
t, LayoutRect& layerBounds, |
| 179 ClipRect& backgroundRect, ClipRect& foregroundRect, ClipRect& outlineRec
t, const LayoutPoint* offsetFromRoot = 0) const; | 179 ClipRect& backgroundRect, ClipRect& foregroundRect, const LayoutPoint* o
ffsetFromRoot = 0) const; |
| 180 private: | 180 private: |
| 181 void calculateClipRects(const ClipRectsContext&, ClipRects&) const; | 181 void calculateClipRects(const ClipRectsContext&, ClipRects&) const; |
| 182 ClipRects* clipRectsIfCached(const ClipRectsContext&) const; | 182 ClipRects* clipRectsIfCached(const ClipRectsContext&) const; |
| 183 ClipRects* storeClipRectsInCache(const ClipRectsContext&, ClipRects* parentC
lipRects, const ClipRects&) const; | 183 ClipRects* storeClipRectsInCache(const ClipRectsContext&, ClipRects* parentC
lipRects, const ClipRects&) const; |
| 184 | 184 |
| 185 // cachedClipRects looks buggy: It doesn't check whether context.rootLayer a
nd entry.root match. | 185 // cachedClipRects looks buggy: It doesn't check whether context.rootLayer a
nd entry.root match. |
| 186 // FIXME: Move callers to clipRectsIfCached, which does the proper checks. | 186 // FIXME: Move callers to clipRectsIfCached, which does the proper checks. |
| 187 ClipRects* cachedClipRects(const ClipRectsContext& context) const | 187 ClipRects* cachedClipRects(const ClipRectsContext& context) const |
| 188 { | 188 { |
| 189 return m_cache ? m_cache->get(context.cacheSlot()).clipRects.get() : 0; | 189 return m_cache ? m_cache->get(context.cacheSlot()).clipRects.get() : 0; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 202 bool shouldRespectOverflowClip(const ClipRectsContext&) const; | 202 bool shouldRespectOverflowClip(const ClipRectsContext&) const; |
| 203 | 203 |
| 204 // FIXME: Could this be a LayoutBox? | 204 // FIXME: Could this be a LayoutBox? |
| 205 LayoutBoxModelObject& m_layoutObject; | 205 LayoutBoxModelObject& m_layoutObject; |
| 206 mutable OwnPtr<ClipRectsCache> m_cache; | 206 mutable OwnPtr<ClipRectsCache> m_cache; |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 } // namespace blink | 209 } // namespace blink |
| 210 | 210 |
| 211 #endif // LayerClipper_h | 211 #endif // LayerClipper_h |
| OLD | NEW |