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 LayoutSize subPixelAccumulationIfNeeded; | |
1631 if (isAllowedToQueryCompositingState()) | |
qiankun
2015/03/10 10:13:16
Check isAllowedToQueryCompositingState() to make s
leviw_travelin_and_unemployed
2015/03/10 17:55:51
This isn't the right fix.
I talked to chrishtr an
| |
1632 subPixelAccumulationIfNeeded = compositingState() == PaintsIntoOwnBackin g ? LayoutSize() : subPixelAccumulation; | |
1633 else | |
1634 subPixelAccumulationIfNeeded = LayoutSize(); | |
1630 for (size_t i = 0; i < fragments.size(); ++i) { | 1635 for (size_t i = 0; i < fragments.size(); ++i) { |
1631 LayerFragment& fragment = fragments.at(i); | 1636 LayerFragment& fragment = fragments.at(i); |
1632 | 1637 |
1633 // Set our four rects with all clipping applied that was internal to the flow thread. | 1638 // Set our four rects with all clipping applied that was internal to the flow thread. |
1634 fragment.setRects(layerBoundsInFlowThread, backgroundRectInFlowThread, f oregroundRectInFlowThread, outlineRectInFlowThread); | 1639 fragment.setRects(layerBoundsInFlowThread, backgroundRectInFlowThread, f oregroundRectInFlowThread, outlineRectInFlowThread); |
1635 | 1640 |
1636 // Shift to the root-relative physical position used when painting the f low thread in this fragment. | 1641 // Shift to the root-relative physical position used when painting the f low thread in this fragment. |
1637 fragment.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromR oot); | 1642 fragment.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromR oot + subPixelAccumulationIfNeeded); |
1638 | 1643 |
1639 // Intersect the fragment with our ancestor's background clip so that e. g., columns in an overflow:hidden block are | 1644 // 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. | 1645 // properly clipped by the overflow. |
1641 fragment.intersect(ancestorClipRect.rect()); | 1646 fragment.intersect(ancestorClipRect.rect()); |
1642 | 1647 |
1643 // Now intersect with our pagination clip. This will typically mean we'r e just intersecting the dirty rect with the column | 1648 // 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. | 1649 // clip, so the column clip ends up being all we apply. |
1645 fragment.intersect(fragment.paginationClip); | 1650 fragment.intersect(fragment.paginationClip); |
1646 } | 1651 } |
1647 } | 1652 } |
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2952 } | 2957 } |
2953 } | 2958 } |
2954 | 2959 |
2955 void showLayerTree(const blink::LayoutObject* renderer) | 2960 void showLayerTree(const blink::LayoutObject* renderer) |
2956 { | 2961 { |
2957 if (!renderer) | 2962 if (!renderer) |
2958 return; | 2963 return; |
2959 showLayerTree(renderer->enclosingLayer()); | 2964 showLayerTree(renderer->enclosingLayer()); |
2960 } | 2965 } |
2961 #endif | 2966 #endif |
OLD | NEW |