| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 LayoutRect DeprecatedPaintLayerClipper::localClipRect() const | 88 LayoutRect DeprecatedPaintLayerClipper::localClipRect() const |
| 89 { | 89 { |
| 90 // FIXME: border-radius not accounted for. | 90 // FIXME: border-radius not accounted for. |
| 91 DeprecatedPaintLayer* clippingRootLayer = clippingRootForPainting(); | 91 DeprecatedPaintLayer* clippingRootLayer = clippingRootForPainting(); |
| 92 LayoutRect layerBounds; | 92 LayoutRect layerBounds; |
| 93 ClipRect backgroundRect, foregroundRect, outlineRect; | 93 ClipRect backgroundRect, foregroundRect, outlineRect; |
| 94 ClipRectsContext context(clippingRootLayer, PaintingClipRects); | 94 ClipRectsContext context(clippingRootLayer, PaintingClipRects); |
| 95 calculateRects(context, LayoutRect(LayoutRect::infiniteIntRect()), layerBoun
ds, backgroundRect, foregroundRect, outlineRect); | 95 calculateRects(context, LayoutRect(LayoutRect::infiniteIntRect()), layerBoun
ds, backgroundRect, foregroundRect, outlineRect); |
| 96 | 96 |
| 97 LayoutRect clipRect = backgroundRect.rect(); | 97 LayoutRect clipRect = backgroundRect.rect(); |
| 98 if (IntRect(clipRect) == LayoutRect::infiniteIntRect()) | 98 // TODO(chrishtr): avoid converting to IntRect and back. |
| 99 if (clipRect == LayoutRect(LayoutRect::infiniteIntRect())) |
| 99 return clipRect; | 100 return clipRect; |
| 100 | 101 |
| 101 LayoutPoint clippingRootOffset; | 102 LayoutPoint clippingRootOffset; |
| 102 m_layoutObject.layer()->convertToLayerCoords(clippingRootLayer, clippingRoot
Offset); | 103 m_layoutObject.layer()->convertToLayerCoords(clippingRootLayer, clippingRoot
Offset); |
| 103 clipRect.moveBy(-clippingRootOffset); | 104 clipRect.moveBy(-clippingRootOffset); |
| 104 | 105 |
| 105 return clipRect; | 106 return clipRect; |
| 106 } | 107 } |
| 107 | 108 |
| 108 void DeprecatedPaintLayerClipper::calculateRects(const ClipRectsContext& context
, const LayoutRect& paintDirtyRect, LayoutRect& layerBounds, | 109 void DeprecatedPaintLayerClipper::calculateRects(const ClipRectsContext& context
, const LayoutRect& paintDirtyRect, LayoutRect& layerBounds, |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 if (context.respectOverflowClip == IgnoreOverflowClip) | 447 if (context.respectOverflowClip == IgnoreOverflowClip) |
| 447 return false; | 448 return false; |
| 448 | 449 |
| 449 if (layer->isRootLayer() && context.respectOverflowClipForViewport == Ignore
OverflowClip) | 450 if (layer->isRootLayer() && context.respectOverflowClipForViewport == Ignore
OverflowClip) |
| 450 return false; | 451 return false; |
| 451 | 452 |
| 452 return true; | 453 return true; |
| 453 } | 454 } |
| 454 | 455 |
| 455 } // namespace blink | 456 } // namespace blink |
| OLD | NEW |