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

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

Issue 1602773005: Respect break-inside:avoid on table rows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 4 years, 7 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 447
448 Position positionForBox(InlineBox*, bool start = true) const; 448 Position positionForBox(InlineBox*, bool start = true) const;
449 PositionWithAffinity positionForPointWithInlineChildren(const LayoutPoint&); 449 PositionWithAffinity positionForPointWithInlineChildren(const LayoutPoint&);
450 450
451 // End helper functions and structs used by layoutBlockChildren. 451 // End helper functions and structs used by layoutBlockChildren.
452 452
453 void removeFromGlobalMaps(); 453 void removeFromGlobalMaps();
454 bool widthAvailableToChildrenHasChanged(); 454 bool widthAvailableToChildrenHasChanged();
455 455
456 public: 456 public:
457 // Specify which page or column to associate with an offset, if said offset is exactly at a page
458 // or column boundary.
459 enum PageBoundaryRule { AssociateWithFormerPage, AssociateWithLatterPage };
460
461 LayoutUnit pageLogicalHeightForOffset(LayoutUnit) const;
462 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule) const;
463
464 // Calculate the strut to insert in order fit content of size |contentLogica lHeight|.
465 // |strutToNextPage| is the strut to add to |offset| to merely get to the to p of the next page
466 // or column. This is what will be returned if the content can actually fit there. Otherwise,
467 // return the distance to the next fragmentainer that can fit this piece of content.
468 LayoutUnit calculatePaginationStrutToFitContent(LayoutUnit offset, LayoutUni t strutToNextPage, LayoutUnit contentLogicalHeight) const;
469
470 static void collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock* ch ild); 457 static void collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock* ch ild);
471 protected: 458 protected:
472 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL ogicalHeightForOffset(logicalOffset); } 459 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL ogicalHeightForOffset(logicalOffset); }
473 460
474 // Returns the logical offset at the top of the next page, for a given offse t. 461 // Returns the logical offset at the top of the next page, for a given offse t.
475 // 462 //
476 // If the given offset is at a page boundary, using AssociateWithLatterPage as PageBoundaryRule 463 // If the given offset is at a page boundary, using AssociateWithLatterPage as PageBoundaryRule
477 // will move us one page ahead (since the offset is at the top of the "curre nt" page). Using 464 // will move us one page ahead (since the offset is at the top of the "curre nt" page). Using
478 // AssociateWithFormerPage instead will keep us where we are (since the offs et is at the bottom 465 // AssociateWithFormerPage instead will keep us where we are (since the offs et is at the bottom
479 // of the "current" page, which is exactly the same offset as the top offset on the next page). 466 // of the "current" page, which is exactly the same offset as the top offset on the next page).
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 // FIXME: This is temporary as we move code that accesses block flow 505 // FIXME: This is temporary as we move code that accesses block flow
519 // member variables out of LayoutBlock and into LayoutBlockFlow. 506 // member variables out of LayoutBlock and into LayoutBlockFlow.
520 friend class LayoutBlockFlow; 507 friend class LayoutBlockFlow;
521 }; 508 };
522 509
523 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); 510 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock());
524 511
525 } // namespace blink 512 } // namespace blink
526 513
527 #endif // LayoutBlock_h 514 #endif // LayoutBlock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698