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

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

Issue 1421423003: Require spanners to have the multicol container as their nearest block formatting context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test for bug 529737 Created 5 years, 1 month 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 LayoutObjectChildList* children() { return &m_children; } 125 LayoutObjectChildList* children() { return &m_children; }
126 126
127 bool beingDestroyed() const { return m_beingDestroyed; } 127 bool beingDestroyed() const { return m_beingDestroyed; }
128 128
129 // These two functions are overridden for inline-block. 129 // These two functions are overridden for inline-block.
130 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const final; 130 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const final;
131 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo sitionMode = PositionOnContainingLine) const override; 131 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo sitionMode = PositionOnContainingLine) const override;
132 132
133 LayoutUnit minLineHeightForReplacedObject(bool isFirstLine, LayoutUnit repla cedHeight) const; 133 LayoutUnit minLineHeightForReplacedObject(bool isFirstLine, LayoutUnit repla cedHeight) const;
134 134
135 bool createsNewFormattingContext() const;
136
135 const LineBoxList& lineBoxes() const { return m_lineBoxes; } 137 const LineBoxList& lineBoxes() const { return m_lineBoxes; }
136 LineBoxList* lineBoxes() { return &m_lineBoxes; } 138 LineBoxList* lineBoxes() { return &m_lineBoxes; }
137 139
138 const char* name() const override; 140 const char* name() const override;
139 141
140 protected: 142 protected:
141 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } 143 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); }
142 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } 144 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); }
143 145
144 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir stLineBox()); } 146 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir stLineBox()); }
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 // 443 //
442 // If the given offset is at a page boundary, using AssociateWithLatterPage as PageBoundaryRule 444 // If the given offset is at a page boundary, using AssociateWithLatterPage as PageBoundaryRule
443 // will move us one page ahead (since the offset is at the top of the "curre nt" page). Using 445 // will move us one page ahead (since the offset is at the top of the "curre nt" page). Using
444 // AssociateWithFormerPage instead will keep us where we are (since the offs et is at the bottom 446 // AssociateWithFormerPage instead will keep us where we are (since the offs et is at the bottom
445 // of the "current" page, which is exactly the same offset as the top offset on the next page). 447 // of the "current" page, which is exactly the same offset as the top offset on the next page).
446 // 448 //
447 // For a page height of 800px, AssociateWithLatterPage will return 1600 if t he value passed in 449 // For a page height of 800px, AssociateWithLatterPage will return 1600 if t he value passed in
448 // is 800. AssociateWithFormerPage will simply return 800. 450 // is 800. AssociateWithFormerPage will simply return 800.
449 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule) co nst; 451 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule) co nst;
450 452
451 bool createsNewFormattingContext() const;
452
453 // Paginated content inside this block was laid out. 453 // Paginated content inside this block was laid out.
454 // |logicalTopOffsetAfterPagination| is the logical top offset of the child content after 454 // |logicalTopOffsetAfterPagination| is the logical top offset of the child content after
455 // applying any forced or unforced break, if needed. 455 // applying any forced or unforced break, if needed.
456 void paginatedContentWasLaidOut(LayoutUnit logicalTopOffsetAfterPagination); 456 void paginatedContentWasLaidOut(LayoutUnit logicalTopOffsetAfterPagination);
457 457
458 // Update minimum page height required to avoid fragmentation where it shoul dn't occur (inside 458 // Update minimum page height required to avoid fragmentation where it shoul dn't occur (inside
459 // unbreakable content, between orphans and widows, etc.). This will be used as a hint to the 459 // unbreakable content, between orphans and widows, etc.). This will be used as a hint to the
460 // column balancer to help set a good minimum column height. 460 // column balancer to help set a good minimum column height.
461 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight); 461 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight);
462 462
(...skipping 25 matching lines...) Expand all
488 // FIXME: This is temporary as we move code that accesses block flow 488 // FIXME: This is temporary as we move code that accesses block flow
489 // member variables out of LayoutBlock and into LayoutBlockFlow. 489 // member variables out of LayoutBlock and into LayoutBlockFlow.
490 friend class LayoutBlockFlow; 490 friend class LayoutBlockFlow;
491 }; 491 };
492 492
493 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); 493 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock());
494 494
495 } // namespace blink 495 } // namespace blink
496 496
497 #endif // LayoutBlock_h 497 #endif // LayoutBlock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698