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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Layo
utBlockFlow | 274 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Layo
utBlockFlow |
275 virtual void paintFloats(const PaintInfo&, const LayoutPoint&, bool) { } | 275 virtual void paintFloats(const PaintInfo&, const LayoutPoint&, bool) { } |
276 virtual void paintSelection(const PaintInfo&, const LayoutPoint&) { } | 276 virtual void paintSelection(const PaintInfo&, const LayoutPoint&) { } |
277 | 277 |
278 protected: | 278 protected: |
279 virtual void adjustInlineDirectionLineBounds(unsigned /* expansionOpportunit
yCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { } | 279 virtual void adjustInlineDirectionLineBounds(unsigned /* expansionOpportunit
yCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { } |
280 | 280 |
281 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const override; | 281 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const override; |
282 virtual void computePreferredLogicalWidths() override; | 282 virtual void computePreferredLogicalWidths() override; |
283 void adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalWidth, Lay
outUnit& maxLogicalWidth) const; | 283 void adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalWidth, Lay
outUnit& maxLogicalWidth) const; |
| 284 void minMaxPreferredLogicalWidthOfChild(LayoutObject& child, LayoutUnit& min
PreferredLogicalWidth, LayoutUnit& maxPreferredLogicalWidth) const; |
284 | 285 |
285 virtual int firstLineBoxBaseline() const override; | 286 virtual int firstLineBoxBaseline() const override; |
286 virtual int inlineBlockBaseline(LineDirectionMode) const override; | 287 virtual int inlineBlockBaseline(LineDirectionMode) const override; |
287 int lastLineBoxBaseline(LineDirectionMode) const; | 288 int lastLineBoxBaseline(LineDirectionMode) const; |
288 | 289 |
289 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) overrid
e; | 290 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) overrid
e; |
290 | 291 |
291 // Delay update scrollbar until finishDelayUpdateScrollInfo() will be | 292 // Delay update scrollbar until finishDelayUpdateScrollInfo() will be |
292 // called. This function is used when a flexbox is laying out its | 293 // called. This function is used when a flexbox is laying out its |
293 // descendant. If multiple calls are made to startDelayUpdateScrollInfo(), | 294 // descendant. If multiple calls are made to startDelayUpdateScrollInfo(), |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 | 446 |
446 bool requiresColumns(int desiredColumnCount) const; | 447 bool requiresColumns(int desiredColumnCount) const; |
447 | 448 |
448 virtual bool updateLogicalWidthAndColumnWidth(); | 449 virtual bool updateLogicalWidthAndColumnWidth(); |
449 | 450 |
450 virtual bool canCollapseAnonymousBlockChild() const { return true; } | 451 virtual bool canCollapseAnonymousBlockChild() const { return true; } |
451 | 452 |
452 public: | 453 public: |
453 virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const override final; | 454 virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const override final; |
454 | 455 |
| 456 bool needsRecalcLogicalWidthAfterLayoutChildren() const { return m_needsReca
lcLogicalWidthAfterLayoutChildren; } |
| 457 void setNeedsRecalcLogicalWidthAfterLayoutChildren() { m_needsRecalcLogicalW
idthAfterLayoutChildren = true; } |
| 458 void clearNeedsRecalcLogicalWidthAfterLayoutChildren() { m_needsRecalcLogica
lWidthAfterLayoutChildren = false; } |
| 459 |
455 protected: | 460 protected: |
456 LayoutObjectChildList m_children; | 461 LayoutObjectChildList m_children; |
457 LineBoxList m_lineBoxes; // All of the root line boxes created for this bloc
k flow. For example, <div>Hello<br>world.</div> will have two total lines for t
he <div>. | 462 LineBoxList m_lineBoxes; // All of the root line boxes created for this bloc
k flow. For example, <div>Hello<br>world.</div> will have two total lines for t
he <div>. |
458 | 463 |
459 LayoutUnit m_pageLogicalOffset; | 464 LayoutUnit m_pageLogicalOffset; |
460 | 465 |
461 unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put
in LayoutBlockRareData since they are set too frequently. | 466 unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put
in LayoutBlockRareData since they are set too frequently. |
462 unsigned m_hasMarginAfterQuirk : 1; | 467 unsigned m_hasMarginAfterQuirk : 1; |
463 unsigned m_beingDestroyed : 1; | 468 unsigned m_beingDestroyed : 1; |
464 unsigned m_hasMarkupTruncation : 1; | 469 unsigned m_hasMarkupTruncation : 1; |
465 unsigned m_widthAvailableToChildrenChanged : 1; | 470 unsigned m_widthAvailableToChildrenChanged : 1; |
466 mutable unsigned m_hasOnlySelfCollapsingChildren : 1; | 471 mutable unsigned m_hasOnlySelfCollapsingChildren : 1; |
467 mutable unsigned m_descendantsWithFloatsMarkedForLayout : 1; | 472 mutable unsigned m_descendantsWithFloatsMarkedForLayout : 1; |
| 473 mutable unsigned m_needsRecalcLogicalWidthAfterLayoutChildren : 1; |
468 | 474 |
469 // LayoutRubyBase objects need to be able to split and merge, moving their c
hildren around | 475 // LayoutRubyBase objects need to be able to split and merge, moving their c
hildren around |
470 // (calling moveChildTo, moveAllChildrenTo, and makeChildrenNonInline). | 476 // (calling moveChildTo, moveAllChildrenTo, and makeChildrenNonInline). |
471 friend class LayoutRubyBase; | 477 friend class LayoutRubyBase; |
472 // FIXME-BLOCKFLOW: Remove this when the line layout stuff has all moved out
of LayoutBlock | 478 // FIXME-BLOCKFLOW: Remove this when the line layout stuff has all moved out
of LayoutBlock |
473 friend class LineBreaker; | 479 friend class LineBreaker; |
474 | 480 |
475 // FIXME: This is temporary as we move code that accesses block flow | 481 // FIXME: This is temporary as we move code that accesses block flow |
476 // member variables out of LayoutBlock and into LayoutBlockFlow. | 482 // member variables out of LayoutBlock and into LayoutBlockFlow. |
477 friend class LayoutBlockFlow; | 483 friend class LayoutBlockFlow; |
478 }; | 484 }; |
479 | 485 |
480 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); | 486 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); |
481 | 487 |
482 } // namespace blink | 488 } // namespace blink |
483 | 489 |
484 #endif // LayoutBlock_h | 490 #endif // LayoutBlock_h |
OLD | NEW |