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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 return clipRect; | 105 return clipRect; |
106 } | 106 } |
107 | 107 |
108 void DeprecatedPaintLayerClipper::calculateRects(const ClipRectsContext& context
, const LayoutRect& paintDirtyRect, LayoutRect& layerBounds, | 108 void DeprecatedPaintLayerClipper::calculateRects(const ClipRectsContext& context
, const LayoutRect& paintDirtyRect, LayoutRect& layerBounds, |
109 ClipRect& backgroundRect, ClipRect& foregroundRect, ClipRect& outlineRect, c
onst LayoutPoint* offsetFromRoot) const | 109 ClipRect& backgroundRect, ClipRect& foregroundRect, ClipRect& outlineRect, c
onst LayoutPoint* offsetFromRoot) const |
110 { | 110 { |
111 bool isClippingRoot = m_layoutObject.layer() == context.rootLayer; | 111 bool isClippingRoot = m_layoutObject.layer() == context.rootLayer; |
112 | 112 |
113 if (!isClippingRoot && m_layoutObject.layer()->parent()) { | 113 if (!isClippingRoot && m_layoutObject.layer()->parent()) { |
114 backgroundRect = backgroundClipRect(context); | 114 backgroundRect = backgroundClipRect(context); |
115 backgroundRect.move(roundedIntSize(context.subPixelAccumulation)); | 115 backgroundRect.move(context.subPixelAccumulation); |
116 backgroundRect.intersect(paintDirtyRect); | 116 backgroundRect.intersect(paintDirtyRect); |
117 } else { | 117 } else { |
118 backgroundRect = paintDirtyRect; | 118 backgroundRect = paintDirtyRect; |
119 } | 119 } |
120 | 120 |
121 foregroundRect = backgroundRect; | 121 foregroundRect = backgroundRect; |
122 outlineRect = backgroundRect; | 122 outlineRect = backgroundRect; |
123 | 123 |
124 LayoutPoint offset; | 124 LayoutPoint offset; |
125 if (offsetFromRoot) | 125 if (offsetFromRoot) |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 if (context.respectOverflowClip == IgnoreOverflowClip) | 446 if (context.respectOverflowClip == IgnoreOverflowClip) |
447 return false; | 447 return false; |
448 | 448 |
449 if (layer->isRootLayer() && context.respectOverflowClipForViewport == Ignore
OverflowClip) | 449 if (layer->isRootLayer() && context.respectOverflowClipForViewport == Ignore
OverflowClip) |
450 return false; | 450 return false; |
451 | 451 |
452 return true; | 452 return true; |
453 } | 453 } |
454 | 454 |
455 } // namespace blink | 455 } // namespace blink |
OLD | NEW |