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

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

Issue 660793002: [New Multicolumn] Let updatePagination() do its job also when composited. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « LayoutTests/fast/multicol/composited-relpos-resize-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 466
467 if (renderer()->hasColumns()) 467 if (renderer()->hasColumns())
468 needsPaginationUpdate = true; 468 needsPaginationUpdate = true;
469 469
470 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) 470 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
471 child->updatePaginationRecursive(needsPaginationUpdate); 471 child->updatePaginationRecursive(needsPaginationUpdate);
472 } 472 }
473 473
474 void RenderLayer::updatePagination() 474 void RenderLayer::updatePagination()
475 { 475 {
476 if (compositingState() != NotComposited || !parent()) 476 bool regionBasedColumnsUsed = useRegionBasedColumns();
Julien - ping for review 2014/10/20 15:52:36 Style: boolean should have a conjugated verb in th
mstensho (USE GERRIT) 2014/10/20 18:54:31 Done.
477 return; // FIXME: We will have to deal with paginated compositing layers someday. 477 if ((!regionBasedColumnsUsed && compositingState() != NotComposited) || !par ent())
478 // FIXME: For now the RenderView can't be paginated. Eventually printing will move to a model where it is though. 478 return; // FIXME: For now the RenderView can't be paginated. Eventually printing will move to a model where it is though.
479 479
480 // The main difference between the paginated booleans for the old column cod e and the new column code 480 // The main difference between the paginated booleans for the old column cod e and the new column code
481 // is that each paginated layer has to paint on its own with the new code. T here is no 481 // is that each paginated layer has to paint on its own with the new code. T here is no
482 // recurring into child layers. This means that the m_isPaginated bits for t he new column code can't just be set on 482 // recurring into child layers. This means that the m_isPaginated bits for t he new column code can't just be set on
483 // "roots" that get split and paint all their descendants. Instead each laye r has to be checked individually and 483 // "roots" that get split and paint all their descendants. Instead each laye r has to be checked individually and
484 // genuinely know if it is going to have to split itself up when painting on ly its contents (and not any other descendant 484 // genuinely know if it is going to have to split itself up when painting on ly its contents (and not any other descendant
485 // layers). We track an enclosingPaginationLayer instead of using a simple b it, since we want to be able to get back 485 // layers). We track an enclosingPaginationLayer instead of using a simple b it, since we want to be able to get back
486 // to that layer easily. 486 // to that layer easily.
487 bool regionBasedColumnsUsed = useRegionBasedColumns();
488 if (regionBasedColumnsUsed && renderer()->isRenderFlowThread()) { 487 if (regionBasedColumnsUsed && renderer()->isRenderFlowThread()) {
489 m_enclosingPaginationLayer = this; 488 m_enclosingPaginationLayer = this;
490 return; 489 return;
491 } 490 }
492 491
493 if (m_stackingNode->isNormalFlowOnly()) { 492 if (m_stackingNode->isNormalFlowOnly()) {
494 if (regionBasedColumnsUsed) { 493 if (regionBasedColumnsUsed) {
495 // Content inside a transform is not considered to be paginated, sin ce we simply 494 // Content inside a transform is not considered to be paginated, sin ce we simply
496 // paint the transform multiple times in each column, so we don't ha ve to use 495 // paint the transform multiple times in each column, so we don't ha ve to use
497 // fragments for the transformed content. 496 // fragments for the transformed content.
(...skipping 2365 matching lines...) Expand 10 before | Expand all | Expand 10 after
2863 } 2862 }
2864 } 2863 }
2865 2864
2866 void showLayerTree(const blink::RenderObject* renderer) 2865 void showLayerTree(const blink::RenderObject* renderer)
2867 { 2866 {
2868 if (!renderer) 2867 if (!renderer)
2869 return; 2868 return;
2870 showLayerTree(renderer->enclosingLayer()); 2869 showLayerTree(renderer->enclosingLayer());
2871 } 2870 }
2872 #endif 2871 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/multicol/composited-relpos-resize-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698