Chromium Code Reviews| 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 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1620 const Layer* ancestorLayer = rootLayerIsInsidePaginationLayer ? paginati onParentLayer : rootLayer; | 1620 const Layer* ancestorLayer = rootLayerIsInsidePaginationLayer ? paginati onParentLayer : rootLayer; |
| 1621 ClipRectsContext clipRectsContext(ancestorLayer, clipRectsCacheSlot, inO verlayScrollbarSizeRelevancy); | 1621 ClipRectsContext clipRectsContext(ancestorLayer, clipRectsCacheSlot, inO verlayScrollbarSizeRelevancy); |
| 1622 if (respectOverflowClip == IgnoreOverflowClip) | 1622 if (respectOverflowClip == IgnoreOverflowClip) |
| 1623 clipRectsContext.setIgnoreOverflowClip(); | 1623 clipRectsContext.setIgnoreOverflowClip(); |
| 1624 ancestorClipRect = enclosingPaginationLayer()->clipper().backgroundClipR ect(clipRectsContext); | 1624 ancestorClipRect = enclosingPaginationLayer()->clipper().backgroundClipR ect(clipRectsContext); |
| 1625 if (rootLayerIsInsidePaginationLayer) | 1625 if (rootLayerIsInsidePaginationLayer) |
| 1626 ancestorClipRect.moveBy(-rootLayer->visualOffsetFromAncestor(ancesto rLayer)); | 1626 ancestorClipRect.moveBy(-rootLayer->visualOffsetFromAncestor(ancesto rLayer)); |
| 1627 ancestorClipRect.intersect(dirtyRect); | 1627 ancestorClipRect.intersect(dirtyRect); |
| 1628 } | 1628 } |
| 1629 | 1629 |
| 1630 const LayoutSize subPixelAccumulationIfNeeded = compositingState() == Paints IntoOwnBacking ? LayoutSize() : subPixelAccumulation; | |
| 1630 for (size_t i = 0; i < fragments.size(); ++i) { | 1631 for (size_t i = 0; i < fragments.size(); ++i) { |
| 1631 LayerFragment& fragment = fragments.at(i); | 1632 LayerFragment& fragment = fragments.at(i); |
| 1632 | 1633 |
| 1633 // Set our four rects with all clipping applied that was internal to the flow thread. | 1634 // Set our four rects with all clipping applied that was internal to the flow thread. |
| 1634 fragment.setRects(layerBoundsInFlowThread, backgroundRectInFlowThread, f oregroundRectInFlowThread, outlineRectInFlowThread); | 1635 fragment.setRects(layerBoundsInFlowThread, backgroundRectInFlowThread, f oregroundRectInFlowThread, outlineRectInFlowThread); |
| 1635 | 1636 |
| 1636 // Shift to the root-relative physical position used when painting the f low thread in this fragment. | 1637 // Shift to the root-relative physical position used when painting the f low thread in this fragment. |
| 1637 fragment.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromR oot); | 1638 fragment.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromR oot + subPixelAccumulationIfNeeded); |
|
esprehn
2015/03/24 23:13:23
extra space
qiankun
2015/03/26 11:06:25
Done.
| |
| 1638 | 1639 |
| 1639 // Intersect the fragment with our ancestor's background clip so that e. g., columns in an overflow:hidden block are | 1640 // Intersect the fragment with our ancestor's background clip so that e. g., columns in an overflow:hidden block are |
| 1640 // properly clipped by the overflow. | 1641 // properly clipped by the overflow. |
| 1641 fragment.intersect(ancestorClipRect.rect()); | 1642 fragment.intersect(ancestorClipRect.rect()); |
| 1642 | 1643 |
| 1643 // Now intersect with our pagination clip. This will typically mean we'r e just intersecting the dirty rect with the column | 1644 // Now intersect with our pagination clip. This will typically mean we'r e just intersecting the dirty rect with the column |
| 1644 // clip, so the column clip ends up being all we apply. | 1645 // clip, so the column clip ends up being all we apply. |
| 1645 fragment.intersect(fragment.paginationClip); | 1646 fragment.intersect(fragment.paginationClip); |
| 1646 } | 1647 } |
| 1647 } | 1648 } |
| (...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2952 } | 2953 } |
| 2953 } | 2954 } |
| 2954 | 2955 |
| 2955 void showLayerTree(const blink::LayoutObject* renderer) | 2956 void showLayerTree(const blink::LayoutObject* renderer) |
| 2956 { | 2957 { |
| 2957 if (!renderer) | 2958 if (!renderer) |
| 2958 return; | 2959 return; |
| 2959 showLayerTree(renderer->enclosingLayer()); | 2960 showLayerTree(renderer->enclosingLayer()); |
| 2960 } | 2961 } |
| 2961 #endif | 2962 #endif |
| OLD | NEW |