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 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1614 const DeprecatedPaintLayer* ancestorLayer = rootLayerIsInsidePaginationL
ayer ? paginationParentLayer : rootLayer; | 1614 const DeprecatedPaintLayer* ancestorLayer = rootLayerIsInsidePaginationL
ayer ? paginationParentLayer : rootLayer; |
1615 ClipRectsContext clipRectsContext(ancestorLayer, clipRectsCacheSlot, inO
verlayScrollbarSizeRelevancy); | 1615 ClipRectsContext clipRectsContext(ancestorLayer, clipRectsCacheSlot, inO
verlayScrollbarSizeRelevancy); |
1616 if (respectOverflowClip == IgnoreOverflowClip) | 1616 if (respectOverflowClip == IgnoreOverflowClip) |
1617 clipRectsContext.setIgnoreOverflowClip(); | 1617 clipRectsContext.setIgnoreOverflowClip(); |
1618 ancestorClipRect = enclosingPaginationLayer()->clipper().backgroundClipR
ect(clipRectsContext); | 1618 ancestorClipRect = enclosingPaginationLayer()->clipper().backgroundClipR
ect(clipRectsContext); |
1619 if (rootLayerIsInsidePaginationLayer) | 1619 if (rootLayerIsInsidePaginationLayer) |
1620 ancestorClipRect.moveBy(-rootLayer->visualOffsetFromAncestor(ancesto
rLayer)); | 1620 ancestorClipRect.moveBy(-rootLayer->visualOffsetFromAncestor(ancesto
rLayer)); |
1621 ancestorClipRect.intersect(dirtyRect); | 1621 ancestorClipRect.intersect(dirtyRect); |
1622 } | 1622 } |
1623 | 1623 |
| 1624 const LayoutSize subPixelAccumulationIfNeeded = compositingState() == Paints
IntoOwnBacking ? LayoutSize() : subPixelAccumulation; |
1624 for (size_t i = 0; i < fragments.size(); ++i) { | 1625 for (size_t i = 0; i < fragments.size(); ++i) { |
1625 DeprecatedPaintLayerFragment& fragment = fragments.at(i); | 1626 DeprecatedPaintLayerFragment& fragment = fragments.at(i); |
1626 | 1627 |
1627 // Set our four rects with all clipping applied that was internal to the
flow thread. | 1628 // Set our four rects with all clipping applied that was internal to the
flow thread. |
1628 fragment.setRects(layerBoundsInFlowThread, backgroundRectInFlowThread, f
oregroundRectInFlowThread, outlineRectInFlowThread); | 1629 fragment.setRects(layerBoundsInFlowThread, backgroundRectInFlowThread, f
oregroundRectInFlowThread, outlineRectInFlowThread); |
1629 | 1630 |
1630 // Shift to the root-relative physical position used when painting the f
low thread in this fragment. | 1631 // Shift to the root-relative physical position used when painting the f
low thread in this fragment. |
1631 fragment.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromR
oot); | 1632 fragment.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromR
oot + subPixelAccumulationIfNeeded); |
1632 | 1633 |
1633 // Intersect the fragment with our ancestor's background clip so that e.
g., columns in an overflow:hidden block are | 1634 // Intersect the fragment with our ancestor's background clip so that e.
g., columns in an overflow:hidden block are |
1634 // properly clipped by the overflow. | 1635 // properly clipped by the overflow. |
1635 fragment.intersect(ancestorClipRect.rect()); | 1636 fragment.intersect(ancestorClipRect.rect()); |
1636 | 1637 |
1637 // Now intersect with our pagination clip. This will typically mean we'r
e just intersecting the dirty rect with the column | 1638 // Now intersect with our pagination clip. This will typically mean we'r
e just intersecting the dirty rect with the column |
1638 // clip, so the column clip ends up being all we apply. | 1639 // clip, so the column clip ends up being all we apply. |
1639 fragment.intersect(fragment.paginationClip); | 1640 fragment.intersect(fragment.paginationClip); |
1640 } | 1641 } |
1641 } | 1642 } |
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2963 } | 2964 } |
2964 } | 2965 } |
2965 | 2966 |
2966 void showLayerTree(const blink::LayoutObject* renderer) | 2967 void showLayerTree(const blink::LayoutObject* renderer) |
2967 { | 2968 { |
2968 if (!renderer) | 2969 if (!renderer) |
2969 return; | 2970 return; |
2970 showLayerTree(renderer->enclosingLayer()); | 2971 showLayerTree(renderer->enclosingLayer()); |
2971 } | 2972 } |
2972 #endif | 2973 #endif |
OLD | NEW |