| 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 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1484 ClipRect outlineRectInFlowThread; | 1484 ClipRect outlineRectInFlowThread; |
| 1485 clipper().calculateRects(paginationClipRectsContext, PaintInfo::infiniteRect
(), layerBoundsInFlowThread, backgroundRectInFlowThread, foregroundRectInFlowThr
ead, | 1485 clipper().calculateRects(paginationClipRectsContext, PaintInfo::infiniteRect
(), layerBoundsInFlowThread, backgroundRectInFlowThread, foregroundRectInFlowThr
ead, |
| 1486 outlineRectInFlowThread, &offsetWithinPaginatedLayer); | 1486 outlineRectInFlowThread, &offsetWithinPaginatedLayer); |
| 1487 | 1487 |
| 1488 // Take our bounding box within the flow thread and clip it. | 1488 // Take our bounding box within the flow thread and clip it. |
| 1489 LayoutRect layerBoundingBoxInFlowThread = layerBoundingBox ? *layerBoundingB
ox : physicalBoundingBox(enclosingPaginationLayer(), &offsetWithinPaginatedLayer
); | 1489 LayoutRect layerBoundingBoxInFlowThread = layerBoundingBox ? *layerBoundingB
ox : physicalBoundingBox(enclosingPaginationLayer(), &offsetWithinPaginatedLayer
); |
| 1490 layerBoundingBoxInFlowThread.intersect(backgroundRectInFlowThread.rect()); | 1490 layerBoundingBoxInFlowThread.intersect(backgroundRectInFlowThread.rect()); |
| 1491 | 1491 |
| 1492 // Shift the dirty rect into flow thread coordinates. | 1492 // Shift the dirty rect into flow thread coordinates. |
| 1493 LayoutPoint offsetOfPaginationLayerFromRoot; | 1493 LayoutPoint offsetOfPaginationLayerFromRoot; |
| 1494 enclosingPaginationLayer()->convertToLayerCoords(rootLayer, offsetOfPaginati
onLayerFromRoot); | 1494 if (rootLayer != enclosingPaginationLayer() && rootLayer->enclosingPaginatio
nLayer() == enclosingPaginationLayer()) { |
| 1495 // The root layer is inside our pagination layer. |
| 1496 // FIXME: more work needed if there are nested pagination layers. |
| 1497 rootLayer->convertToLayerCoords(enclosingPaginationLayer(), offsetOfPagi
nationLayerFromRoot); |
| 1498 offsetOfPaginationLayerFromRoot = -offsetOfPaginationLayerFromRoot; |
| 1499 } else { |
| 1500 enclosingPaginationLayer()->convertToLayerCoords(rootLayer, offsetOfPagi
nationLayerFromRoot); |
| 1501 } |
| 1495 LayoutRect dirtyRectInFlowThread(dirtyRect); | 1502 LayoutRect dirtyRectInFlowThread(dirtyRect); |
| 1496 dirtyRectInFlowThread.moveBy(-offsetOfPaginationLayerFromRoot); | 1503 dirtyRectInFlowThread.moveBy(-offsetOfPaginationLayerFromRoot); |
| 1497 | 1504 |
| 1498 // Tell the flow thread to collect the fragments. We pass enough information
to create a minimal number of fragments based off the pages/columns | 1505 // Tell the flow thread to collect the fragments. We pass enough information
to create a minimal number of fragments based off the pages/columns |
| 1499 // that intersect the actual dirtyRect as well as the pages/columns that int
ersect our layer's bounding box. | 1506 // that intersect the actual dirtyRect as well as the pages/columns that int
ersect our layer's bounding box. |
| 1500 RenderFlowThread* enclosingFlowThread = toRenderFlowThread(enclosingPaginati
onLayer()->renderer()); | 1507 RenderFlowThread* enclosingFlowThread = toRenderFlowThread(enclosingPaginati
onLayer()->renderer()); |
| 1501 enclosingFlowThread->collectLayerFragments(fragments, layerBoundingBoxInFlow
Thread, dirtyRectInFlowThread); | 1508 enclosingFlowThread->collectLayerFragments(fragments, layerBoundingBoxInFlow
Thread, dirtyRectInFlowThread); |
| 1502 | 1509 |
| 1503 if (fragments.isEmpty()) | 1510 if (fragments.isEmpty()) |
| 1504 return; | 1511 return; |
| (...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2851 } | 2858 } |
| 2852 } | 2859 } |
| 2853 | 2860 |
| 2854 void showLayerTree(const blink::RenderObject* renderer) | 2861 void showLayerTree(const blink::RenderObject* renderer) |
| 2855 { | 2862 { |
| 2856 if (!renderer) | 2863 if (!renderer) |
| 2857 return; | 2864 return; |
| 2858 showLayerTree(renderer->enclosingLayer()); | 2865 showLayerTree(renderer->enclosingLayer()); |
| 2859 } | 2866 } |
| 2860 #endif | 2867 #endif |
| OLD | NEW |