Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 625903004: [New Multicolumn] Correct paint rectangle calculation for compositing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Change the test so that the composited layers actually overlap. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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);
mstensho (USE GERRIT) 2014/10/06 14:52:58 This isn't really going to work right now (unless
mstensho (USE GERRIT) 2014/10/06 14:55:22 Done. With the latest patch, where I remove a hac
Julien - ping for review 2014/10/06 22:12:32 Could we add some visual testing for the second co
mstensho (USE GERRIT) 2014/10/07 14:55:35 Done. But then I had to fix even more. :-P It tur
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698