| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 foregroundRect = backgroundRect; | 205 foregroundRect = backgroundRect; |
| 206 | 206 |
| 207 LayoutPoint offset; | 207 LayoutPoint offset; |
| 208 if (offsetFromRoot) | 208 if (offsetFromRoot) |
| 209 offset = *offsetFromRoot; | 209 offset = *offsetFromRoot; |
| 210 else | 210 else |
| 211 m_layer.convertToLayerCoords(context.rootLayer, offset); | 211 m_layer.convertToLayerCoords(context.rootLayer, offset); |
| 212 layerBounds = LayoutRect(offset, LayoutSize(m_layer.size())); | 212 layerBounds = LayoutRect(offset, LayoutSize(m_layer.size())); |
| 213 | 213 |
| 214 // Update the clip rects that will be passed to child layers. | 214 // Update the clip rects that will be passed to child layers. |
| 215 if ((layoutObject.hasOverflowClip() && shouldRespectOverflowClip(context)) | 215 if ((layoutObject.hasOverflowClip() || layoutObject.styleRef().containsPaint
()) && shouldRespectOverflowClip(context)) { |
| 216 || (layoutObject.styleRef().containsPaint() && layoutObject.isBox())) { | |
| 217 foregroundRect.intersect(toLayoutBox(layoutObject).overflowClipRect(offs
et, context.overlayScrollbarClipBehavior)); | 216 foregroundRect.intersect(toLayoutBox(layoutObject).overflowClipRect(offs
et, context.overlayScrollbarClipBehavior)); |
| 218 if (layoutObject.styleRef().hasBorderRadius()) | 217 if (layoutObject.styleRef().hasBorderRadius()) |
| 219 foregroundRect.setHasRadius(true); | 218 foregroundRect.setHasRadius(true); |
| 220 | 219 |
| 221 // FIXME: Does not do the right thing with columns yet, since we don't y
et factor in the | 220 // FIXME: Does not do the right thing with columns yet, since we don't y
et factor in the |
| 222 // individual column boxes as overflow. | 221 // individual column boxes as overflow. |
| 223 | 222 |
| 224 // The LayoutView is special since its overflow clipping rect may be lar
ger than its box rect (crbug.com/492871). | 223 // The LayoutView is special since its overflow clipping rect may be lar
ger than its box rect (crbug.com/492871). |
| 225 LayoutRect layerBoundsWithVisualOverflow = layoutObject.isLayoutView() ?
toLayoutView(layoutObject).viewRect() : toLayoutBox(layoutObject).visualOverflo
wRect(); | 224 LayoutRect layerBoundsWithVisualOverflow = layoutObject.isLayoutView() ?
toLayoutView(layoutObject).viewRect() : toLayoutBox(layoutObject).visualOverflo
wRect(); |
| 226 toLayoutBox(layoutObject).flipForWritingMode(layerBoundsWithVisualOverfl
ow); // PaintLayer are in physical coordinates, so the overflow has to be flippe
d. | 225 toLayoutBox(layoutObject).flipForWritingMode(layerBoundsWithVisualOverfl
ow); // PaintLayer are in physical coordinates, so the overflow has to be flippe
d. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 | 326 |
| 328 ClipRects& PaintLayerClipper::paintingClipRects(const PaintLayer* rootLayer, Sho
uldRespectOverflowClipType respectOverflowClip, const LayoutSize& subpixelAccumu
lation) const | 327 ClipRects& PaintLayerClipper::paintingClipRects(const PaintLayer* rootLayer, Sho
uldRespectOverflowClipType respectOverflowClip, const LayoutSize& subpixelAccumu
lation) const |
| 329 { | 328 { |
| 330 ClipRectsContext context(rootLayer, PaintingClipRects, IgnoreOverlayScrollba
rSize, subpixelAccumulation); | 329 ClipRectsContext context(rootLayer, PaintingClipRects, IgnoreOverlayScrollba
rSize, subpixelAccumulation); |
| 331 if (respectOverflowClip == IgnoreOverflowClip) | 330 if (respectOverflowClip == IgnoreOverflowClip) |
| 332 context.setIgnoreOverflowClip(); | 331 context.setIgnoreOverflowClip(); |
| 333 return getClipRects(context); | 332 return getClipRects(context); |
| 334 } | 333 } |
| 335 | 334 |
| 336 } // namespace blink | 335 } // namespace blink |
| OLD | NEW |