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

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

Issue 1759853003: Merge contiguous anonymous blocks after removing a float or out-of-pos-element between them (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@585604-4
Patch Set: Created 4 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
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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const; 449 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const;
450 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule) const; 450 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule) const;
451 451
452 // Calculate the strut to insert in order fit content of size |contentLogica lHeight|. 452 // Calculate the strut to insert in order fit content of size |contentLogica lHeight|.
453 // |strutToNextPage| is the strut to add to |offset| to merely get to the to p of the next page 453 // |strutToNextPage| is the strut to add to |offset| to merely get to the to p of the next page
454 // or column. This is what will be returned if the content can actually fit there. Otherwise, 454 // or column. This is what will be returned if the content can actually fit there. Otherwise,
455 // return the distance to the next fragmentainer that can fit this piece of content. 455 // return the distance to the next fragmentainer that can fit this piece of content.
456 LayoutUnit calculatePaginationStrutToFitContent(LayoutUnit offset, LayoutUni t strutToNextPage, LayoutUnit contentLogicalHeight) const; 456 LayoutUnit calculatePaginationStrutToFitContent(LayoutUnit offset, LayoutUni t strutToNextPage, LayoutUnit contentLogicalHeight) const;
457 457
458 static void collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock* ch ild); 458 static void collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock* ch ild);
459 void collapseAnonymousBlockChildAfterMerge(LayoutObject* prev, LayoutObject* next, bool canMergeAnonymousBlocks);
mstensho (USE GERRIT) 2016/03/04 08:46:24 Please add a blank line before "protected:"
459 protected: 460 protected:
460 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL ogicalHeightForOffset(logicalOffset); } 461 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL ogicalHeightForOffset(logicalOffset); }
461 462
462 // Returns the logical offset at the top of the next page, for a given offse t. 463 // Returns the logical offset at the top of the next page, for a given offse t.
463 // 464 //
464 // If the given offset is at a page boundary, using AssociateWithLatterPage as PageBoundaryRule 465 // If the given offset is at a page boundary, using AssociateWithLatterPage as PageBoundaryRule
465 // will move us one page ahead (since the offset is at the top of the "curre nt" page). Using 466 // will move us one page ahead (since the offset is at the top of the "curre nt" page). Using
466 // AssociateWithFormerPage instead will keep us where we are (since the offs et is at the bottom 467 // AssociateWithFormerPage instead will keep us where we are (since the offs et is at the bottom
467 // of the "current" page, which is exactly the same offset as the top offset on the next page). 468 // of the "current" page, which is exactly the same offset as the top offset on the next page).
468 // 469 //
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 // FIXME: This is temporary as we move code that accesses block flow 507 // FIXME: This is temporary as we move code that accesses block flow
507 // member variables out of LayoutBlock and into LayoutBlockFlow. 508 // member variables out of LayoutBlock and into LayoutBlockFlow.
508 friend class LayoutBlockFlow; 509 friend class LayoutBlockFlow;
509 }; 510 };
510 511
511 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); 512 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock());
512 513
513 } // namespace blink 514 } // namespace blink
514 515
515 #endif // LayoutBlock_h 516 #endif // LayoutBlock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698