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 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1438 // TODO(chadarmstrong): If possible, this code should use the cache (one
way would be by computing the root layer relative to |clipRectsCacheSlot|). | 1438 // TODO(chadarmstrong): If possible, this code should use the cache (one
way would be by computing the root layer relative to |clipRectsCacheSlot|). |
1439 ClipRectsContext clipRectsContext(ancestorLayer, UncachedClipRects, inOv
erlayScrollbarSizeRelevancy); | 1439 ClipRectsContext clipRectsContext(ancestorLayer, UncachedClipRects, inOv
erlayScrollbarSizeRelevancy); |
1440 if (respectOverflowClip == IgnoreOverflowClip) | 1440 if (respectOverflowClip == IgnoreOverflowClip) |
1441 clipRectsContext.setIgnoreOverflowClip(); | 1441 clipRectsContext.setIgnoreOverflowClip(); |
1442 ancestorClipRect = enclosingPaginationLayer()->clipper().backgroundClipR
ect(clipRectsContext); | 1442 ancestorClipRect = enclosingPaginationLayer()->clipper().backgroundClipR
ect(clipRectsContext); |
1443 if (rootLayerIsInsidePaginationLayer) | 1443 if (rootLayerIsInsidePaginationLayer) |
1444 ancestorClipRect.moveBy(-rootLayer->visualOffsetFromAncestor(ancesto
rLayer)); | 1444 ancestorClipRect.moveBy(-rootLayer->visualOffsetFromAncestor(ancesto
rLayer)); |
1445 ancestorClipRect.intersect(dirtyRect); | 1445 ancestorClipRect.intersect(dirtyRect); |
1446 } | 1446 } |
1447 | 1447 |
1448 const LayoutSize subPixelAccumulationIfNeeded = compositingState() == Paints
IntoOwnBacking ? LayoutSize() : subPixelAccumulation; | 1448 const LayoutSize subPixelAccumulationIfNeeded = offsetFromRoot ? subPixelAcc
umulation : LayoutSize(); |
1449 for (size_t i = 0; i < fragments.size(); ++i) { | 1449 for (size_t i = 0; i < fragments.size(); ++i) { |
1450 DeprecatedPaintLayerFragment& fragment = fragments.at(i); | 1450 DeprecatedPaintLayerFragment& fragment = fragments.at(i); |
1451 | 1451 |
1452 // Set our four rects with all clipping applied that was internal to the
flow thread. | 1452 // Set our four rects with all clipping applied that was internal to the
flow thread. |
1453 fragment.setRects(layerBoundsInFlowThread, backgroundRectInFlowThread, f
oregroundRectInFlowThread, outlineRectInFlowThread); | 1453 fragment.setRects(layerBoundsInFlowThread, backgroundRectInFlowThread, f
oregroundRectInFlowThread, outlineRectInFlowThread); |
1454 | 1454 |
1455 // Shift to the root-relative physical position used when painting the f
low thread in this fragment. | 1455 // Shift to the root-relative physical position used when painting the f
low thread in this fragment. |
1456 fragment.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromR
oot + subPixelAccumulationIfNeeded); | 1456 fragment.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromR
oot + subPixelAccumulationIfNeeded); |
1457 | 1457 |
1458 // Intersect the fragment with our ancestor's background clip so that e.
g., columns in an overflow:hidden block are | 1458 // Intersect the fragment with our ancestor's background clip so that e.
g., columns in an overflow:hidden block are |
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2671 | 2671 |
2672 void showLayerTree(const blink::LayoutObject* layoutObject) | 2672 void showLayerTree(const blink::LayoutObject* layoutObject) |
2673 { | 2673 { |
2674 if (!layoutObject) { | 2674 if (!layoutObject) { |
2675 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2675 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
2676 return; | 2676 return; |
2677 } | 2677 } |
2678 showLayerTree(layoutObject->enclosingLayer()); | 2678 showLayerTree(layoutObject->enclosingLayer()); |
2679 } | 2679 } |
2680 #endif | 2680 #endif |
OLD | NEW |