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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlock.h

Issue 1399493002: Column balancing refactoring. Don't propagate data during layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more code review Created 5 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 // will move us one page ahead (since the offset is at the top of the "curre nt" page). Using 439 // will move us one page ahead (since the offset is at the top of the "curre nt" page). Using
440 // AssociateWithFormerPage instead will keep us where we are (since the offs et is at the bottom 440 // AssociateWithFormerPage instead will keep us where we are (since the offs et is at the bottom
441 // of the "current" page, which is exactly the same offset as the top offset on the next page). 441 // of the "current" page, which is exactly the same offset as the top offset on the next page).
442 // 442 //
443 // For a page height of 800px, AssociateWithLatterPage will return 1600 if t he value passed in 443 // For a page height of 800px, AssociateWithLatterPage will return 1600 if t he value passed in
444 // is 800. AssociateWithFormerPage will simply return 800. 444 // is 800. AssociateWithFormerPage will simply return 800.
445 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule) co nst; 445 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule) co nst;
446 446
447 bool createsNewFormattingContext() const; 447 bool createsNewFormattingContext() const;
448 448
449 // A page break is required at some offset due to space shortage in the curr ent fragmentainer. 449 // Paginated content inside this block was laid out.
450 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage); 450 // |logicalTopOffsetAfterPagination| is the logical top offset of the child content after
451 // applying any forced or unforced break, if needed.
452 void paginatedContentWasLaidOut(LayoutUnit logicalTopOffsetAfterPagination);
451 453
452 // Update minimum page height required to avoid fragmentation where it shoul dn't occur (inside 454 // Update minimum page height required to avoid fragmentation where it shoul dn't occur (inside
453 // unbreakable content, between orphans and widows, etc.). This will be used as a hint to the 455 // unbreakable content, between orphans and widows, etc.). This will be used as a hint to the
454 // column balancer to help set a good minimum column height. 456 // column balancer to help set a good minimum column height.
455 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight); 457 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight);
456 458
457 // Adjust from painting offsets to the local coords of this layoutObject 459 // Adjust from painting offsets to the local coords of this layoutObject
458 void offsetForContents(LayoutPoint&) const; 460 void offsetForContents(LayoutPoint&) const;
459 461
460 virtual bool updateLogicalWidthAndColumnWidth(); 462 virtual bool updateLogicalWidthAndColumnWidth();
(...skipping 21 matching lines...) Expand all
482 // FIXME: This is temporary as we move code that accesses block flow 484 // FIXME: This is temporary as we move code that accesses block flow
483 // member variables out of LayoutBlock and into LayoutBlockFlow. 485 // member variables out of LayoutBlock and into LayoutBlockFlow.
484 friend class LayoutBlockFlow; 486 friend class LayoutBlockFlow;
485 }; 487 };
486 488
487 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); 489 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock());
488 490
489 } // namespace blink 491 } // namespace blink
490 492
491 #endif // LayoutBlock_h 493 #endif // LayoutBlock_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ColumnBalancer.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698