| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 RenderObjectChildList* children() { return &m_children; } | 82 RenderObjectChildList* children() { return &m_children; } |
| 83 | 83 |
| 84 bool beingDestroyed() const { return m_beingDestroyed; } | 84 bool beingDestroyed() const { return m_beingDestroyed; } |
| 85 | 85 |
| 86 // These two functions are overridden for inline-block. | 86 // These two functions are overridden for inline-block. |
| 87 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio
nMode = PositionOnContainingLine) const OVERRIDE FINAL; | 87 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio
nMode = PositionOnContainingLine) const OVERRIDE FINAL; |
| 88 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const OVERRIDE; | 88 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const OVERRIDE; |
| 89 | 89 |
| 90 LayoutUnit minLineHeightForReplacedRenderer(bool isFirstLine, LayoutUnit rep
lacedHeight) const; | 90 LayoutUnit minLineHeightForReplacedRenderer(bool isFirstLine, LayoutUnit rep
lacedHeight) const; |
| 91 | 91 |
| 92 protected: |
| 92 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; } | 93 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; } |
| 93 | 94 |
| 94 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } | 95 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } |
| 95 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } | 96 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } |
| 96 | 97 |
| 98 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir
stLineBox()); } |
| 99 RootInlineBox* lastRootBox() const { return static_cast<RootInlineBox*>(last
LineBox()); } |
| 100 |
| 101 public: |
| 97 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow | 102 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow |
| 98 virtual void deleteLineBoxTree(); | 103 virtual void deleteLineBoxTree(); |
| 99 | 104 |
| 100 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0)
OVERRIDE; | 105 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0)
OVERRIDE; |
| 101 virtual void removeChild(RenderObject*) OVERRIDE; | 106 virtual void removeChild(RenderObject*) OVERRIDE; |
| 102 | 107 |
| 103 virtual void layoutBlock(bool relayoutChildren); | 108 virtual void layoutBlock(bool relayoutChildren); |
| 104 | 109 |
| 105 void insertPositionedObject(RenderBox*); | 110 void insertPositionedObject(RenderBox*); |
| 106 static void removePositionedObject(RenderBox*); | 111 static void removePositionedObject(RenderBox*); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 158 |
| 154 // Block flows subclass availableWidth to handle multi column layout (shrink
ing the width available to children when laying out.) | 159 // Block flows subclass availableWidth to handle multi column layout (shrink
ing the width available to children when laying out.) |
| 155 virtual LayoutUnit availableLogicalWidth() const OVERRIDE FINAL; | 160 virtual LayoutUnit availableLogicalWidth() const OVERRIDE FINAL; |
| 156 | 161 |
| 157 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; | 162 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; |
| 158 void adjustStartEdgeForWritingModeIncludingColumns(LayoutRect&) const; | 163 void adjustStartEdgeForWritingModeIncludingColumns(LayoutRect&) const; |
| 159 | 164 |
| 160 LayoutUnit blockDirectionOffset(const LayoutSize& offsetFromBlock) const; | 165 LayoutUnit blockDirectionOffset(const LayoutSize& offsetFromBlock) const; |
| 161 LayoutUnit inlineDirectionOffset(const LayoutSize& offsetFromBlock) const; | 166 LayoutUnit inlineDirectionOffset(const LayoutSize& offsetFromBlock) const; |
| 162 | 167 |
| 163 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir
stLineBox()); } | |
| 164 RootInlineBox* lastRootBox() const { return static_cast<RootInlineBox*>(last
LineBox()); } | |
| 165 | |
| 166 virtual bool shouldPaintSelectionGaps() const OVERRIDE FINAL; | 168 virtual bool shouldPaintSelectionGaps() const OVERRIDE FINAL; |
| 167 GapRects selectionGapRectsForRepaint(const RenderLayerModelObject* repaintCo
ntainer); | 169 GapRects selectionGapRectsForRepaint(const RenderLayerModelObject* repaintCo
ntainer); |
| 168 LayoutRect logicalLeftSelectionGap(RenderBlock* rootBlock, const LayoutPoint
& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 170 LayoutRect logicalLeftSelectionGap(RenderBlock* rootBlock, const LayoutPoint
& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
| 169 RenderObject* selObj, LayoutUnit logicalL
eft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); | 171 RenderObject* selObj, LayoutUnit logicalL
eft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); |
| 170 LayoutRect logicalRightSelectionGap(RenderBlock* rootBlock, const LayoutPoin
t& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 172 LayoutRect logicalRightSelectionGap(RenderBlock* rootBlock, const LayoutPoin
t& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
| 171 RenderObject* selObj, LayoutUnit logical
Right, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); | 173 RenderObject* selObj, LayoutUnit logical
Right, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); |
| 172 void getSelectionGapInfo(SelectionState, bool& leftGap, bool& rightGap); | 174 void getSelectionGapInfo(SelectionState, bool& leftGap, bool& rightGap); |
| 173 RenderBlock* blockBeforeWithinSelectionRoot(LayoutSize& offset) const; | 175 RenderBlock* blockBeforeWithinSelectionRoot(LayoutSize& offset) const; |
| 174 | 176 |
| 175 virtual void setSelectionState(SelectionState) OVERRIDE; | 177 virtual void setSelectionState(SelectionState) OVERRIDE; |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 // FIXME: This is temporary as we move code that accesses block flow | 543 // FIXME: This is temporary as we move code that accesses block flow |
| 542 // member variables out of RenderBlock and into RenderBlockFlow. | 544 // member variables out of RenderBlock and into RenderBlockFlow. |
| 543 friend class RenderBlockFlow; | 545 friend class RenderBlockFlow; |
| 544 }; | 546 }; |
| 545 | 547 |
| 546 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 548 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
| 547 | 549 |
| 548 } // namespace WebCore | 550 } // namespace WebCore |
| 549 | 551 |
| 550 #endif // RenderBlock_h | 552 #endif // RenderBlock_h |
| OLD | NEW |