Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 | 72 |
| 73 const LayoutObjectChildList* children() const { return &m_children; } | 73 const LayoutObjectChildList* children() const { return &m_children; } |
| 74 LayoutObjectChildList* children() { return &m_children; } | 74 LayoutObjectChildList* children() { return &m_children; } |
| 75 | 75 |
| 76 bool beingDestroyed() const { return m_beingDestroyed; } | 76 bool beingDestroyed() const { return m_beingDestroyed; } |
| 77 | 77 |
| 78 // These two functions are overridden for inline-block. | 78 // These two functions are overridden for inline-block. |
| 79 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const override final; | 79 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const override final; |
| 80 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const override; | 80 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const override; |
| 81 | 81 |
| 82 LayoutUnit minLineHeightForReplacedRenderer(bool isFirstLine, LayoutUnit rep lacedHeight) const; | 82 LayoutUnit minLineHeightForReplacedLayoutObject(bool isFirstLine, LayoutUnit replacedHeight) const; |
|
leviw_travelin_and_unemployed
2015/04/24 18:47:32
Nit: I may have just used "object" for brevity.
dsinclair
2015/04/25 00:53:44
Done
| |
| 83 | 83 |
| 84 LineBoxList* lineBoxes() { return &m_lineBoxes; } | 84 LineBoxList* lineBoxes() { return &m_lineBoxes; } |
| 85 | 85 |
| 86 virtual const char* name() const override; | 86 virtual const char* name() const override; |
| 87 | 87 |
| 88 protected: | 88 protected: |
| 89 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } | 89 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } |
| 90 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } | 90 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } |
| 91 | 91 |
| 92 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir stLineBox()); } | 92 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir stLineBox()); } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 177 void addContinuationWithOutline(LayoutInline*); | 177 void addContinuationWithOutline(LayoutInline*); |
| 178 | 178 |
| 179 virtual LayoutBoxModelObject* virtualContinuation() const override final { r eturn continuation(); } | 179 virtual LayoutBoxModelObject* virtualContinuation() const override final { r eturn continuation(); } |
| 180 bool isAnonymousBlockContinuation() const { return continuation() && isAnony mousBlock(); } | 180 bool isAnonymousBlockContinuation() const { return continuation() && isAnony mousBlock(); } |
| 181 LayoutInline* inlineElementContinuation() const; | 181 LayoutInline* inlineElementContinuation() const; |
| 182 LayoutBlock* blockElementContinuation() const; | 182 LayoutBlock* blockElementContinuation() const; |
| 183 | 183 |
| 184 using LayoutBoxModelObject::continuation; | 184 using LayoutBoxModelObject::continuation; |
| 185 using LayoutBoxModelObject::setContinuation; | 185 using LayoutBoxModelObject::setContinuation; |
| 186 | 186 |
| 187 static LayoutBlock* createAnonymousWithParentRendererAndDisplay(const Layout Object*, EDisplay = BLOCK); | 187 static LayoutBlock* createAnonymousWithParentAndDisplay(const LayoutObject*, EDisplay = BLOCK); |
| 188 static LayoutBlockFlow* createAnonymousColumnsWithParentRenderer(const Layou tObject*); | 188 static LayoutBlockFlow* createAnonymousColumnsWithParent(const LayoutObject* ); |
| 189 static LayoutBlockFlow* createAnonymousColumnSpanWithParentRenderer(const La youtObject*); | 189 static LayoutBlockFlow* createAnonymousColumnSpanWithParent(const LayoutObje ct*); |
| 190 LayoutBlock* createAnonymousBlock(EDisplay display = BLOCK) const { return c reateAnonymousWithParentRendererAndDisplay(this, display); } | 190 LayoutBlock* createAnonymousBlock(EDisplay display = BLOCK) const { return c reateAnonymousWithParentAndDisplay(this, display); } |
| 191 LayoutBlockFlow* createAnonymousColumnsBlock() const { return createAnonymou sColumnsWithParentRenderer(this); } | 191 LayoutBlockFlow* createAnonymousColumnsBlock() const { return createAnonymou sColumnsWithParent(this); } |
| 192 LayoutBlockFlow* createAnonymousColumnSpanBlock() const { return createAnony mousColumnSpanWithParentRenderer(this); } | 192 LayoutBlockFlow* createAnonymousColumnSpanBlock() const { return createAnony mousColumnSpanWithParent(this); } |
| 193 | 193 |
| 194 virtual LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare nt) const override; | 194 virtual LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare nt) const override; |
| 195 | 195 |
| 196 ColumnInfo* columnInfo() const; | 196 ColumnInfo* columnInfo() const; |
| 197 int columnGap() const; | 197 int columnGap() const; |
| 198 | 198 |
| 199 // These two functions take the ColumnInfo* to avoid repeated lookups of the info in the global HashMap. | 199 // These two functions take the ColumnInfo* to avoid repeated lookups of the info in the global HashMap. |
| 200 unsigned columnCount(ColumnInfo*) const; | 200 unsigned columnCount(ColumnInfo*) const; |
| 201 LayoutRect columnRectAt(ColumnInfo*, unsigned) const; | 201 LayoutRect columnRectAt(ColumnInfo*, unsigned) const; |
| 202 | 202 |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 433 | 433 |
| 434 protected: | 434 protected: |
| 435 // A page break is required at some offset due to space shortage in the curr ent fragmentainer. | 435 // A page break is required at some offset due to space shortage in the curr ent fragmentainer. |
| 436 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage); | 436 void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage); |
| 437 | 437 |
| 438 // Update minimum page height required to avoid fragmentation where it shoul dn't occur (inside | 438 // Update minimum page height required to avoid fragmentation where it shoul dn't occur (inside |
| 439 // unbreakable content, between orphans and widows, etc.). This will be used as a hint to the | 439 // unbreakable content, between orphans and widows, etc.). This will be used as a hint to the |
| 440 // column balancer to help set a good minimum column height. | 440 // column balancer to help set a good minimum column height. |
| 441 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight); | 441 void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight); |
| 442 | 442 |
| 443 // Adjust from painting offsets to the local coords of this renderer | 443 // Adjust from painting offsets to the local coords of this layoutObject |
| 444 void offsetForContents(LayoutPoint&) const; | 444 void offsetForContents(LayoutPoint&) const; |
| 445 | 445 |
| 446 bool requiresColumns(int desiredColumnCount) const; | 446 bool requiresColumns(int desiredColumnCount) const; |
| 447 | 447 |
| 448 virtual bool updateLogicalWidthAndColumnWidth(); | 448 virtual bool updateLogicalWidthAndColumnWidth(); |
| 449 | 449 |
| 450 virtual bool canCollapseAnonymousBlockChild() const { return true; } | 450 virtual bool canCollapseAnonymousBlockChild() const { return true; } |
| 451 | 451 |
| 452 public: | 452 public: |
| 453 virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const override final; | 453 virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const override final; |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 475 // FIXME: This is temporary as we move code that accesses block flow | 475 // FIXME: This is temporary as we move code that accesses block flow |
| 476 // member variables out of LayoutBlock and into LayoutBlockFlow. | 476 // member variables out of LayoutBlock and into LayoutBlockFlow. |
| 477 friend class LayoutBlockFlow; | 477 friend class LayoutBlockFlow; |
| 478 }; | 478 }; |
| 479 | 479 |
| 480 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); | 480 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); |
| 481 | 481 |
| 482 } // namespace blink | 482 } // namespace blink |
| 483 | 483 |
| 484 #endif // LayoutBlock_h | 484 #endif // LayoutBlock_h |
| OLD | NEW |