| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 destinationPropertyTreeState.setClip(ancestorOverflowClip); | 420 destinationPropertyTreeState.setClip(ancestorOverflowClip); |
| 421 } | 421 } |
| 422 | 422 |
| 423 // The background rect applies all clips *above* m_layer, but not the overflow | 423 // The background rect applies all clips *above* m_layer, but not the overflow |
| 424 // clip of m_layer. It also applies a clip to the total painting bounds | 424 // clip of m_layer. It also applies a clip to the total painting bounds |
| 425 // of m_layer, because nothing in m_layer or its children within the clip can | 425 // of m_layer, because nothing in m_layer or its children within the clip can |
| 426 // paint outside of those bounds. | 426 // paint outside of those bounds. |
| 427 // The total painting bounds includes any visual overflow (such as shadow) and | 427 // The total painting bounds includes any visual overflow (such as shadow) and |
| 428 // filter bounds. | 428 // filter bounds. |
| 429 if (shouldClipOverflow(context)) { | 429 if (shouldClipOverflow(context)) { |
| 430 FloatRect clipRect(localVisualRect()); | 430 FloatClipRect clipRect((FloatRect(localVisualRect()))); |
| 431 clipRect.moveBy(FloatPoint(m_layer.layoutObject().paintOffset())); | 431 clipRect.moveBy(FloatPoint(m_layer.layoutObject().paintOffset())); |
| 432 GeometryMapper::sourceToDestinationVisualRect( | 432 GeometryMapper::sourceToDestinationVisualRect( |
| 433 sourcePropertyTreeState, destinationPropertyTreeState, clipRect); | 433 sourcePropertyTreeState, destinationPropertyTreeState, clipRect); |
| 434 output.setRect(FloatClipRect(clipRect)); | 434 output.setRect(clipRect); |
| 435 } else { | 435 } else { |
| 436 const FloatClipRect& clippedRectInRootLayerSpace = | 436 const FloatClipRect& clippedRectInRootLayerSpace = |
| 437 GeometryMapper::sourceToDestinationClipRect( | 437 GeometryMapper::sourceToDestinationClipRect( |
| 438 sourcePropertyTreeState, destinationPropertyTreeState); | 438 sourcePropertyTreeState, destinationPropertyTreeState); |
| 439 output.setRect(clippedRectInRootLayerSpace); | 439 output.setRect(clippedRectInRootLayerSpace); |
| 440 } | 440 } |
| 441 | 441 |
| 442 output.moveBy(-context.rootLayer->layoutObject().paintOffset()); | 442 output.moveBy(-context.rootLayer->layoutObject().paintOffset()); |
| 443 } | 443 } |
| 444 | 444 |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 DCHECK(!m_useGeometryMapper); | 612 DCHECK(!m_useGeometryMapper); |
| 613 ClipRectsContext context(rootLayer, PaintingClipRects, | 613 ClipRectsContext context(rootLayer, PaintingClipRects, |
| 614 IgnorePlatformOverlayScrollbarSize, | 614 IgnorePlatformOverlayScrollbarSize, |
| 615 subpixelAccumulation); | 615 subpixelAccumulation); |
| 616 if (respectOverflowClip == IgnoreOverflowClip) | 616 if (respectOverflowClip == IgnoreOverflowClip) |
| 617 context.setIgnoreOverflowClip(); | 617 context.setIgnoreOverflowClip(); |
| 618 return getClipRects(context); | 618 return getClipRects(context); |
| 619 } | 619 } |
| 620 | 620 |
| 621 } // namespace blink | 621 } // namespace blink |
| OLD | NEW |