| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 bool positionNewFloats(LineWidth* = nullptr); | 281 bool positionNewFloats(LineWidth* = nullptr); |
| 282 | 282 |
| 283 LayoutUnit nextFloatLogicalBottomBelow(LayoutUnit) const; | 283 LayoutUnit nextFloatLogicalBottomBelow(LayoutUnit) const; |
| 284 LayoutUnit nextFloatLogicalBottomBelowForBlock(LayoutUnit) const; | 284 LayoutUnit nextFloatLogicalBottomBelowForBlock(LayoutUnit) const; |
| 285 | 285 |
| 286 FloatingObject* lastFloatFromPreviousLine() const | 286 FloatingObject* lastFloatFromPreviousLine() const |
| 287 { | 287 { |
| 288 return containsFloats() ? m_floatingObjects->set().last().get() : nullpt
r; | 288 return containsFloats() ? m_floatingObjects->set().last().get() : nullpt
r; |
| 289 } | 289 } |
| 290 | 290 |
| 291 void invalidateDisplayItemClientsOfFirstLine(); | 291 void setShouldDoFullPaintInvalidationForFirstLine(); |
| 292 | 292 |
| 293 void simplifiedNormalFlowInlineLayout(); | 293 void simplifiedNormalFlowInlineLayout(); |
| 294 bool recalcInlineChildrenOverflowAfterStyleChange(); | 294 bool recalcInlineChildrenOverflowAfterStyleChange(); |
| 295 | 295 |
| 296 PositionWithAffinity positionForPoint(const LayoutPoint&) override; | 296 PositionWithAffinity positionForPoint(const LayoutPoint&) override; |
| 297 | 297 |
| 298 LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type = FloatingObject::F
loatLeftRight) const; | 298 LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type = FloatingObject::F
loatLeftRight) const; |
| 299 | 299 |
| 300 #ifndef NDEBUG | 300 #ifndef NDEBUG |
| 301 void showLineTreeAndMark(const InlineBox* = nullptr, const char* = nullptr,
const InlineBox* = nullptr, const char* = nullptr, const LayoutObject* = nullptr
) const; | 301 void showLineTreeAndMark(const InlineBox* = nullptr, const char* = nullptr,
const InlineBox* = nullptr, const char* = nullptr, const LayoutObject* = nullptr
) const; |
| 302 #endif | 302 #endif |
| 303 | 303 |
| 304 protected: | 304 protected: |
| 305 void rebuildFloatsFromIntruding(); | 305 void rebuildFloatsFromIntruding(); |
| 306 void layoutInlineChildren(bool relayoutChildren, LayoutUnit& paintInvalidati
onLogicalTop, LayoutUnit& paintInvalidationLogicalBottom, LayoutUnit afterEdge); | 306 void layoutInlineChildren(bool relayoutChildren, LayoutUnit afterEdge); |
| 307 void addLowestFloatFromChildren(LayoutBlockFlow*); | 307 void addLowestFloatFromChildren(LayoutBlockFlow*); |
| 308 | 308 |
| 309 void createFloatingObjects(); | 309 void createFloatingObjects(); |
| 310 | 310 |
| 311 void willBeDestroyed() override; | 311 void willBeDestroyed() override; |
| 312 void styleWillChange(StyleDifference, const ComputedStyle& newStyle) overrid
e; | 312 void styleWillChange(StyleDifference, const ComputedStyle& newStyle) overrid
e; |
| 313 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override
; | 313 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override
; |
| 314 | 314 |
| 315 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, LayoutBox&
); | 315 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, LayoutBox&
); |
| 316 | 316 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 | 372 |
| 373 bool hasOverhangingFloats() { return parent() && containsFloats() && lowestF
loatLogicalBottom() > logicalHeight(); } | 373 bool hasOverhangingFloats() { return parent() && containsFloats() && lowestF
loatLogicalBottom() > logicalHeight(); } |
| 374 bool hasOverhangingFloat(LayoutBox*); | 374 bool hasOverhangingFloat(LayoutBox*); |
| 375 void addIntrudingFloats(LayoutBlockFlow* prev, LayoutUnit xoffset, LayoutUni
t yoffset); | 375 void addIntrudingFloats(LayoutBlockFlow* prev, LayoutUnit xoffset, LayoutUni
t yoffset); |
| 376 void addOverhangingFloats(LayoutBlockFlow* child, bool makeChildPaintOtherFl
oats); | 376 void addOverhangingFloats(LayoutBlockFlow* child, bool makeChildPaintOtherFl
oats); |
| 377 bool isOverhangingFloat(const FloatingObject& floatObject) const { return lo
gicalBottomForFloat(floatObject) > logicalHeight(); } | 377 bool isOverhangingFloat(const FloatingObject& floatObject) const { return lo
gicalBottomForFloat(floatObject) > logicalHeight(); } |
| 378 | 378 |
| 379 bool hitTestFloats(HitTestResult&, const HitTestLocation& locationInContaine
r, const LayoutPoint& accumulatedOffset); | 379 bool hitTestFloats(HitTestResult&, const HitTestLocation& locationInContaine
r, const LayoutPoint& accumulatedOffset); |
| 380 | 380 |
| 381 void invalidatePaintForOverhangingFloats(bool paintAllDescendants) final; | 381 void invalidatePaintForOverhangingFloats(bool paintAllDescendants) final; |
| 382 void invalidatePaintForOverflow() final; | |
| 383 void invalidateDisplayItemClients(PaintInvalidationReason) const override; | 382 void invalidateDisplayItemClients(PaintInvalidationReason) const override; |
| 384 | 383 |
| 385 void clearFloats(EClear); | 384 void clearFloats(EClear); |
| 386 | 385 |
| 387 LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit
fixedOffset, LayoutUnit logicalHeight) const; | 386 LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit
fixedOffset, LayoutUnit logicalHeight) const; |
| 388 LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit f
ixedOffset, LayoutUnit logicalHeight) const; | 387 LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit f
ixedOffset, LayoutUnit logicalHeight) const; |
| 389 | 388 |
| 390 LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit logicalTop, Layo
utUnit fixedOffset, LayoutUnit* heightRemaining) const; | 389 LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit logicalTop, Layo
utUnit fixedOffset, LayoutUnit* heightRemaining) const; |
| 391 LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit logicalTop, Layou
tUnit fixedOffset, LayoutUnit* heightRemaining) const; | 390 LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit logicalTop, Layou
tUnit fixedOffset, LayoutUnit* heightRemaining) const; |
| 392 | 391 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 // If the child is unsplittable and can't fit on the current page, return th
e top of the next page/column. | 601 // If the child is unsplittable and can't fit on the current page, return th
e top of the next page/column. |
| 603 LayoutUnit adjustForUnsplittableChild(LayoutBox&, LayoutUnit logicalOffset)
const; | 602 LayoutUnit adjustForUnsplittableChild(LayoutBox&, LayoutUnit logicalOffset)
const; |
| 604 | 603 |
| 605 // Used to store state between styleWillChange and styleDidChange | 604 // Used to store state between styleWillChange and styleDidChange |
| 606 static bool s_canPropagateFloatIntoSibling; | 605 static bool s_canPropagateFloatIntoSibling; |
| 607 | 606 |
| 608 LineBoxList m_lineBoxes; // All of the root line boxes created for this bloc
k flow. For example, <div>Hello<br>world.</div> will have two total lines for t
he <div>. | 607 LineBoxList m_lineBoxes; // All of the root line boxes created for this bloc
k flow. For example, <div>Hello<br>world.</div> will have two total lines for t
he <div>. |
| 609 | 608 |
| 610 LayoutBlockFlowRareData& ensureRareData(); | 609 LayoutBlockFlowRareData& ensureRareData(); |
| 611 | 610 |
| 612 LayoutUnit m_paintInvalidationLogicalTop; | |
| 613 LayoutUnit m_paintInvalidationLogicalBottom; | |
| 614 | |
| 615 bool isSelfCollapsingBlock() const override; | 611 bool isSelfCollapsingBlock() const override; |
| 616 bool checkIfIsSelfCollapsingBlock() const; | 612 bool checkIfIsSelfCollapsingBlock() const; |
| 617 | 613 |
| 618 protected: | 614 protected: |
| 619 std::unique_ptr<LayoutBlockFlowRareData> m_rareData; | 615 std::unique_ptr<LayoutBlockFlowRareData> m_rareData; |
| 620 std::unique_ptr<FloatingObjects> m_floatingObjects; | 616 std::unique_ptr<FloatingObjects> m_floatingObjects; |
| 621 | 617 |
| 622 friend class MarginInfo; | 618 friend class MarginInfo; |
| 623 friend class LineWidth; // needs to know FloatingObject | 619 friend class LineWidth; // needs to know FloatingObject |
| 624 | 620 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 | 659 |
| 664 // END METHODS DEFINED IN LayoutBlockFlowLine | 660 // END METHODS DEFINED IN LayoutBlockFlowLine |
| 665 | 661 |
| 666 }; | 662 }; |
| 667 | 663 |
| 668 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); | 664 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); |
| 669 | 665 |
| 670 } // namespace blink | 666 } // namespace blink |
| 671 | 667 |
| 672 #endif // LayoutBlockFlow_h | 668 #endif // LayoutBlockFlow_h |
| OLD | NEW |