| 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. |
| 11 * | 11 * |
| 12 * This library is distributed in the hope that it will be useful, | 12 * This library is distributed in the hope that it will be useful, |
| 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 * Library General Public License for more details. | 15 * Library General Public License for more details. |
| 16 * | 16 * |
| 17 * You should have received a copy of the GNU Library General Public License | 17 * You should have received a copy of the GNU Library General Public License |
| 18 * along with this library; see the file COPYING.LIB. If not, write to | 18 * along with this library; see the file COPYING.LIB. If not, write to |
| 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 * Boston, MA 02110-1301, USA. | 20 * Boston, MA 02110-1301, USA. |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 #ifndef RenderBlock_h | 23 #ifndef RenderBlock_h |
| 24 #define RenderBlock_h | 24 #define RenderBlock_h |
| 25 | 25 |
| 26 #include "core/layout/ColumnInfo.h" | 26 #include "core/layout/ColumnInfo.h" |
| 27 #include "core/layout/FloatingObjects.h" | 27 #include "core/layout/FloatingObjects.h" |
| 28 #include "core/layout/GapRects.h" | 28 #include "core/layout/GapRects.h" |
| 29 #include "core/layout/LayoutBox.h" |
| 29 #include "core/layout/line/RootInlineBox.h" | 30 #include "core/layout/line/RootInlineBox.h" |
| 30 #include "core/layout/style/ShapeValue.h" | 31 #include "core/layout/style/ShapeValue.h" |
| 31 #include "core/rendering/RenderBox.h" | |
| 32 #include "core/rendering/RenderLineBoxList.h" | 32 #include "core/rendering/RenderLineBoxList.h" |
| 33 #include "platform/text/TextBreakIterator.h" | 33 #include "platform/text/TextBreakIterator.h" |
| 34 #include "platform/text/TextRun.h" | 34 #include "platform/text/TextRun.h" |
| 35 #include "wtf/ListHashSet.h" | 35 #include "wtf/ListHashSet.h" |
| 36 #include "wtf/OwnPtr.h" | 36 #include "wtf/OwnPtr.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class LineLayoutState; | 40 class LineLayoutState; |
| 41 struct PaintInfo; | 41 struct PaintInfo; |
| 42 class RenderInline; | 42 class RenderInline; |
| 43 class WordMeasurement; | 43 class WordMeasurement; |
| 44 | 44 |
| 45 typedef WTF::ListHashSet<RenderBox*, 16> TrackedRendererListHashSet; | 45 typedef WTF::ListHashSet<LayoutBox*, 16> TrackedRendererListHashSet; |
| 46 typedef WTF::HashMap<const RenderBlock*, OwnPtr<TrackedRendererListHashSet> > Tr
ackedDescendantsMap; | 46 typedef WTF::HashMap<const RenderBlock*, OwnPtr<TrackedRendererListHashSet>> Tra
ckedDescendantsMap; |
| 47 typedef WTF::HashMap<const RenderBox*, OwnPtr<HashSet<RenderBlock*> > > TrackedC
ontainerMap; | 47 typedef WTF::HashMap<const LayoutBox*, OwnPtr<HashSet<RenderBlock*>>> TrackedCon
tainerMap; |
| 48 typedef Vector<WordMeasurement, 64> WordMeasurements; | 48 typedef Vector<WordMeasurement, 64> WordMeasurements; |
| 49 | 49 |
| 50 enum ContainingBlockState { NewContainingBlock, SameContainingBlock }; | 50 enum ContainingBlockState { NewContainingBlock, SameContainingBlock }; |
| 51 | 51 |
| 52 typedef WTF::HashMap<RenderBlock*, OwnPtr<ListHashSet<RenderInline*> > > Continu
ationOutlineTableMap; | 52 typedef WTF::HashMap<RenderBlock*, OwnPtr<ListHashSet<RenderInline*>>> Continuat
ionOutlineTableMap; |
| 53 | 53 |
| 54 ContinuationOutlineTableMap* continuationOutlineTable(); | 54 ContinuationOutlineTableMap* continuationOutlineTable(); |
| 55 | 55 |
| 56 class RenderBlock : public RenderBox { | 56 class RenderBlock : public LayoutBox { |
| 57 public: | 57 public: |
| 58 friend class LineLayoutState; | 58 friend class LineLayoutState; |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 explicit RenderBlock(ContainerNode*); | 61 explicit RenderBlock(ContainerNode*); |
| 62 virtual ~RenderBlock(); | 62 virtual ~RenderBlock(); |
| 63 | 63 |
| 64 public: | 64 public: |
| 65 LayoutObject* firstChild() const { ASSERT(children() == virtualChildren());
return children()->firstChild(); } | 65 LayoutObject* firstChild() const { ASSERT(children() == virtualChildren());
return children()->firstChild(); } |
| 66 LayoutObject* lastChild() const { ASSERT(children() == virtualChildren()); r
eturn children()->lastChild(); } | 66 LayoutObject* lastChild() const { ASSERT(children() == virtualChildren()); r
eturn children()->lastChild(); } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 91 | 91 |
| 92 public: | 92 public: |
| 93 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow | 93 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow |
| 94 virtual void deleteLineBoxTree(); | 94 virtual void deleteLineBoxTree(); |
| 95 | 95 |
| 96 virtual void addChild(LayoutObject* newChild, LayoutObject* beforeChild = 0)
override; | 96 virtual void addChild(LayoutObject* newChild, LayoutObject* beforeChild = 0)
override; |
| 97 virtual void removeChild(LayoutObject*) override; | 97 virtual void removeChild(LayoutObject*) override; |
| 98 | 98 |
| 99 virtual void layoutBlock(bool relayoutChildren); | 99 virtual void layoutBlock(bool relayoutChildren); |
| 100 | 100 |
| 101 void insertPositionedObject(RenderBox*); | 101 void insertPositionedObject(LayoutBox*); |
| 102 static void removePositionedObject(RenderBox*); | 102 static void removePositionedObject(LayoutBox*); |
| 103 void removePositionedObjects(RenderBlock*, ContainingBlockState = SameContai
ningBlock); | 103 void removePositionedObjects(RenderBlock*, ContainingBlockState = SameContai
ningBlock); |
| 104 | 104 |
| 105 TrackedRendererListHashSet* positionedObjects() const; | 105 TrackedRendererListHashSet* positionedObjects() const; |
| 106 bool hasPositionedObjects() const | 106 bool hasPositionedObjects() const |
| 107 { | 107 { |
| 108 TrackedRendererListHashSet* objects = positionedObjects(); | 108 TrackedRendererListHashSet* objects = positionedObjects(); |
| 109 return objects && !objects->isEmpty(); | 109 return objects && !objects->isEmpty(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void addPercentHeightDescendant(RenderBox*); | 112 void addPercentHeightDescendant(LayoutBox*); |
| 113 static void removePercentHeightDescendant(RenderBox*); | 113 static void removePercentHeightDescendant(LayoutBox*); |
| 114 static bool hasPercentHeightContainerMap(); | 114 static bool hasPercentHeightContainerMap(); |
| 115 static bool hasPercentHeightDescendant(RenderBox*); | 115 static bool hasPercentHeightDescendant(LayoutBox*); |
| 116 static void clearPercentHeightDescendantsFrom(RenderBox*); | 116 static void clearPercentHeightDescendantsFrom(LayoutBox*); |
| 117 static void removePercentHeightDescendantIfNeeded(RenderBox*); | 117 static void removePercentHeightDescendantIfNeeded(LayoutBox*); |
| 118 | 118 |
| 119 TrackedRendererListHashSet* percentHeightDescendants() const; | 119 TrackedRendererListHashSet* percentHeightDescendants() const; |
| 120 bool hasPercentHeightDescendants() const | 120 bool hasPercentHeightDescendants() const |
| 121 { | 121 { |
| 122 TrackedRendererListHashSet* descendants = percentHeightDescendants(); | 122 TrackedRendererListHashSet* descendants = percentHeightDescendants(); |
| 123 return descendants && !descendants->isEmpty(); | 123 return descendants && !descendants->isEmpty(); |
| 124 } | 124 } |
| 125 | 125 |
| 126 void notifyScrollbarThicknessChanged() { m_widthAvailableToChildrenChanged =
true; } | 126 void notifyScrollbarThicknessChanged() { m_widthAvailableToChildrenChanged =
true; } |
| 127 | 127 |
| 128 void setHasMarkupTruncation(bool b) { m_hasMarkupTruncation = b; } | 128 void setHasMarkupTruncation(bool b) { m_hasMarkupTruncation = b; } |
| 129 bool hasMarkupTruncation() const { return m_hasMarkupTruncation; } | 129 bool hasMarkupTruncation() const { return m_hasMarkupTruncation; } |
| 130 | 130 |
| 131 void setHasMarginBeforeQuirk(bool b) { m_hasMarginBeforeQuirk = b; } | 131 void setHasMarginBeforeQuirk(bool b) { m_hasMarginBeforeQuirk = b; } |
| 132 void setHasMarginAfterQuirk(bool b) { m_hasMarginAfterQuirk = b; } | 132 void setHasMarginAfterQuirk(bool b) { m_hasMarginAfterQuirk = b; } |
| 133 | 133 |
| 134 bool hasMarginBeforeQuirk() const { return m_hasMarginBeforeQuirk; } | 134 bool hasMarginBeforeQuirk() const { return m_hasMarginBeforeQuirk; } |
| 135 bool hasMarginAfterQuirk() const { return m_hasMarginAfterQuirk; } | 135 bool hasMarginAfterQuirk() const { return m_hasMarginAfterQuirk; } |
| 136 | 136 |
| 137 bool hasMarginBeforeQuirk(const RenderBox* child) const; | 137 bool hasMarginBeforeQuirk(const LayoutBox* child) const; |
| 138 bool hasMarginAfterQuirk(const RenderBox* child) const; | 138 bool hasMarginAfterQuirk(const LayoutBox* child) const; |
| 139 | 139 |
| 140 void markPositionedObjectsForLayout(); | 140 void markPositionedObjectsForLayout(); |
| 141 // FIXME: Do we really need this to be virtual? It's just so we can call thi
s on | 141 // FIXME: Do we really need this to be virtual? It's just so we can call thi
s on |
| 142 // RenderBoxes without needed to check whether they're RenderBlocks first. | 142 // LayoutBoxes without needed to check whether they're RenderBlocks first. |
| 143 virtual void markForPaginationRelayoutIfNeeded(SubtreeLayoutScope&) override
final; | 143 virtual void markForPaginationRelayoutIfNeeded(SubtreeLayoutScope&) override
final; |
| 144 | 144 |
| 145 LayoutUnit textIndentOffset() const; | 145 LayoutUnit textIndentOffset() const; |
| 146 | 146 |
| 147 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; | 147 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; |
| 148 | 148 |
| 149 // Block flows subclass availableWidth to handle multi column layout (shrink
ing the width available to children when laying out.) | 149 // Block flows subclass availableWidth to handle multi column layout (shrink
ing the width available to children when laying out.) |
| 150 virtual LayoutUnit availableLogicalWidth() const override final; | 150 virtual LayoutUnit availableLogicalWidth() const override final; |
| 151 | 151 |
| 152 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; | 152 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 181 using LayoutBoxModelObject::continuation; | 181 using LayoutBoxModelObject::continuation; |
| 182 using LayoutBoxModelObject::setContinuation; | 182 using LayoutBoxModelObject::setContinuation; |
| 183 | 183 |
| 184 static RenderBlock* createAnonymousWithParentRendererAndDisplay(const Layout
Object*, EDisplay = BLOCK); | 184 static RenderBlock* createAnonymousWithParentRendererAndDisplay(const Layout
Object*, EDisplay = BLOCK); |
| 185 static RenderBlockFlow* createAnonymousColumnsWithParentRenderer(const Layou
tObject*); | 185 static RenderBlockFlow* createAnonymousColumnsWithParentRenderer(const Layou
tObject*); |
| 186 static RenderBlockFlow* createAnonymousColumnSpanWithParentRenderer(const La
youtObject*); | 186 static RenderBlockFlow* createAnonymousColumnSpanWithParentRenderer(const La
youtObject*); |
| 187 RenderBlock* createAnonymousBlock(EDisplay display = BLOCK) const { return c
reateAnonymousWithParentRendererAndDisplay(this, display); } | 187 RenderBlock* createAnonymousBlock(EDisplay display = BLOCK) const { return c
reateAnonymousWithParentRendererAndDisplay(this, display); } |
| 188 RenderBlockFlow* createAnonymousColumnsBlock() const { return createAnonymou
sColumnsWithParentRenderer(this); } | 188 RenderBlockFlow* createAnonymousColumnsBlock() const { return createAnonymou
sColumnsWithParentRenderer(this); } |
| 189 RenderBlockFlow* createAnonymousColumnSpanBlock() const { return createAnony
mousColumnSpanWithParentRenderer(this); } | 189 RenderBlockFlow* createAnonymousColumnSpanBlock() const { return createAnony
mousColumnSpanWithParentRenderer(this); } |
| 190 | 190 |
| 191 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare
nt) const override; | 191 virtual LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare
nt) const override; |
| 192 | 192 |
| 193 ColumnInfo* columnInfo() const; | 193 ColumnInfo* columnInfo() const; |
| 194 int columnGap() const; | 194 int columnGap() const; |
| 195 | 195 |
| 196 // These two functions take the ColumnInfo* to avoid repeated lookups of the
info in the global HashMap. | 196 // These two functions take the ColumnInfo* to avoid repeated lookups of the
info in the global HashMap. |
| 197 unsigned columnCount(ColumnInfo*) const; | 197 unsigned columnCount(ColumnInfo*) const; |
| 198 LayoutRect columnRectAt(ColumnInfo*, unsigned) const; | 198 LayoutRect columnRectAt(ColumnInfo*, unsigned) const; |
| 199 | 199 |
| 200 // The page logical offset is the object's offset from the top of the page i
n the page progression | 200 // The page logical offset is the object's offset from the top of the page i
n the page progression |
| 201 // direction (so an x-offset in vertical text and a y-offset for horizontal
text). | 201 // direction (so an x-offset in vertical text and a y-offset for horizontal
text). |
| 202 LayoutUnit pageLogicalOffset() const { return m_pageLogicalOffset; } | 202 LayoutUnit pageLogicalOffset() const { return m_pageLogicalOffset; } |
| 203 void setPageLogicalOffset(LayoutUnit offset) { m_pageLogicalOffset = offset;
} | 203 void setPageLogicalOffset(LayoutUnit offset) { m_pageLogicalOffset = offset;
} |
| 204 | 204 |
| 205 // Accessors for logical width/height and margins in the containing block's
block-flow direction. | 205 // Accessors for logical width/height and margins in the containing block's
block-flow direction. |
| 206 LayoutUnit logicalWidthForChild(const RenderBox& child) const { return isHor
izontalWritingMode() ? child.size().width() : child.size().height(); } | 206 LayoutUnit logicalWidthForChild(const LayoutBox& child) const { return isHor
izontalWritingMode() ? child.size().width() : child.size().height(); } |
| 207 LayoutUnit logicalHeightForChild(const RenderBox& child) const { return isHo
rizontalWritingMode() ? child.size().height() : child.size().width(); } | 207 LayoutUnit logicalHeightForChild(const LayoutBox& child) const { return isHo
rizontalWritingMode() ? child.size().height() : child.size().width(); } |
| 208 LayoutSize logicalSizeForChild(const RenderBox& child) const { return isHori
zontalWritingMode() ? child.size() : child.size().transposedSize(); } | 208 LayoutSize logicalSizeForChild(const LayoutBox& child) const { return isHori
zontalWritingMode() ? child.size() : child.size().transposedSize(); } |
| 209 LayoutUnit logicalTopForChild(const RenderBox& child) const { return isHoriz
ontalWritingMode() ? child.location().y() : child.location().x(); } | 209 LayoutUnit logicalTopForChild(const LayoutBox& child) const { return isHoriz
ontalWritingMode() ? child.location().y() : child.location().x(); } |
| 210 LayoutUnit marginBeforeForChild(const LayoutBoxModelObject& child) const { r
eturn child.marginBefore(style()); } | 210 LayoutUnit marginBeforeForChild(const LayoutBoxModelObject& child) const { r
eturn child.marginBefore(style()); } |
| 211 LayoutUnit marginAfterForChild(const LayoutBoxModelObject& child) const { re
turn child.marginAfter(style()); } | 211 LayoutUnit marginAfterForChild(const LayoutBoxModelObject& child) const { re
turn child.marginAfter(style()); } |
| 212 LayoutUnit marginStartForChild(const LayoutBoxModelObject& child) const { re
turn child.marginStart(style()); } | 212 LayoutUnit marginStartForChild(const LayoutBoxModelObject& child) const { re
turn child.marginStart(style()); } |
| 213 LayoutUnit marginEndForChild(const LayoutBoxModelObject& child) const { retu
rn child.marginEnd(style()); } | 213 LayoutUnit marginEndForChild(const LayoutBoxModelObject& child) const { retu
rn child.marginEnd(style()); } |
| 214 void setMarginStartForChild(RenderBox& child, LayoutUnit value) const { chil
d.setMarginStart(value, style()); } | 214 void setMarginStartForChild(LayoutBox& child, LayoutUnit value) const { chil
d.setMarginStart(value, style()); } |
| 215 void setMarginEndForChild(RenderBox& child, LayoutUnit value) const { child.
setMarginEnd(value, style()); } | 215 void setMarginEndForChild(LayoutBox& child, LayoutUnit value) const { child.
setMarginEnd(value, style()); } |
| 216 void setMarginBeforeForChild(RenderBox& child, LayoutUnit value) const { chi
ld.setMarginBefore(value, style()); } | 216 void setMarginBeforeForChild(LayoutBox& child, LayoutUnit value) const { chi
ld.setMarginBefore(value, style()); } |
| 217 void setMarginAfterForChild(RenderBox& child, LayoutUnit value) const { chil
d.setMarginAfter(value, style()); } | 217 void setMarginAfterForChild(LayoutBox& child, LayoutUnit value) const { chil
d.setMarginAfter(value, style()); } |
| 218 LayoutUnit collapsedMarginBeforeForChild(const RenderBox& child) const; | 218 LayoutUnit collapsedMarginBeforeForChild(const LayoutBox& child) const; |
| 219 LayoutUnit collapsedMarginAfterForChild(const RenderBox& child) const; | 219 LayoutUnit collapsedMarginAfterForChild(const LayoutBox& child) const; |
| 220 | 220 |
| 221 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) override; | 221 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) override; |
| 222 | 222 |
| 223 virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*v
erticalScrollbarChanged*/) { } | 223 virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*v
erticalScrollbarChanged*/) { } |
| 224 | 224 |
| 225 LayoutUnit availableLogicalWidthForContent() const { return max<LayoutUnit>(
0, logicalRightOffsetForContent() - logicalLeftOffsetForContent()); } | 225 LayoutUnit availableLogicalWidthForContent() const { return max<LayoutUnit>(
0, logicalRightOffsetForContent() - logicalLeftOffsetForContent()); } |
| 226 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM
ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } | 226 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM
ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } |
| 227 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo
rContent() + availableLogicalWidth(); } | 227 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo
rContent() + availableLogicalWidth(); } |
| 228 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire
ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor
Content(); } | 228 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire
ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor
Content(); } |
| 229 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec
tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC
ontent(); } | 229 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec
tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC
ontent(); } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 252 | 252 |
| 253 enum PositionedLayoutBehavior { | 253 enum PositionedLayoutBehavior { |
| 254 DefaultLayout, | 254 DefaultLayout, |
| 255 LayoutOnlyFixedPositionedObjects, | 255 LayoutOnlyFixedPositionedObjects, |
| 256 ForcedLayoutAfterContainingBlockMoved | 256 ForcedLayoutAfterContainingBlockMoved |
| 257 }; | 257 }; |
| 258 | 258 |
| 259 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior
= DefaultLayout); | 259 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior
= DefaultLayout); |
| 260 void markFixedPositionObjectForLayoutIfNeeded(LayoutObject* child, SubtreeLa
youtScope&); | 260 void markFixedPositionObjectForLayoutIfNeeded(LayoutObject* child, SubtreeLa
youtScope&); |
| 261 | 261 |
| 262 LayoutUnit marginIntrinsicLogicalWidthForChild(RenderBox& child) const; | 262 LayoutUnit marginIntrinsicLogicalWidthForChild(LayoutBox& child) const; |
| 263 | 263 |
| 264 int beforeMarginInLineDirection(LineDirectionMode) const; | 264 int beforeMarginInLineDirection(LineDirectionMode) const; |
| 265 | 265 |
| 266 virtual void paint(const PaintInfo&, const LayoutPoint&) override; | 266 virtual void paint(const PaintInfo&, const LayoutPoint&) override; |
| 267 public: | 267 public: |
| 268 virtual void paintObject(const PaintInfo&, const LayoutPoint&) override; | 268 virtual void paintObject(const PaintInfo&, const LayoutPoint&) override; |
| 269 virtual void paintChildren(const PaintInfo&, const LayoutPoint&); | 269 virtual void paintChildren(const PaintInfo&, const LayoutPoint&); |
| 270 | 270 |
| 271 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow | 271 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow |
| 272 virtual void paintFloats(const PaintInfo&, const LayoutPoint&, bool) { } | 272 virtual void paintFloats(const PaintInfo&, const LayoutPoint&, bool) { } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 protected: | 310 protected: |
| 311 virtual void addOverflowFromChildren(); | 311 virtual void addOverflowFromChildren(); |
| 312 void addOverflowFromPositionedObjects(); | 312 void addOverflowFromPositionedObjects(); |
| 313 void addOverflowFromBlockChildren(); | 313 void addOverflowFromBlockChildren(); |
| 314 void addVisualOverflowFromTheme(); | 314 void addVisualOverflowFromTheme(); |
| 315 | 315 |
| 316 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit
ionalOffset) const override; | 316 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit
ionalOffset) const override; |
| 317 | 317 |
| 318 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const override; | 318 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const override; |
| 319 | 319 |
| 320 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox&
); | 320 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, LayoutBox&
); |
| 321 | 321 |
| 322 virtual bool isInlineBlockOrInlineTable() const override final { return isIn
line() && isReplaced(); } | 322 virtual bool isInlineBlockOrInlineTable() const override final { return isIn
line() && isReplaced(); } |
| 323 | 323 |
| 324 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState&
childPaintInvalidationState) override; | 324 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState&
childPaintInvalidationState) override; |
| 325 | 325 |
| 326 private: | 326 private: |
| 327 virtual LayoutObjectChildList* virtualChildren() override final { return chi
ldren(); } | 327 virtual LayoutObjectChildList* virtualChildren() override final { return chi
ldren(); } |
| 328 virtual const LayoutObjectChildList* virtualChildren() const override final
{ return children(); } | 328 virtual const LayoutObjectChildList* virtualChildren() const override final
{ return children(); } |
| 329 | 329 |
| 330 virtual const char* renderName() const override; | 330 virtual const char* renderName() const override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 341 void addChildToContinuation(LayoutObject* newChild, LayoutObject* beforeChil
d); | 341 void addChildToContinuation(LayoutObject* newChild, LayoutObject* beforeChil
d); |
| 342 virtual void addChildIgnoringContinuation(LayoutObject* newChild, LayoutObje
ct* beforeChild) override; | 342 virtual void addChildIgnoringContinuation(LayoutObject* newChild, LayoutObje
ct* beforeChild) override; |
| 343 void addChildToAnonymousColumnBlocks(LayoutObject* newChild, LayoutObject* b
eforeChild); | 343 void addChildToAnonymousColumnBlocks(LayoutObject* newChild, LayoutObject* b
eforeChild); |
| 344 | 344 |
| 345 void addChildIgnoringAnonymousColumnBlocks(LayoutObject* newChild, LayoutObj
ect* beforeChild = 0); | 345 void addChildIgnoringAnonymousColumnBlocks(LayoutObject* newChild, LayoutObj
ect* beforeChild = 0); |
| 346 | 346 |
| 347 virtual bool isSelfCollapsingBlock() const override; | 347 virtual bool isSelfCollapsingBlock() const override; |
| 348 | 348 |
| 349 void removeAnonymousWrappersIfRequired(); | 349 void removeAnonymousWrappersIfRequired(); |
| 350 | 350 |
| 351 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants
Map*&, TrackedContainerMap*&); | 351 void insertIntoTrackedRendererMaps(LayoutBox* descendant, TrackedDescendants
Map*&, TrackedContainerMap*&); |
| 352 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc
endantsMap*&, TrackedContainerMap*&); | 352 static void removeFromTrackedRendererMaps(LayoutBox* descendant, TrackedDesc
endantsMap*&, TrackedContainerMap*&); |
| 353 | 353 |
| 354 Node* nodeForHitTest() const; | 354 Node* nodeForHitTest() const; |
| 355 | 355 |
| 356 bool tryLayoutDoingPositionedMovementOnly(); | 356 bool tryLayoutDoingPositionedMovementOnly(); |
| 357 | 357 |
| 358 virtual bool avoidsFloats() const override { return true; } | 358 virtual bool avoidsFloats() const override { return true; } |
| 359 | 359 |
| 360 bool hitTestColumns(const HitTestRequest&, HitTestResult&, const HitTestLoca
tion& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction); | 360 bool hitTestColumns(const HitTestRequest&, HitTestResult&, const HitTestLoca
tion& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction); |
| 361 bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLoc
ation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction)
; | 361 bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLoc
ation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction)
; |
| 362 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow | 362 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend
erBlockFlow |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 // FIXME: This is temporary as we move code that accesses block flow | 473 // FIXME: This is temporary as we move code that accesses block flow |
| 474 // member variables out of RenderBlock and into RenderBlockFlow. | 474 // member variables out of RenderBlock and into RenderBlockFlow. |
| 475 friend class RenderBlockFlow; | 475 friend class RenderBlockFlow; |
| 476 }; | 476 }; |
| 477 | 477 |
| 478 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 478 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
| 479 | 479 |
| 480 } // namespace blink | 480 } // namespace blink |
| 481 | 481 |
| 482 #endif // RenderBlock_h | 482 #endif // RenderBlock_h |
| OLD | NEW |