| 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 26 matching lines...) Expand all Loading... |
| 37 #define LayoutBlockFlow_h | 37 #define LayoutBlockFlow_h |
| 38 | 38 |
| 39 #include "core/CoreExport.h" | 39 #include "core/CoreExport.h" |
| 40 #include "core/layout/FloatingObjects.h" | 40 #include "core/layout/FloatingObjects.h" |
| 41 #include "core/layout/LayoutBlock.h" | 41 #include "core/layout/LayoutBlock.h" |
| 42 #include "core/layout/line/TrailingObjects.h" | 42 #include "core/layout/line/TrailingObjects.h" |
| 43 #include "core/style/ComputedStyleConstants.h" | 43 #include "core/style/ComputedStyleConstants.h" |
| 44 | 44 |
| 45 namespace blink { | 45 namespace blink { |
| 46 | 46 |
| 47 class BlockChildrenLayoutInfo; |
| 47 class ClipScope; | 48 class ClipScope; |
| 48 class MarginInfo; | 49 class MarginInfo; |
| 49 class LineBreaker; | 50 class LineBreaker; |
| 50 class LineInfo; | 51 class LineInfo; |
| 51 class LineWidth; | 52 class LineWidth; |
| 52 class LayoutMultiColumnFlowThread; | 53 class LayoutMultiColumnFlowThread; |
| 53 class LayoutMultiColumnSpannerPlaceholder; | 54 class LayoutMultiColumnSpannerPlaceholder; |
| 54 class LayoutRubyRun; | 55 class LayoutRubyRun; |
| 55 template <class Run> class BidiRunList; | 56 template <class Run> class BidiRunList; |
| 56 | 57 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 void setLogicalTopForChild(LayoutBox& child, LayoutUnit logicalTop); | 313 void setLogicalTopForChild(LayoutBox& child, LayoutUnit logicalTop); |
| 313 void determineLogicalLeftPositionForChild(LayoutBox& child); | 314 void determineLogicalLeftPositionForChild(LayoutBox& child); |
| 314 | 315 |
| 315 PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationState&, con
st LayoutBoxModelObject& paintInvalidationContainer) override; | 316 PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationState&, con
st LayoutBoxModelObject& paintInvalidationContainer) override; |
| 316 | 317 |
| 317 private: | 318 private: |
| 318 bool layoutBlockFlow(bool relayoutChildren, LayoutUnit& pageLogicalHeight, S
ubtreeLayoutScope&); | 319 bool layoutBlockFlow(bool relayoutChildren, LayoutUnit& pageLogicalHeight, S
ubtreeLayoutScope&); |
| 319 void layoutBlockChildren(bool relayoutChildren, SubtreeLayoutScope&, LayoutU
nit beforeEdge, LayoutUnit afterEdge); | 320 void layoutBlockChildren(bool relayoutChildren, SubtreeLayoutScope&, LayoutU
nit beforeEdge, LayoutUnit afterEdge); |
| 320 | 321 |
| 321 void markDescendantsWithFloatsForLayoutIfNeeded(LayoutBlockFlow& child, Layo
utUnit newLogicalTop, LayoutUnit previousFloatLogicalBottom); | 322 void markDescendantsWithFloatsForLayoutIfNeeded(LayoutBlockFlow& child, Layo
utUnit newLogicalTop, LayoutUnit previousFloatLogicalBottom); |
| 322 bool positionAndLayoutOnceIfNeeded(LayoutBox& child, LayoutUnit newLogicalTo
p, LayoutUnit& previousFloatLogicalBottom); | 323 bool positionAndLayoutOnceIfNeeded(LayoutBox& child, LayoutUnit newLogicalTo
p, BlockChildrenLayoutInfo&); |
| 323 void layoutBlockChild(LayoutBox& child, MarginInfo&, LayoutUnit& previousFlo
atLogicalBottom); | 324 void layoutBlockChild(LayoutBox& child, BlockChildrenLayoutInfo&); |
| 324 void adjustPositionedBlock(LayoutBox& child, const MarginInfo&); | 325 void adjustPositionedBlock(LayoutBox& child, const MarginInfo&); |
| 325 void adjustFloatingBlock(const MarginInfo&); | 326 void adjustFloatingBlock(const MarginInfo&); |
| 326 | 327 |
| 327 LayoutPoint computeLogicalLocationForFloat(const FloatingObject&, LayoutUnit
logicalTopOffset) const; | 328 LayoutPoint computeLogicalLocationForFloat(const FloatingObject&, LayoutUnit
logicalTopOffset) const; |
| 328 | 329 |
| 329 void removeFloatingObject(LayoutBox*); | 330 void removeFloatingObject(LayoutBox*); |
| 330 void removeFloatingObjectsBelow(FloatingObject*, int logicalOffset); | 331 void removeFloatingObjectsBelow(FloatingObject*, int logicalOffset); |
| 331 | 332 |
| 332 LayoutUnit getClearDelta(LayoutBox* child, LayoutUnit yPos); | 333 LayoutUnit getClearDelta(LayoutBox* child, LayoutUnit yPos); |
| 333 | 334 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 LayoutUnit collapseMargins(LayoutBox& child, MarginInfo&, bool childIsSelfCo
llapsing, bool childDiscardMarginBefore, bool childDiscardMarginAfter); | 527 LayoutUnit collapseMargins(LayoutBox& child, MarginInfo&, bool childIsSelfCo
llapsing, bool childDiscardMarginBefore, bool childDiscardMarginAfter); |
| 527 LayoutUnit clearFloatsIfNeeded(LayoutBox& child, MarginInfo&, LayoutUnit old
TopPosMargin, LayoutUnit oldTopNegMargin, LayoutUnit yPos, bool childIsSelfColla
psing, bool childDiscardMargin); | 528 LayoutUnit clearFloatsIfNeeded(LayoutBox& child, MarginInfo&, LayoutUnit old
TopPosMargin, LayoutUnit oldTopNegMargin, LayoutUnit yPos, bool childIsSelfColla
psing, bool childDiscardMargin); |
| 528 LayoutUnit estimateLogicalTopPosition(LayoutBox& child, const MarginInfo&, L
ayoutUnit& estimateWithoutPagination); | 529 LayoutUnit estimateLogicalTopPosition(LayoutBox& child, const MarginInfo&, L
ayoutUnit& estimateWithoutPagination); |
| 529 void marginBeforeEstimateForChild(LayoutBox&, LayoutUnit&, LayoutUnit&, bool
&) const; | 530 void marginBeforeEstimateForChild(LayoutBox&, LayoutUnit&, LayoutUnit&, bool
&) const; |
| 530 void handleAfterSideOfBlock(LayoutBox* lastChild, LayoutUnit top, LayoutUnit
bottom, MarginInfo&); | 531 void handleAfterSideOfBlock(LayoutBox* lastChild, LayoutUnit top, LayoutUnit
bottom, MarginInfo&); |
| 531 void setCollapsedBottomMargin(const MarginInfo&); | 532 void setCollapsedBottomMargin(const MarginInfo&); |
| 532 | 533 |
| 533 LayoutUnit applyBeforeBreak(LayoutBox& 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. | 534 LayoutUnit applyBeforeBreak(LayoutBox& 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. |
| 534 LayoutUnit applyAfterBreak(LayoutBox& 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. | 535 LayoutUnit applyAfterBreak(LayoutBox& 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. |
| 535 | 536 |
| 536 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTop, LayoutBox& c
hild, bool atBeforeSideOfBlock); | 537 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTop, LayoutBox& c
hild, BlockChildrenLayoutInfo&, bool atBeforeSideOfBlock); |
| 537 // Computes a deltaOffset value that put a line at the top of the next page
if it doesn't fit on the current page. | 538 // Computes a deltaOffset value that put a line at the top of the next page
if it doesn't fit on the current page. |
| 538 void adjustLinePositionForPagination(RootInlineBox&, LayoutUnit& deltaOffset
); | 539 void adjustLinePositionForPagination(RootInlineBox&, LayoutUnit& deltaOffset
); |
| 539 // If the child is unsplittable and can't fit on the current page, return th
e top of the next page/column. | 540 // If the child is unsplittable and can't fit on the current page, return th
e top of the next page/column. |
| 540 LayoutUnit adjustForUnsplittableChild(LayoutBox&, LayoutUnit logicalOffset)
const; | 541 LayoutUnit adjustForUnsplittableChild(LayoutBox&, LayoutUnit logicalOffset)
const; |
| 541 | 542 |
| 542 // Used to store state between styleWillChange and styleDidChange | 543 // Used to store state between styleWillChange and styleDidChange |
| 543 static bool s_canPropagateFloatIntoSibling; | 544 static bool s_canPropagateFloatIntoSibling; |
| 544 | 545 |
| 545 LayoutBlockFlowRareData& ensureRareData(); | 546 LayoutBlockFlowRareData& ensureRareData(); |
| 546 | 547 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 | 593 |
| 593 // END METHODS DEFINED IN LayoutBlockFlowLine | 594 // END METHODS DEFINED IN LayoutBlockFlowLine |
| 594 | 595 |
| 595 }; | 596 }; |
| 596 | 597 |
| 597 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); | 598 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); |
| 598 | 599 |
| 599 } // namespace blink | 600 } // namespace blink |
| 600 | 601 |
| 601 #endif // LayoutBlockFlow_h | 602 #endif // LayoutBlockFlow_h |
| OLD | NEW |