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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 RenderObjectChildList* children() { return &m_children; } | 74 RenderObjectChildList* 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 minLineHeightForReplacedRenderer(bool isFirstLine, LayoutUnit rep
lacedHeight) const; |
83 | 83 |
| 84 protected: |
84 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; } | 85 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; } |
85 | 86 |
86 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } | 87 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } |
87 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } | 88 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } |
88 | 89 |
| 90 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir
stLineBox()); } |
| 91 RootInlineBox* lastRootBox() const { return static_cast<RootInlineBox*>(last
LineBox()); } |
| 92 |
| 93 public: |
89 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow | 94 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow |
90 virtual void deleteLineBoxTree(); | 95 virtual void deleteLineBoxTree(); |
91 | 96 |
92 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0)
OVERRIDE; | 97 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0)
OVERRIDE; |
93 virtual void removeChild(RenderObject*) OVERRIDE; | 98 virtual void removeChild(RenderObject*) OVERRIDE; |
94 | 99 |
95 virtual void layoutBlock(bool relayoutChildren); | 100 virtual void layoutBlock(bool relayoutChildren); |
96 | 101 |
97 void insertPositionedObject(RenderBox*); | 102 void insertPositionedObject(RenderBox*); |
98 static void removePositionedObject(RenderBox*); | 103 static void removePositionedObject(RenderBox*); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 150 |
146 // Block flows subclass availableWidth to handle multi column layout (shrink
ing the width available to children when laying out.) | 151 // Block flows subclass availableWidth to handle multi column layout (shrink
ing the width available to children when laying out.) |
147 virtual LayoutUnit availableLogicalWidth() const OVERRIDE FINAL; | 152 virtual LayoutUnit availableLogicalWidth() const OVERRIDE FINAL; |
148 | 153 |
149 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; | 154 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; |
150 void adjustStartEdgeForWritingModeIncludingColumns(LayoutRect&) const; | 155 void adjustStartEdgeForWritingModeIncludingColumns(LayoutRect&) const; |
151 | 156 |
152 LayoutUnit blockDirectionOffset(const LayoutSize& offsetFromBlock) const; | 157 LayoutUnit blockDirectionOffset(const LayoutSize& offsetFromBlock) const; |
153 LayoutUnit inlineDirectionOffset(const LayoutSize& offsetFromBlock) const; | 158 LayoutUnit inlineDirectionOffset(const LayoutSize& offsetFromBlock) const; |
154 | 159 |
155 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir
stLineBox()); } | |
156 RootInlineBox* lastRootBox() const { return static_cast<RootInlineBox*>(last
LineBox()); } | |
157 | |
158 virtual bool shouldPaintSelectionGaps() const OVERRIDE FINAL; | 160 virtual bool shouldPaintSelectionGaps() const OVERRIDE FINAL; |
159 GapRects selectionGapRectsForRepaint(const RenderLayerModelObject* repaintCo
ntainer); | 161 GapRects selectionGapRectsForRepaint(const RenderLayerModelObject* repaintCo
ntainer); |
160 LayoutRect logicalLeftSelectionGap(RenderBlock* rootBlock, const LayoutPoint
& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 162 LayoutRect logicalLeftSelectionGap(RenderBlock* rootBlock, const LayoutPoint
& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
161 RenderObject* selObj, LayoutUnit logicalL
eft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); | 163 RenderObject* selObj, LayoutUnit logicalL
eft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); |
162 LayoutRect logicalRightSelectionGap(RenderBlock* rootBlock, const LayoutPoin
t& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, | 164 LayoutRect logicalRightSelectionGap(RenderBlock* rootBlock, const LayoutPoin
t& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, |
163 RenderObject* selObj, LayoutUnit logical
Right, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); | 165 RenderObject* selObj, LayoutUnit logical
Right, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*); |
164 void getSelectionGapInfo(SelectionState, bool& leftGap, bool& rightGap); | 166 void getSelectionGapInfo(SelectionState, bool& leftGap, bool& rightGap); |
165 RenderBlock* blockBeforeWithinSelectionRoot(LayoutSize& offset) const; | 167 RenderBlock* blockBeforeWithinSelectionRoot(LayoutSize& offset) const; |
166 | 168 |
167 virtual void setSelectionState(SelectionState) OVERRIDE; | 169 virtual void setSelectionState(SelectionState) OVERRIDE; |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 // FIXME: This is temporary as we move code that accesses block flow | 522 // FIXME: This is temporary as we move code that accesses block flow |
521 // member variables out of RenderBlock and into RenderBlockFlow. | 523 // member variables out of RenderBlock and into RenderBlockFlow. |
522 friend class RenderBlockFlow; | 524 friend class RenderBlockFlow; |
523 }; | 525 }; |
524 | 526 |
525 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 527 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
526 | 528 |
527 } // namespace blink | 529 } // namespace blink |
528 | 530 |
529 #endif // RenderBlock_h | 531 #endif // RenderBlock_h |
OLD | NEW |