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

Side by Side Diff: Source/core/layout/LayoutMultiColumnFlowThread.cpp

Issue 1025213002: Begin tracking why layout is invalidated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 insertBefore = firstMultiColumnBox(); 465 insertBefore = firstMultiColumnBox();
466 } else if (LayoutMultiColumnSpannerPlaceholder* previousPlac eholder = containingColumnSpannerPlaceholder(previousRenderer)) { 466 } else if (LayoutMultiColumnSpannerPlaceholder* previousPlac eholder = containingColumnSpannerPlaceholder(previousRenderer)) {
467 // Before us is another spanner. We belong right after i t then. 467 // Before us is another spanner. We belong right after i t then.
468 insertBefore = previousPlaceholder->nextSiblingMultiColu mnBox(); 468 insertBefore = previousPlaceholder->nextSiblingMultiColu mnBox();
469 } else { 469 } else {
470 // We're inside regular column content with both feet. F ind out which column 470 // We're inside regular column content with both feet. F ind out which column
471 // set this is. It needs to be split it into two sets, s o that we can insert 471 // set this is. It needs to be split it into two sets, s o that we can insert
472 // a new spanner placeholder between them. 472 // a new spanner placeholder between them.
473 setToSplit = findSetRendering(previousRenderer); 473 setToSplit = findSetRendering(previousRenderer);
474 ASSERT(setToSplit == findSetRendering(nextRenderer)); 474 ASSERT(setToSplit == findSetRendering(nextRenderer));
475 setToSplit->setNeedsLayoutAndFullPaintInvalidation(); 475 setToSplit->setNeedsLayoutAndFullPaintInvalidation(Layou tInvalidationReason::ColumnsChanged);
476 insertBefore = setToSplit->nextSiblingMultiColumnBox(); 476 insertBefore = setToSplit->nextSiblingMultiColumnBox();
477 // We've found out which set that needs to be split. Now proceed to 477 // We've found out which set that needs to be split. Now proceed to
478 // inserting the spanner placeholder, and then insert a second column set. 478 // inserting the spanner placeholder, and then insert a second column set.
479 } 479 }
480 } 480 }
481 ASSERT(setToSplit || insertBefore); 481 ASSERT(setToSplit || insertBefore);
482 } 482 }
483 createAndInsertSpannerPlaceholder(toLayoutBox(renderer), insertBefor e); 483 createAndInsertSpannerPlaceholder(toLayoutBox(renderer), insertBefor e);
484 if (setToSplit) 484 if (setToSplit)
485 createAndInsertMultiColumnSet(insertBefore); 485 createAndInsertMultiColumnSet(insertBefore);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 next = renderer->nextInPreOrder(descendant); 524 next = renderer->nextInPreOrder(descendant);
525 continue; 525 continue;
526 } 526 }
527 next = renderer->nextInPreOrderAfterChildren(descendant); // It's a span ner. Its children are of no interest to us. 527 next = renderer->nextInPreOrderAfterChildren(descendant); // It's a span ner. Its children are of no interest to us.
528 if (LayoutBox* nextColumnBox = placeholder->nextSiblingMultiColumnBox()) { 528 if (LayoutBox* nextColumnBox = placeholder->nextSiblingMultiColumnBox()) {
529 LayoutBox* previousColumnBox = placeholder->previousSiblingMultiColu mnBox(); 529 LayoutBox* previousColumnBox = placeholder->previousSiblingMultiColu mnBox();
530 if (nextColumnBox && nextColumnBox->isLayoutMultiColumnSet() 530 if (nextColumnBox && nextColumnBox->isLayoutMultiColumnSet()
531 && previousColumnBox && previousColumnBox->isLayoutMultiColumnSe t()) { 531 && previousColumnBox && previousColumnBox->isLayoutMultiColumnSe t()) {
532 // Need to merge two column sets. 532 // Need to merge two column sets.
533 nextColumnBox->destroy(); 533 nextColumnBox->destroy();
534 previousColumnBox->setNeedsLayout(); 534 previousColumnBox->setNeedsLayout(LayoutInvalidationReason::Unkn own);
esprehn 2015/03/23 20:19:44 ColumnsChanged
535 invalidateRegions(); 535 invalidateRegions();
536 } 536 }
537 } 537 }
538 placeholder->destroy(); 538 placeholder->destroy();
539 } 539 }
540 if (hadContainingPlaceholder) 540 if (hadContainingPlaceholder)
541 return; // We're only removing a spanner (or something inside one), whic h means that no column content will be removed. 541 return; // We're only removing a spanner (or something inside one), whic h means that no column content will be removed.
542 542
543 // Column content will be removed. Does this mean that we should destroy a c olumn set? 543 // Column content will be removed. Does this mean that we should destroy a c olumn set?
544 LayoutMultiColumnSpannerPlaceholder* adjacentPreviousSpannerPlaceholder = 0; 544 LayoutMultiColumnSpannerPlaceholder* adjacentPreviousSpannerPlaceholder = 0;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 } 663 }
664 664
665 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const 665 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const
666 { 666 {
667 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet()) 667 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet())
668 return columnSet->pageLogicalHeight(); 668 return columnSet->pageLogicalHeight();
669 return false; 669 return false;
670 } 670 }
671 671
672 } 672 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698