| 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> |
| 11 * Randall Jesup <rjesup@wgate.com> | 11 * Randall Jesup <rjesup@wgate.com> |
| 12 * Roland Mainz <roland.mainz@informatik.med.uni-giessen.de> | 12 * Roland Mainz <roland.mainz@informatik.med.uni-giessen.de> |
| 13 * Josh Soref <timeless@mac.com> | 13 * Josh Soref <timeless@mac.com> |
| 14 * Boris Zbarsky <bzbarsky@mit.edu> | 14 * Boris Zbarsky <bzbarsky@mit.edu> |
| 15 * | 15 * |
| 16 * This library is free software; you can redistribute it and/or | 16 * This library is free software; you can redistribute it and/or |
| 17 * modify it under the terms of the GNU Lesser General Public | 17 * modify it under the terms of the GNU Lesser General Public |
| 18 * License as published by the Free Software Foundation; either | 18 * License as published by the Free Software Foundation; either |
| 19 * version 2.1 of the License, or (at your option) any later version. | 19 * version 2.1 of the License, or (at your option) any later version. |
| 20 * | 20 * |
| 21 * This library is distributed in the hope that it will be useful, | 21 * This library is distributed in the hope that it will be useful, |
| 22 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 22 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 24 * Lesser General Public License for more details. | 24 * Lesser General Public License for more details. |
| 25 * | 25 * |
| 26 * You should have received a copy of the GNU Lesser General Public | 26 * You should have received a copy of the GNU Lesser General Public |
| 27 * License along with this library; if not, write to the Free Software | 27 * License along with this library; if not, write to the Free Software |
| 28 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 US
A | 28 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
| 29 * | 29 * |
| 30 * Alternatively, the contents of this file may be used under the terms | 30 * Alternatively, the contents of this file may be used under the terms |
| 31 * of either the Mozilla Public License Version 1.1, found at | 31 * of either the Mozilla Public License Version 1.1, found at |
| 32 * http://www.mozilla.org/MPL/ (the "MPL") or the GNU General Public | 32 * http://www.mozilla.org/MPL/ (the "MPL") or the GNU General Public |
| 33 * License Version 2.0, found at http://www.fsf.org/copyleft/gpl.html | 33 * License Version 2.0, found at http://www.fsf.org/copyleft/gpl.html |
| 34 * (the "GPL"), in which case the provisions of the MPL or the GPL are | 34 * (the "GPL"), in which case the provisions of the MPL or the GPL are |
| 35 * applicable instead of those above. If you wish to allow use of your | 35 * applicable instead of those above. If you wish to allow use of your |
| 36 * version of this file only under the terms of one of those two | 36 * version of this file only under the terms of one of those two |
| 37 * licenses (the MPL or the GPL) and not to allow others to use your | 37 * licenses (the MPL or the GPL) and not to allow others to use your |
| 38 * version of this file under the LGPL, indicate your decision by | 38 * version of this file under the LGPL, indicate your decision by |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // a layout tree walk and cache them for painting. | 148 // a layout tree walk and cache them for painting. |
| 149 class CORE_EXPORT PaintLayerClipper { | 149 class CORE_EXPORT PaintLayerClipper { |
| 150 DISALLOW_NEW(); | 150 DISALLOW_NEW(); |
| 151 | 151 |
| 152 public: | 152 public: |
| 153 explicit PaintLayerClipper(const PaintLayer& layer) : m_layer(layer) {} | 153 explicit PaintLayerClipper(const PaintLayer& layer) : m_layer(layer) {} |
| 154 | 154 |
| 155 void clearClipRectsIncludingDescendants(); | 155 void clearClipRectsIncludingDescendants(); |
| 156 void clearClipRectsIncludingDescendants(ClipRectsCacheSlot); | 156 void clearClipRectsIncludingDescendants(ClipRectsCacheSlot); |
| 157 | 157 |
| 158 // Returns the background clip rect of the layer in the local coordinate space
. Only looks for clips up to the given ancestor. | 158 // Returns the background clip rect of the layer in the local coordinate |
| 159 // space. Only looks for clips up to the given ancestor. |
| 159 LayoutRect localClipRect(const PaintLayer* ancestorLayer) const; | 160 LayoutRect localClipRect(const PaintLayer* ancestorLayer) const; |
| 160 | 161 |
| 161 ClipRect backgroundClipRect(const ClipRectsContext&) const; | 162 ClipRect backgroundClipRect(const ClipRectsContext&) const; |
| 162 | 163 |
| 163 // This method figures out our layerBounds in coordinates relative to | 164 // This method figures out our layerBounds in coordinates relative to |
| 164 // |rootLayer|. It also computes our background and foreground clip rects | 165 // |rootLayer|. It also computes our background and foreground clip rects |
| 165 // for painting/event handling. | 166 // for painting/event handling. |
| 166 // Pass offsetFromRoot if known. | 167 // Pass offsetFromRoot if known. |
| 167 void calculateRects(const ClipRectsContext&, | 168 void calculateRects(const ClipRectsContext&, |
| 168 const LayoutRect& paintDirtyRect, | 169 const LayoutRect& paintDirtyRect, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 187 void getOrCalculateClipRects(const ClipRectsContext&, ClipRects&) const; | 188 void getOrCalculateClipRects(const ClipRectsContext&, ClipRects&) const; |
| 188 | 189 |
| 189 bool shouldRespectOverflowClip(const ClipRectsContext&) const; | 190 bool shouldRespectOverflowClip(const ClipRectsContext&) const; |
| 190 | 191 |
| 191 const PaintLayer& m_layer; | 192 const PaintLayer& m_layer; |
| 192 }; | 193 }; |
| 193 | 194 |
| 194 } // namespace blink | 195 } // namespace blink |
| 195 | 196 |
| 196 #endif // LayerClipper_h | 197 #endif // LayerClipper_h |
| OLD | NEW |