Commit ff7c8f86 authored by mstensho@opera.com's avatar mstensho@opera.com

[New Multicolumn] Let updatePagination() do its job also when composited.

Otherwise, layers inside multicol will become non-paginated if relaid out
after initial paint.

BUG=359877
R=jchaffraix@chromium.org

Review URL: https://codereview.chromium.org/660793002

git-svn-id: svn://svn.chromium.org/blink/trunk@184012 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent abf003b5
......@@ -1034,6 +1034,7 @@ crbug.com/350853 fast/multicol/change-block-child-height.html [ Skip ]
crbug.com/350853 fast/multicol/change-height.html [ Skip ]
crbug.com/408123 fast/multicol/composited-opacity-2nd-and-3rd-column.html [ Skip ]
crbug.com/408123 fast/multicol/composited-relpos-clipped.html [ Skip ]
crbug.com/408123 fast/multicol/composited-relpos-resize.html [ Skip ]
crbug.com/408123 fast/multicol/composited-relpos.html [ Skip ]
crbug.com/408123 fast/multicol/composited-with-child-layer-in-next-column.html [ Skip ]
crbug.com/350853 fast/multicol/content-change-same-height.html [ Skip ]
......
<!DOCTYPE html>
<p>There should be two yellow boxes below.</p>
<div style="width:90%; height:13em; line-height:2em;">
<div style="z-index:-1; position:absolute; left:0; right:0; height:15em; background:cyan;"></div>
<div style="float:left; width:50%; height:100%;">
<br>
<br>
<br>
<br>
<div style="position:relative; margin:0.5em; height:4.5em; background:yellow;">
first<br>
column<br>
</div>
</div>
<div style="float:left; width:50%; height:100%;">
<div style="position:relative; margin:0 0.5em; background:yellow;">
second<br>
column<br>
</div>
</div>
</div>
<!DOCTYPE html>
<p>There should be two yellow boxes below.</p>
<div id="elm" style="-webkit-columns:2; -webkit-column-gap:0; column-fill:auto; height:13em; line-height:2em;">
<div style="will-change:transform; position:absolute; left:0; right:0; height:15em; background:cyan;"></div>
<br>
<br>
<br>
<br>
<div style="position:relative; margin:0.5em; background:yellow;">
first<br>
column<br>
second<br>
column<br>
</div>
</div>
<script>
if (window.internals)
internals.forceCompositingUpdate(document);
document.getElementById('elm').style.width = '90%';
</script>
......@@ -473,9 +473,9 @@ void RenderLayer::updatePaginationRecursive(bool needsPaginationUpdate)
void RenderLayer::updatePagination()
{
if (compositingState() != NotComposited || !parent())
return; // FIXME: We will have to deal with paginated compositing layers someday.
// FIXME: For now the RenderView can't be paginated. Eventually printing will move to a model where it is though.
bool usesRegionBasedColumns = useRegionBasedColumns();
if ((!usesRegionBasedColumns && compositingState() != NotComposited) || !parent())
return; // FIXME: For now the RenderView can't be paginated. Eventually printing will move to a model where it is though.
// The main difference between the paginated booleans for the old column code and the new column code
// is that each paginated layer has to paint on its own with the new code. There is no
......@@ -484,14 +484,13 @@ void RenderLayer::updatePagination()
// genuinely know if it is going to have to split itself up when painting only its contents (and not any other descendant
// layers). We track an enclosingPaginationLayer instead of using a simple bit, since we want to be able to get back
// to that layer easily.
bool regionBasedColumnsUsed = useRegionBasedColumns();
if (regionBasedColumnsUsed && renderer()->isRenderFlowThread()) {
if (usesRegionBasedColumns && renderer()->isRenderFlowThread()) {
m_enclosingPaginationLayer = this;
return;
}
if (m_stackingNode->isNormalFlowOnly()) {
if (regionBasedColumnsUsed) {
if (usesRegionBasedColumns) {
// Content inside a transform is not considered to be paginated, since we simply
// paint the transform multiple times in each column, so we don't have to use
// fragments for the transformed content.
......@@ -506,7 +505,7 @@ void RenderLayer::updatePagination()
// For the new columns code, we want to walk up our containing block chain looking for an enclosing layer. Once
// we find one, then we just check its pagination status.
if (regionBasedColumnsUsed) {
if (usesRegionBasedColumns) {
RenderView* view = renderer()->view();
RenderBlock* containingBlock;
for (containingBlock = renderer()->containingBlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment