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) |
| 68 - logicalLeftOffsetForLine(position, shouldIndentText, logicalHeight
)); |
95 } | 69 } |
96 LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool shouldIndentT
ext, LayoutUnit logicalHeight = 0) const | 70 LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool shouldIndentT
ext, LayoutUnit logicalHeight = 0) const |
97 { | 71 { |
98 return logicalRightOffsetForLine(position, logicalRightOffsetForContent(
position), shouldIndentText, logicalHeight); | 72 return logicalRightOffsetForLine(position, logicalRightOffsetForContent(
), shouldIndentText, logicalHeight); |
99 } | 73 } |
100 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, bool shouldIndentTe
xt, LayoutUnit logicalHeight = 0) const | 74 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, bool shouldIndentTe
xt, LayoutUnit logicalHeight = 0) const |
101 { | 75 { |
102 return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(po
sition), shouldIndentText, logicalHeight); | 76 return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(),
shouldIndentText, logicalHeight); |
103 } | 77 } |
104 LayoutUnit pixelSnappedLogicalLeftOffsetForLine(LayoutUnit position, bool sh
ouldIndentText, LayoutUnit logicalHeight = 0) const | 78 LayoutUnit pixelSnappedLogicalLeftOffsetForLine(LayoutUnit position, bool sh
ouldIndentText, LayoutUnit logicalHeight = 0) const |
105 { | 79 { |
106 return roundToInt(logicalLeftOffsetForLine(position, shouldIndentText, l
ogicalHeight)); | 80 return roundToInt(logicalLeftOffsetForLine(position, shouldIndentText, l
ogicalHeight)); |
107 } | 81 } |
108 LayoutUnit pixelSnappedLogicalRightOffsetForLine(LayoutUnit position, bool s
houldIndentText, LayoutUnit logicalHeight = 0) const | 82 LayoutUnit pixelSnappedLogicalRightOffsetForLine(LayoutUnit position, bool s
houldIndentText, LayoutUnit logicalHeight = 0) const |
109 { | 83 { |
110 // FIXME: Multicolumn layouts break carrying over subpixel values to the
logical right offset because the lines may be shifted | 84 // 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 | 85 // 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. | 86 // 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 | 87 // https://bugs.webkit.org/show_bug.cgi?id=105461 |
114 return floorToInt(logicalRightOffsetForLine(position, shouldIndentText,
logicalHeight)); | 88 return floorToInt(logicalRightOffsetForLine(position, shouldIndentText,
logicalHeight)); |
115 } | 89 } |
116 LayoutUnit startOffsetForLine(LayoutUnit position, bool shouldIndentText, La
youtUnit logicalHeight = 0) const | 90 LayoutUnit startOffsetForLine(LayoutUnit position, bool shouldIndentText, La
youtUnit logicalHeight = 0) const |
117 { | 91 { |
118 return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(posi
tion, shouldIndentText, logicalHeight) | 92 return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(posi
tion, shouldIndentText, logicalHeight) |
119 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT
ext, logicalHeight); | 93 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT
ext, logicalHeight); |
120 } | 94 } |
121 LayoutUnit endOffsetForLine(LayoutUnit position, bool shouldIndentText, Layo
utUnit logicalHeight = 0) const | 95 LayoutUnit endOffsetForLine(LayoutUnit position, bool shouldIndentText, Layo
utUnit logicalHeight = 0) const |
122 { | 96 { |
123 return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(pos
ition, shouldIndentText, logicalHeight) | 97 return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(pos
ition, shouldIndentText, logicalHeight) |
124 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT
ext, logicalHeight); | 98 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT
ext, logicalHeight); |
125 } | 99 } |
126 | 100 |
127 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout
Unit position) OVERRIDE; | 101 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout
Unit position) OVERRIDE; |
128 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou
tUnit position) OVERRIDE; | 102 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou
tUnit position) OVERRIDE; |
129 | 103 |
130 LayoutUnit computeStartPositionDeltaForChildAvoidingFloats(const RenderBox*
child, LayoutUnit childMarginStart, RenderRegion* = 0); | 104 LayoutUnit computeStartPositionDeltaForChildAvoidingFloats(const RenderBox*
child, LayoutUnit childMarginStart); |
131 | 105 |
132 RootInlineBox* createAndAppendRootInlineBox(); | 106 RootInlineBox* createAndAppendRootInlineBox(); |
133 | 107 |
134 void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = 0, boo
l inLayout = true); | 108 void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = 0, boo
l inLayout = true); |
135 void markSiblingsWithFloatsForLayout(RenderBox* floatToRemove = 0); | 109 void markSiblingsWithFloatsForLayout(RenderBox* floatToRemove = 0); |
136 | 110 |
137 virtual bool containsFloats() const OVERRIDE FINAL { return m_floatingObject
s && !m_floatingObjects->set().isEmpty(); } | 111 virtual bool containsFloats() const OVERRIDE FINAL { return m_floatingObject
s && !m_floatingObjects->set().isEmpty(); } |
138 bool containsFloat(RenderBox*) const; | 112 bool containsFloat(RenderBox*) const; |
139 | 113 |
140 void removeFloatingObjects(); | 114 void removeFloatingObjects(); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 220 |
247 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed
Offset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const | 221 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed
Offset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const |
248 { | 222 { |
249 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo
gicalTop, fixedOffset, logicalHeight), applyTextIndent); | 223 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo
gicalTop, fixedOffset, logicalHeight), applyTextIndent); |
250 } | 224 } |
251 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO
ffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const | 225 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO
ffset, bool applyTextIndent, LayoutUnit logicalHeight = 0) const |
252 { | 226 { |
253 return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logi
calTop, fixedOffset, logicalHeight), applyTextIndent); | 227 return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logi
calTop, fixedOffset, logicalHeight), applyTextIndent); |
254 } | 228 } |
255 | 229 |
256 virtual void insertedIntoTree() OVERRIDE; | |
257 virtual void willBeDestroyed() OVERRIDE; | 230 virtual void willBeDestroyed() OVERRIDE; |
258 private: | 231 private: |
259 void layoutBlockFlow(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0
); | 232 void layoutBlockFlow(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0
); |
260 void layoutBlockChildren(bool relayoutChildren, LayoutUnit& maxFloatLogicalB
ottom, SubtreeLayoutScope&, LayoutUnit beforeEdge, LayoutUnit afterEdge); | 233 void layoutBlockChildren(bool relayoutChildren, LayoutUnit& maxFloatLogicalB
ottom, SubtreeLayoutScope&, LayoutUnit beforeEdge, LayoutUnit afterEdge); |
261 | 234 |
262 void layoutBlockChild(RenderBox* child, MarginInfo&, LayoutUnit& previousFlo
atLogicalBottom, LayoutUnit& maxFloatLogicalBottom); | 235 void layoutBlockChild(RenderBox* child, MarginInfo&, LayoutUnit& previousFlo
atLogicalBottom, LayoutUnit& maxFloatLogicalBottom); |
263 void adjustPositionedBlock(RenderBox* child, const MarginInfo&); | 236 void adjustPositionedBlock(RenderBox* child, const MarginInfo&); |
264 void adjustFloatingBlock(const MarginInfo&); | 237 void adjustFloatingBlock(const MarginInfo&); |
265 | 238 |
266 LayoutPoint flipFloatForWritingModeForChild(const FloatingObject*, const Lay
outPoint&) const; | 239 LayoutPoint flipFloatForWritingModeForChild(const FloatingObject*, const Lay
outPoint&) const; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 | 342 |
370 // Allocated only when some of these fields have non-default values | 343 // Allocated only when some of these fields have non-default values |
371 struct RenderBlockFlowRareData { | 344 struct RenderBlockFlowRareData { |
372 WTF_MAKE_NONCOPYABLE(RenderBlockFlowRareData); WTF_MAKE_FAST_ALLOCATED; | 345 WTF_MAKE_NONCOPYABLE(RenderBlockFlowRareData); WTF_MAKE_FAST_ALLOCATED; |
373 public: | 346 public: |
374 RenderBlockFlowRareData(const RenderBlockFlow* block) | 347 RenderBlockFlowRareData(const RenderBlockFlow* block) |
375 : m_margins(positiveMarginBeforeDefault(block), negativeMarginBefore
Default(block), positiveMarginAfterDefault(block), negativeMarginAfterDefault(bl
ock)) | 348 : m_margins(positiveMarginBeforeDefault(block), negativeMarginBefore
Default(block), positiveMarginAfterDefault(block), negativeMarginAfterDefault(bl
ock)) |
376 , m_lineGridBox(0) | 349 , m_lineGridBox(0) |
377 , m_discardMarginBefore(false) | 350 , m_discardMarginBefore(false) |
378 , m_discardMarginAfter(false) | 351 , m_discardMarginAfter(false) |
379 , m_renderNamedFlowFragment(0) | |
380 { | 352 { |
381 } | 353 } |
382 | 354 |
383 static LayoutUnit positiveMarginBeforeDefault(const RenderBlockFlow* blo
ck) | 355 static LayoutUnit positiveMarginBeforeDefault(const RenderBlockFlow* blo
ck) |
384 { | 356 { |
385 return std::max<LayoutUnit>(block->marginBefore(), 0); | 357 return std::max<LayoutUnit>(block->marginBefore(), 0); |
386 } | 358 } |
387 static LayoutUnit negativeMarginBeforeDefault(const RenderBlockFlow* blo
ck) | 359 static LayoutUnit negativeMarginBeforeDefault(const RenderBlockFlow* blo
ck) |
388 { | 360 { |
389 return std::max<LayoutUnit>(-block->marginBefore(), 0); | 361 return std::max<LayoutUnit>(-block->marginBefore(), 0); |
390 } | 362 } |
391 static LayoutUnit positiveMarginAfterDefault(const RenderBlockFlow* bloc
k) | 363 static LayoutUnit positiveMarginAfterDefault(const RenderBlockFlow* bloc
k) |
392 { | 364 { |
393 return std::max<LayoutUnit>(block->marginAfter(), 0); | 365 return std::max<LayoutUnit>(block->marginAfter(), 0); |
394 } | 366 } |
395 static LayoutUnit negativeMarginAfterDefault(const RenderBlockFlow* bloc
k) | 367 static LayoutUnit negativeMarginAfterDefault(const RenderBlockFlow* bloc
k) |
396 { | 368 { |
397 return std::max<LayoutUnit>(-block->marginAfter(), 0); | 369 return std::max<LayoutUnit>(-block->marginAfter(), 0); |
398 } | 370 } |
399 | 371 |
400 MarginValues m_margins; | 372 MarginValues m_margins; |
401 | 373 |
402 RootInlineBox* m_lineGridBox; | 374 RootInlineBox* m_lineGridBox; |
403 | 375 |
404 bool m_discardMarginBefore : 1; | 376 bool m_discardMarginBefore : 1; |
405 bool m_discardMarginAfter : 1; | 377 bool m_discardMarginAfter : 1; |
406 RenderNamedFlowFragment* m_renderNamedFlowFragment; | |
407 }; | 378 }; |
408 LayoutUnit marginOffsetForSelfCollapsingBlock(); | 379 LayoutUnit marginOffsetForSelfCollapsingBlock(); |
409 | 380 |
410 RenderNamedFlowFragment* renderNamedFlowFragment() const { return m_rareData
? m_rareData->m_renderNamedFlowFragment : 0; } | |
411 void setRenderNamedFlowFragment(RenderNamedFlowFragment*); | |
412 | |
413 protected: | 381 protected: |
414 LayoutUnit maxPositiveMarginBefore() const { return m_rareData ? m_rareData-
>m_margins.positiveMarginBefore() : RenderBlockFlowRareData::positiveMarginBefor
eDefault(this); } | 382 LayoutUnit maxPositiveMarginBefore() const { return m_rareData ? m_rareData-
>m_margins.positiveMarginBefore() : RenderBlockFlowRareData::positiveMarginBefor
eDefault(this); } |
415 LayoutUnit maxNegativeMarginBefore() const { return m_rareData ? m_rareData-
>m_margins.negativeMarginBefore() : RenderBlockFlowRareData::negativeMarginBefor
eDefault(this); } | 383 LayoutUnit maxNegativeMarginBefore() const { return m_rareData ? m_rareData-
>m_margins.negativeMarginBefore() : RenderBlockFlowRareData::negativeMarginBefor
eDefault(this); } |
416 LayoutUnit maxPositiveMarginAfter() const { return m_rareData ? m_rareData->
m_margins.positiveMarginAfter() : RenderBlockFlowRareData::positiveMarginAfterDe
fault(this); } | 384 LayoutUnit maxPositiveMarginAfter() const { return m_rareData ? m_rareData->
m_margins.positiveMarginAfter() : RenderBlockFlowRareData::positiveMarginAfterDe
fault(this); } |
417 LayoutUnit maxNegativeMarginAfter() const { return m_rareData ? m_rareData->
m_margins.negativeMarginAfter() : RenderBlockFlowRareData::negativeMarginAfterDe
fault(this); } | 385 LayoutUnit maxNegativeMarginAfter() const { return m_rareData ? m_rareData->
m_margins.negativeMarginAfter() : RenderBlockFlowRareData::negativeMarginAfterDe
fault(this); } |
418 | 386 |
419 void setMaxMarginBeforeValues(LayoutUnit pos, LayoutUnit neg); | 387 void setMaxMarginBeforeValues(LayoutUnit pos, LayoutUnit neg); |
420 void setMaxMarginAfterValues(LayoutUnit pos, LayoutUnit neg); | 388 void setMaxMarginAfterValues(LayoutUnit pos, LayoutUnit neg); |
421 | 389 |
422 void setMustDiscardMarginBefore(bool = true); | 390 void setMustDiscardMarginBefore(bool = true); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 void setCollapsedBottomMargin(const MarginInfo&); | 423 void setCollapsedBottomMargin(const MarginInfo&); |
456 | 424 |
457 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. | 425 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. |
458 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. | 426 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. |
459 | 427 |
460 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTopAfterClear, La
youtUnit estimateWithoutPagination, RenderBox* child, bool atBeforeSideOfBlock); | 428 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTopAfterClear, La
youtUnit estimateWithoutPagination, RenderBox* child, bool atBeforeSideOfBlock); |
461 | 429 |
462 // Used to store state between styleWillChange and styleDidChange | 430 // Used to store state between styleWillChange and styleDidChange |
463 static bool s_canPropagateFloatIntoSibling; | 431 static bool s_canPropagateFloatIntoSibling; |
464 | 432 |
465 virtual bool canHaveChildren() const OVERRIDE; | |
466 virtual bool canHaveGeneratedChildren() const OVERRIDE; | |
467 | |
468 void createRenderNamedFlowFragmentIfNeeded(); | |
469 | |
470 RenderBlockFlowRareData& ensureRareData(); | 433 RenderBlockFlowRareData& ensureRareData(); |
471 | 434 |
472 LayoutUnit m_repaintLogicalTop; | 435 LayoutUnit m_repaintLogicalTop; |
473 LayoutUnit m_repaintLogicalBottom; | 436 LayoutUnit m_repaintLogicalBottom; |
474 | 437 |
475 virtual bool isSelfCollapsingBlock() const OVERRIDE; | 438 virtual bool isSelfCollapsingBlock() const OVERRIDE; |
476 protected: | 439 protected: |
477 OwnPtr<RenderBlockFlowRareData> m_rareData; | 440 OwnPtr<RenderBlockFlowRareData> m_rareData; |
478 OwnPtr<FloatingObjects> m_floatingObjects; | 441 OwnPtr<FloatingObjects> m_floatingObjects; |
479 | 442 |
(...skipping 15 matching lines...) Expand all Loading... |
495 float& availableLogicalWidth, BidiRun* firstRun, BidiRun* trailingSpaceR
un, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache&, Wo
rdMeasurements&); | 458 float& availableLogicalWidth, BidiRun* firstRun, BidiRun* trailingSpaceR
un, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache&, Wo
rdMeasurements&); |
496 void computeBlockDirectionPositionsForLine(RootInlineBox*, BidiRun*, GlyphOv
erflowAndFallbackFontsMap&, VerticalPositionCache&); | 459 void computeBlockDirectionPositionsForLine(RootInlineBox*, BidiRun*, GlyphOv
erflowAndFallbackFontsMap&, VerticalPositionCache&); |
497 BidiRun* handleTrailingSpaces(BidiRunList<BidiRun>&, BidiContext*); | 460 BidiRun* handleTrailingSpaces(BidiRunList<BidiRun>&, BidiContext*); |
498 void appendFloatingObjectToLastLine(FloatingObject*); | 461 void appendFloatingObjectToLastLine(FloatingObject*); |
499 // Helper function for layoutInlineChildren() | 462 // Helper function for layoutInlineChildren() |
500 RootInlineBox* createLineBoxesFromBidiRuns(unsigned bidiLevel, BidiRunList<B
idiRun>&, const InlineIterator& end, LineInfo&, VerticalPositionCache&, BidiRun*
trailingSpaceRun, WordMeasurements&); | 463 RootInlineBox* createLineBoxesFromBidiRuns(unsigned bidiLevel, BidiRunList<B
idiRun>&, const InlineIterator& end, LineInfo&, VerticalPositionCache&, BidiRun*
trailingSpaceRun, WordMeasurements&); |
501 void layoutRunsAndFloats(LineLayoutState&, bool hasInlineChild); | 464 void layoutRunsAndFloats(LineLayoutState&, bool hasInlineChild); |
502 const InlineIterator& restartLayoutRunsAndFloatsInRange(LayoutUnit oldLogica
lHeight, LayoutUnit newLogicalHeight, FloatingObject* lastFloatFromPreviousLine
, InlineBidiResolver&, const InlineIterator&); | 465 const InlineIterator& restartLayoutRunsAndFloatsInRange(LayoutUnit oldLogica
lHeight, LayoutUnit newLogicalHeight, FloatingObject* lastFloatFromPreviousLine
, InlineBidiResolver&, const InlineIterator&); |
503 void layoutRunsAndFloatsInRange(LineLayoutState&, InlineBidiResolver&, const
InlineIterator& cleanLineStart, const BidiStatus& cleanLineBidiStatus, unsigned
consecutiveHyphenatedLines); | 466 void layoutRunsAndFloatsInRange(LineLayoutState&, InlineBidiResolver&, const
InlineIterator& cleanLineStart, const BidiStatus& cleanLineBidiStatus, unsigned
consecutiveHyphenatedLines); |
504 void updateShapeAndSegmentsForCurrentLine(ShapeInsideInfo*&, const LayoutSiz
e&, LineLayoutState&); | 467 void updateShapeAndSegmentsForCurrentLine(ShapeInsideInfo*&, const LayoutSiz
e&, LineLayoutState&); |
505 void updateShapeAndSegmentsForCurrentLineInFlowThread(ShapeInsideInfo*&, Lin
eLayoutState&); | |
506 bool adjustLogicalLineTopAndLogicalHeightIfNeeded(ShapeInsideInfo*, LayoutUn
it, LineLayoutState&, InlineBidiResolver&, FloatingObject*, InlineIterator&, Wor
dMeasurements&); | 468 bool adjustLogicalLineTopAndLogicalHeightIfNeeded(ShapeInsideInfo*, LayoutUn
it, LineLayoutState&, InlineBidiResolver&, FloatingObject*, InlineIterator&, Wor
dMeasurements&); |
507 void linkToEndLineIfNeeded(LineLayoutState&); | 469 void linkToEndLineIfNeeded(LineLayoutState&); |
508 static void repaintDirtyFloats(Vector<FloatWithRect>& floats); | 470 static void repaintDirtyFloats(Vector<FloatWithRect>& floats); |
509 void checkFloatsInCleanLine(RootInlineBox*, Vector<FloatWithRect>&, size_t&
floatIndex, bool& encounteredNewFloat, bool& dirtiedByFloat); | 471 void checkFloatsInCleanLine(RootInlineBox*, Vector<FloatWithRect>&, size_t&
floatIndex, bool& encounteredNewFloat, bool& dirtiedByFloat); |
510 RootInlineBox* determineStartPosition(LineLayoutState&, InlineBidiResolver&)
; | 472 RootInlineBox* determineStartPosition(LineLayoutState&, InlineBidiResolver&)
; |
511 void determineEndPosition(LineLayoutState&, RootInlineBox* startBox, InlineI
terator& cleanLineStart, BidiStatus& cleanLineBidiStatus); | 473 void determineEndPosition(LineLayoutState&, RootInlineBox* startBox, InlineI
terator& cleanLineStart, BidiStatus& cleanLineBidiStatus); |
512 bool checkPaginationAndFloatsAtEndLine(LineLayoutState&); | 474 bool checkPaginationAndFloatsAtEndLine(LineLayoutState&); |
513 bool matchedEndLine(LineLayoutState&, const InlineBidiResolver&, const Inlin
eIterator& endLineStart, const BidiStatus& endLineStatus); | 475 bool matchedEndLine(LineLayoutState&, const InlineBidiResolver&, const Inlin
eIterator& endLineStart, const BidiStatus& endLineStatus); |
514 void deleteEllipsisLineBoxes(); | 476 void deleteEllipsisLineBoxes(); |
515 void checkLinesForTextOverflow(); | 477 void checkLinesForTextOverflow(); |
516 // Positions new floats and also adjust all floats encountered on the line i
f any of them | 478 // Positions new floats and also adjust all floats encountered on the line i
f any of them |
517 // have to move to the next page/column. | 479 // have to move to the next page/column. |
518 bool positionNewFloatOnLine(FloatingObject* newFloat, FloatingObject* lastFl
oatFromPreviousLine, LineInfo&, LineWidth&); | 480 bool positionNewFloatOnLine(FloatingObject* newFloat, FloatingObject* lastFl
oatFromPreviousLine, LineInfo&, LineWidth&); |
519 | 481 |
520 | 482 |
521 // END METHODS DEFINED IN RenderBlockLineLayout | 483 // END METHODS DEFINED IN RenderBlockLineLayout |
522 | 484 |
523 }; | 485 }; |
524 | 486 |
525 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); | 487 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); |
526 | 488 |
527 } // namespace WebCore | 489 } // namespace WebCore |
528 | 490 |
529 #endif // RenderBlockFlow_h | 491 #endif // RenderBlockFlow_h |
OLD | NEW |