| 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-2013 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003-2013 Apple Inc. All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * Copyright (C) 2013 Google Inc. All rights reserved. | 7 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
| 10 * modification, are permitted provided that the following conditions are | 10 * modification, are permitted provided that the following conditions are |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "core/rendering/FloatingObjects.h" | 39 #include "core/rendering/FloatingObjects.h" |
| 40 #include "core/rendering/RenderBlock.h" | 40 #include "core/rendering/RenderBlock.h" |
| 41 #include "core/rendering/line/TrailingObjects.h" | 41 #include "core/rendering/line/TrailingObjects.h" |
| 42 #include "core/rendering/style/RenderStyleConstants.h" | 42 #include "core/rendering/style/RenderStyleConstants.h" |
| 43 | 43 |
| 44 namespace WebCore { | 44 namespace WebCore { |
| 45 | 45 |
| 46 class MarginInfo; | 46 class MarginInfo; |
| 47 class LineBreaker; | 47 class LineBreaker; |
| 48 class LineWidth; | 48 class LineWidth; |
| 49 class RenderNamedFlowFragment; | |
| 50 | 49 |
| 51 class RenderBlockFlow : public RenderBlock { | 50 class RenderBlockFlow : public RenderBlock { |
| 52 public: | 51 public: |
| 53 explicit RenderBlockFlow(ContainerNode*); | 52 explicit RenderBlockFlow(ContainerNode*); |
| 54 virtual ~RenderBlockFlow(); | 53 virtual ~RenderBlockFlow(); |
| 55 | 54 |
| 56 static RenderBlockFlow* createAnonymous(Document*); | 55 static RenderBlockFlow* createAnonymous(Document*); |
| 57 RenderBlockFlow* createAnonymousBlockFlow() const; | 56 RenderBlockFlow* createAnonymousBlockFlow() const; |
| 58 | 57 |
| 59 virtual bool isRenderBlockFlow() const OVERRIDE FINAL { return true; } | 58 virtual bool isRenderBlockFlow() const OVERRIDE FINAL { return true; } |
| 60 | 59 |
| 61 virtual void layoutBlock(bool relayoutChildren) OVERRIDE; | 60 virtual void layoutBlock(bool relayoutChildren) OVERRIDE; |
| 62 | 61 |
| 63 virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeFl
oats = false) OVERRIDE; | 62 virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeFl
oats = false) OVERRIDE; |
| 64 virtual void deleteLineBoxTree() OVERRIDE FINAL; | 63 virtual void deleteLineBoxTree() OVERRIDE FINAL; |
| 65 | 64 |
| 66 // Versions that can compute line offsets with the region and page offset pa
ssed in. Used for speed to avoid having to | |
| 67 // compute the region all over again when you already know it. | |
| 68 LayoutUnit availableLogicalWidthForLineInRegion(LayoutUnit position, bool sh
ouldIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const | |
| 69 { | |
| 70 return max<LayoutUnit>(0, logicalRightOffsetForLineInRegion(position, sh
ouldIndentText, region, logicalHeight) | |
| 71 - logicalLeftOffsetForLineInRegion(position, shouldIndentText, regio
n, logicalHeight)); | |
| 72 } | |
| 73 LayoutUnit logicalRightOffsetForLineInRegion(LayoutUnit position, bool shoul
dIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const | |
| 74 { | |
| 75 return logicalRightOffsetForLine(position, logicalRightOffsetForContent(
region), shouldIndentText, logicalHeight); | |
| 76 } | |
| 77 LayoutUnit logicalLeftOffsetForLineInRegion(LayoutUnit position, bool should
IndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const | |
| 78 { | |
| 79 return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(re
gion), shouldIndentText, logicalHeight); | |
| 80 } | |
| 81 LayoutUnit startOffsetForLineInRegion(LayoutUnit position, bool shouldIndent
Text, RenderRegion* region, LayoutUnit logicalHeight = 0) const | |
| 82 { | |
| 83 return style()->isLeftToRightDirection() ? logicalLeftOffsetForLineInReg
ion(position, shouldIndentText, region, logicalHeight) | |
| 84 : logicalWidth() - logicalRightOffsetForLineInRegion(position, shoul
dIndentText, region, logicalHeight); | |
| 85 } | |
| 86 LayoutUnit endOffsetForLineInRegion(LayoutUnit position, bool shouldIndentTe
xt, RenderRegion* region, LayoutUnit logicalHeight = 0) const | |
| 87 { | |
| 88 return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLineInRe
gion(position, shouldIndentText, region, logicalHeight) | |
| 89 : logicalWidth() - logicalRightOffsetForLineInRegion(position, shoul
dIndentText, region, logicalHeight); | |
| 90 } | |
| 91 | |
| 92 LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool shouldInde
ntText, LayoutUnit logicalHeight = 0) const | 65 LayoutUnit availableLogicalWidthForLine(LayoutUnit position, bool shouldInde
ntText, LayoutUnit logicalHeight = 0) const |
| 93 { | 66 { |
| 94 return availableLogicalWidthForLineInRegion(position, shouldIndentText,
regionAtBlockOffset(position), logicalHeight); | 67 return max<LayoutUnit>(0, logicalRightOffsetForLine(position, shouldInde
ntText, logicalHeight) - logicalLeftOffsetForLine(position, shouldIndentText, lo
gicalHeight)); |
| 95 } | 68 } |
| 96 LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool shouldIndentT
ext, LayoutUnit logicalHeight = 0) const | 69 LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool shouldIndentT
ext, LayoutUnit logicalHeight = 0) const |
| 97 { | 70 { |
| 98 return logicalRightOffsetForLine(position, logicalRightOffsetForContent(
position), shouldIndentText, logicalHeight); | 71 return logicalRightOffsetForLine(position, logicalRightOffsetForContent(
), shouldIndentText, logicalHeight); |
| 99 } | 72 } |
| 100 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, bool shouldIndentTe
xt, LayoutUnit logicalHeight = 0) const | 73 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, bool shouldIndentTe
xt, LayoutUnit logicalHeight = 0) const |
| 101 { | 74 { |
| 102 return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(po
sition), shouldIndentText, logicalHeight); | 75 return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(),
shouldIndentText, logicalHeight); |
| 103 } | 76 } |
| 104 LayoutUnit pixelSnappedLogicalLeftOffsetForLine(LayoutUnit position, bool sh
ouldIndentText, LayoutUnit logicalHeight = 0) const | 77 LayoutUnit pixelSnappedLogicalLeftOffsetForLine(LayoutUnit position, bool sh
ouldIndentText, LayoutUnit logicalHeight = 0) const |
| 105 { | 78 { |
| 106 return roundToInt(logicalLeftOffsetForLine(position, shouldIndentText, l
ogicalHeight)); | 79 return roundToInt(logicalLeftOffsetForLine(position, shouldIndentText, l
ogicalHeight)); |
| 107 } | 80 } |
| 108 LayoutUnit pixelSnappedLogicalRightOffsetForLine(LayoutUnit position, bool s
houldIndentText, LayoutUnit logicalHeight = 0) const | 81 LayoutUnit pixelSnappedLogicalRightOffsetForLine(LayoutUnit position, bool s
houldIndentText, LayoutUnit logicalHeight = 0) const |
| 109 { | 82 { |
| 110 // FIXME: Multicolumn layouts break carrying over subpixel values to the
logical right offset because the lines may be shifted | 83 // FIXME: Multicolumn layouts break carrying over subpixel values to the
logical right offset because the lines may be shifted |
| 111 // by a subpixel value for all but the first column. This can lead to th
e actual pixel snapped width of the column being off | 84 // by a subpixel value for all but the first column. This can lead to th
e actual pixel snapped width of the column being off |
| 112 // by one pixel when rendered versus layed out, which can result in the
line being clipped. For now, we have to floor. | 85 // by one pixel when rendered versus layed out, which can result in the
line being clipped. For now, we have to floor. |
| 113 // https://bugs.webkit.org/show_bug.cgi?id=105461 | 86 // https://bugs.webkit.org/show_bug.cgi?id=105461 |
| 114 return floorToInt(logicalRightOffsetForLine(position, shouldIndentText,
logicalHeight)); | 87 return floorToInt(logicalRightOffsetForLine(position, shouldIndentText,
logicalHeight)); |
| 115 } | 88 } |
| 116 LayoutUnit startOffsetForLine(LayoutUnit position, bool shouldIndentText, La
youtUnit logicalHeight = 0) const | 89 LayoutUnit startOffsetForLine(LayoutUnit position, bool shouldIndentText, La
youtUnit logicalHeight = 0) const |
| 117 { | 90 { |
| 118 return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(posi
tion, shouldIndentText, logicalHeight) | 91 return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(posi
tion, shouldIndentText, logicalHeight) |
| 119 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT
ext, logicalHeight); | 92 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT
ext, logicalHeight); |
| 120 } | 93 } |
| 121 LayoutUnit endOffsetForLine(LayoutUnit position, bool shouldIndentText, Layo
utUnit logicalHeight = 0) const | 94 LayoutUnit endOffsetForLine(LayoutUnit position, bool shouldIndentText, Layo
utUnit logicalHeight = 0) const |
| 122 { | 95 { |
| 123 return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(pos
ition, shouldIndentText, logicalHeight) | 96 return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(pos
ition, shouldIndentText, logicalHeight) |
| 124 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT
ext, logicalHeight); | 97 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT
ext, logicalHeight); |
| 125 } | 98 } |
| 126 | 99 |
| 127 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout
Unit position) OVERRIDE; | 100 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout
Unit position) OVERRIDE; |
| 128 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou
tUnit position) OVERRIDE; | 101 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou
tUnit position) OVERRIDE; |
| 129 | 102 |
| 130 LayoutUnit computeStartPositionDeltaForChildAvoidingFloats(const RenderBox*
child, LayoutUnit childMarginStart, RenderRegion* = 0); | 103 LayoutUnit computeStartPositionDeltaForChildAvoidingFloats(const RenderBox*
child, LayoutUnit childMarginStart); |
| 131 | 104 |
| 132 RootInlineBox* createAndAppendRootInlineBox(); | 105 RootInlineBox* createAndAppendRootInlineBox(); |
| 133 | 106 |
| 134 void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = 0, boo
l inLayout = true); | 107 void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = 0, boo
l inLayout = true); |
| 135 void markSiblingsWithFloatsForLayout(RenderBox* floatToRemove = 0); | 108 void markSiblingsWithFloatsForLayout(RenderBox* floatToRemove = 0); |
| 136 | 109 |
| 137 virtual bool containsFloats() const OVERRIDE FINAL { return m_floatingObject
s && !m_floatingObjects->set().isEmpty(); } | 110 virtual bool containsFloats() const OVERRIDE FINAL { return m_floatingObject
s && !m_floatingObjects->set().isEmpty(); } |
| 138 bool containsFloat(RenderBox*) const; | 111 bool containsFloat(RenderBox*) const; |
| 139 | 112 |
| 140 void removeFloatingObjects(); | 113 void removeFloatingObjects(); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 208 |
| 236 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed
Offset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const | 209 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed
Offset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const |
| 237 { | 210 { |
| 238 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo
gicalTop, fixedOffset, logicalHeight), applyTextIndent); | 211 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo
gicalTop, fixedOffset, logicalHeight), applyTextIndent); |
| 239 } | 212 } |
| 240 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO
ffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const | 213 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO
ffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const |
| 241 { | 214 { |
| 242 return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logi
calTop, fixedOffset, logicalHeight), applyTextIndent); | 215 return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logi
calTop, fixedOffset, logicalHeight), applyTextIndent); |
| 243 } | 216 } |
| 244 | 217 |
| 245 virtual void insertedIntoTree() OVERRIDE; | |
| 246 virtual void willBeDestroyed() OVERRIDE; | |
| 247 private: | 218 private: |
| 248 bool layoutBlockFlow(bool relayoutChildren, LayoutUnit& pageLogicalHeight, S
ubtreeLayoutScope&); | 219 bool layoutBlockFlow(bool relayoutChildren, LayoutUnit& pageLogicalHeight, S
ubtreeLayoutScope&); |
| 249 void layoutBlockChildren(bool relayoutChildren, LayoutUnit& maxFloatLogicalB
ottom, SubtreeLayoutScope&, LayoutUnit beforeEdge, LayoutUnit afterEdge); | 220 void layoutBlockChildren(bool relayoutChildren, LayoutUnit& maxFloatLogicalB
ottom, SubtreeLayoutScope&, LayoutUnit beforeEdge, LayoutUnit afterEdge); |
| 250 | 221 |
| 251 void layoutBlockChild(RenderBox* child, MarginInfo&, LayoutUnit& previousFlo
atLogicalBottom, LayoutUnit& maxFloatLogicalBottom); | 222 void layoutBlockChild(RenderBox* child, MarginInfo&, LayoutUnit& previousFlo
atLogicalBottom, LayoutUnit& maxFloatLogicalBottom); |
| 252 void adjustPositionedBlock(RenderBox* child, const MarginInfo&); | 223 void adjustPositionedBlock(RenderBox* child, const MarginInfo&); |
| 253 void adjustFloatingBlock(const MarginInfo&); | 224 void adjustFloatingBlock(const MarginInfo&); |
| 254 | 225 |
| 255 LayoutPoint flipFloatForWritingModeForChild(const FloatingObject*, const Lay
outPoint&) const; | 226 LayoutPoint flipFloatForWritingModeForChild(const FloatingObject*, const Lay
outPoint&) const; |
| 256 | 227 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 void setNegativeMarginAfter(LayoutUnit neg) { m_negativeMarginAfter = ne
g; } | 321 void setNegativeMarginAfter(LayoutUnit neg) { m_negativeMarginAfter = ne
g; } |
| 351 | 322 |
| 352 private: | 323 private: |
| 353 LayoutUnit m_positiveMarginBefore; | 324 LayoutUnit m_positiveMarginBefore; |
| 354 LayoutUnit m_negativeMarginBefore; | 325 LayoutUnit m_negativeMarginBefore; |
| 355 LayoutUnit m_positiveMarginAfter; | 326 LayoutUnit m_positiveMarginAfter; |
| 356 LayoutUnit m_negativeMarginAfter; | 327 LayoutUnit m_negativeMarginAfter; |
| 357 }; | 328 }; |
| 358 MarginValues marginValuesForChild(RenderBox* child) const; | 329 MarginValues marginValuesForChild(RenderBox* child) const; |
| 359 | 330 |
| 360 virtual void updateLogicalHeight() OVERRIDE; | |
| 361 | |
| 362 // Allocated only when some of these fields have non-default values | 331 // Allocated only when some of these fields have non-default values |
| 363 struct RenderBlockFlowRareData { | 332 struct RenderBlockFlowRareData { |
| 364 WTF_MAKE_NONCOPYABLE(RenderBlockFlowRareData); WTF_MAKE_FAST_ALLOCATED; | 333 WTF_MAKE_NONCOPYABLE(RenderBlockFlowRareData); WTF_MAKE_FAST_ALLOCATED; |
| 365 public: | 334 public: |
| 366 RenderBlockFlowRareData(const RenderBlockFlow* block) | 335 RenderBlockFlowRareData(const RenderBlockFlow* block) |
| 367 : m_margins(positiveMarginBeforeDefault(block), negativeMarginBefore
Default(block), positiveMarginAfterDefault(block), negativeMarginAfterDefault(bl
ock)) | 336 : m_margins(positiveMarginBeforeDefault(block), negativeMarginBefore
Default(block), positiveMarginAfterDefault(block), negativeMarginAfterDefault(bl
ock)) |
| 368 , m_discardMarginBefore(false) | 337 , m_discardMarginBefore(false) |
| 369 , m_discardMarginAfter(false) | 338 , m_discardMarginAfter(false) |
| 370 , m_renderNamedFlowFragment(0) | |
| 371 { | 339 { |
| 372 } | 340 } |
| 373 | 341 |
| 374 static LayoutUnit positiveMarginBeforeDefault(const RenderBlockFlow* blo
ck) | 342 static LayoutUnit positiveMarginBeforeDefault(const RenderBlockFlow* blo
ck) |
| 375 { | 343 { |
| 376 return std::max<LayoutUnit>(block->marginBefore(), 0); | 344 return std::max<LayoutUnit>(block->marginBefore(), 0); |
| 377 } | 345 } |
| 378 static LayoutUnit negativeMarginBeforeDefault(const RenderBlockFlow* blo
ck) | 346 static LayoutUnit negativeMarginBeforeDefault(const RenderBlockFlow* blo
ck) |
| 379 { | 347 { |
| 380 return std::max<LayoutUnit>(-block->marginBefore(), 0); | 348 return std::max<LayoutUnit>(-block->marginBefore(), 0); |
| 381 } | 349 } |
| 382 static LayoutUnit positiveMarginAfterDefault(const RenderBlockFlow* bloc
k) | 350 static LayoutUnit positiveMarginAfterDefault(const RenderBlockFlow* bloc
k) |
| 383 { | 351 { |
| 384 return std::max<LayoutUnit>(block->marginAfter(), 0); | 352 return std::max<LayoutUnit>(block->marginAfter(), 0); |
| 385 } | 353 } |
| 386 static LayoutUnit negativeMarginAfterDefault(const RenderBlockFlow* bloc
k) | 354 static LayoutUnit negativeMarginAfterDefault(const RenderBlockFlow* bloc
k) |
| 387 { | 355 { |
| 388 return std::max<LayoutUnit>(-block->marginAfter(), 0); | 356 return std::max<LayoutUnit>(-block->marginAfter(), 0); |
| 389 } | 357 } |
| 390 | 358 |
| 391 MarginValues m_margins; | 359 MarginValues m_margins; |
| 392 | 360 |
| 393 bool m_discardMarginBefore : 1; | 361 bool m_discardMarginBefore : 1; |
| 394 bool m_discardMarginAfter : 1; | 362 bool m_discardMarginAfter : 1; |
| 395 RenderNamedFlowFragment* m_renderNamedFlowFragment; | |
| 396 }; | 363 }; |
| 397 LayoutUnit marginOffsetForSelfCollapsingBlock(); | 364 LayoutUnit marginOffsetForSelfCollapsingBlock(); |
| 398 | 365 |
| 399 RenderNamedFlowFragment* renderNamedFlowFragment() const { return m_rareData
? m_rareData->m_renderNamedFlowFragment : 0; } | |
| 400 void setRenderNamedFlowFragment(RenderNamedFlowFragment*); | |
| 401 | |
| 402 protected: | 366 protected: |
| 403 LayoutUnit maxPositiveMarginBefore() const { return m_rareData ? m_rareData-
>m_margins.positiveMarginBefore() : RenderBlockFlowRareData::positiveMarginBefor
eDefault(this); } | 367 LayoutUnit maxPositiveMarginBefore() const { return m_rareData ? m_rareData-
>m_margins.positiveMarginBefore() : RenderBlockFlowRareData::positiveMarginBefor
eDefault(this); } |
| 404 LayoutUnit maxNegativeMarginBefore() const { return m_rareData ? m_rareData-
>m_margins.negativeMarginBefore() : RenderBlockFlowRareData::negativeMarginBefor
eDefault(this); } | 368 LayoutUnit maxNegativeMarginBefore() const { return m_rareData ? m_rareData-
>m_margins.negativeMarginBefore() : RenderBlockFlowRareData::negativeMarginBefor
eDefault(this); } |
| 405 LayoutUnit maxPositiveMarginAfter() const { return m_rareData ? m_rareData->
m_margins.positiveMarginAfter() : RenderBlockFlowRareData::positiveMarginAfterDe
fault(this); } | 369 LayoutUnit maxPositiveMarginAfter() const { return m_rareData ? m_rareData->
m_margins.positiveMarginAfter() : RenderBlockFlowRareData::positiveMarginAfterDe
fault(this); } |
| 406 LayoutUnit maxNegativeMarginAfter() const { return m_rareData ? m_rareData->
m_margins.negativeMarginAfter() : RenderBlockFlowRareData::negativeMarginAfterDe
fault(this); } | 370 LayoutUnit maxNegativeMarginAfter() const { return m_rareData ? m_rareData->
m_margins.negativeMarginAfter() : RenderBlockFlowRareData::negativeMarginAfterDe
fault(this); } |
| 407 | 371 |
| 408 void setMaxMarginBeforeValues(LayoutUnit pos, LayoutUnit neg); | 372 void setMaxMarginBeforeValues(LayoutUnit pos, LayoutUnit neg); |
| 409 void setMaxMarginAfterValues(LayoutUnit pos, LayoutUnit neg); | 373 void setMaxMarginAfterValues(LayoutUnit pos, LayoutUnit neg); |
| 410 | 374 |
| 411 void setMustDiscardMarginBefore(bool = true); | 375 void setMustDiscardMarginBefore(bool = true); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 void setCollapsedBottomMargin(const MarginInfo&); | 408 void setCollapsedBottomMargin(const MarginInfo&); |
| 445 | 409 |
| 446 LayoutUnit applyBeforeBreak(RenderBox* child, LayoutUnit logicalOffset); //
If the child has a before break, then return a new yPos that shifts to the top o
f the next page/column. | 410 LayoutUnit applyBeforeBreak(RenderBox* child, LayoutUnit logicalOffset); //
If the child has a before break, then return a new yPos that shifts to the top o
f the next page/column. |
| 447 LayoutUnit applyAfterBreak(RenderBox* child, LayoutUnit logicalOffset, Margi
nInfo&); // If the child has an after break, then return a new offset that shift
s to the top of the next page/column. | 411 LayoutUnit applyAfterBreak(RenderBox* child, LayoutUnit logicalOffset, Margi
nInfo&); // If the child has an after break, then return a new offset that shift
s to the top of the next page/column. |
| 448 | 412 |
| 449 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTopAfterClear, La
youtUnit estimateWithoutPagination, RenderBox* child, bool atBeforeSideOfBlock); | 413 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTopAfterClear, La
youtUnit estimateWithoutPagination, RenderBox* child, bool atBeforeSideOfBlock); |
| 450 | 414 |
| 451 // Used to store state between styleWillChange and styleDidChange | 415 // Used to store state between styleWillChange and styleDidChange |
| 452 static bool s_canPropagateFloatIntoSibling; | 416 static bool s_canPropagateFloatIntoSibling; |
| 453 | 417 |
| 454 virtual bool canHaveChildren() const OVERRIDE; | |
| 455 virtual bool canHaveGeneratedChildren() const OVERRIDE; | |
| 456 | |
| 457 void createRenderNamedFlowFragmentIfNeeded(); | |
| 458 | |
| 459 RenderBlockFlowRareData& ensureRareData(); | 418 RenderBlockFlowRareData& ensureRareData(); |
| 460 | 419 |
| 461 LayoutUnit m_repaintLogicalTop; | 420 LayoutUnit m_repaintLogicalTop; |
| 462 LayoutUnit m_repaintLogicalBottom; | 421 LayoutUnit m_repaintLogicalBottom; |
| 463 | 422 |
| 464 virtual bool isSelfCollapsingBlock() const OVERRIDE; | 423 virtual bool isSelfCollapsingBlock() const OVERRIDE; |
| 465 protected: | 424 protected: |
| 466 OwnPtr<RenderBlockFlowRareData> m_rareData; | 425 OwnPtr<RenderBlockFlowRareData> m_rareData; |
| 467 OwnPtr<FloatingObjects> m_floatingObjects; | 426 OwnPtr<FloatingObjects> m_floatingObjects; |
| 468 | 427 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 | 468 |
| 510 // END METHODS DEFINED IN RenderBlockLineLayout | 469 // END METHODS DEFINED IN RenderBlockLineLayout |
| 511 | 470 |
| 512 }; | 471 }; |
| 513 | 472 |
| 514 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); | 473 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); |
| 515 | 474 |
| 516 } // namespace WebCore | 475 } // namespace WebCore |
| 517 | 476 |
| 518 #endif // RenderBlockFlow_h | 477 #endif // RenderBlockFlow_h |
| OLD | NEW |