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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 // |siblingThatMayBeDeleted| will be dead. We'll only be able to merge if bo
th blocks are | 411 // |siblingThatMayBeDeleted| will be dead. We'll only be able to merge if bo
th blocks are |
412 // anonymous. | 412 // anonymous. |
413 bool mergeSiblingContiguousAnonymousBlock(LayoutBlockFlow* siblingThatMayBeD
eleted); | 413 bool mergeSiblingContiguousAnonymousBlock(LayoutBlockFlow* siblingThatMayBeD
eleted); |
414 | 414 |
415 // Reparent subsequent or preceding adjacent floating or out-of-flow sibling
s into this object. | 415 // Reparent subsequent or preceding adjacent floating or out-of-flow sibling
s into this object. |
416 void reparentSubsequentFloatingOrOutOfFlowSiblings(); | 416 void reparentSubsequentFloatingOrOutOfFlowSiblings(); |
417 void reparentPrecedingFloatingOrOutOfFlowSiblings(); | 417 void reparentPrecedingFloatingOrOutOfFlowSiblings(); |
418 | 418 |
419 void makeChildrenInlineIfPossible(); | 419 void makeChildrenInlineIfPossible(); |
420 | 420 |
| 421 void makeChildrenNonInline(LayoutObject* insertionPoint = nullptr); |
| 422 void childBecameNonInline(LayoutObject* child) final; |
| 423 |
421 void updateLogicalWidthForAlignment(const ETextAlign&, const RootInlineBox*,
BidiRun* trailingSpaceRun, LayoutUnit& logicalLeft, LayoutUnit& totalLogicalWid
th, LayoutUnit& availableLogicalWidth, unsigned expansionOpportunityCount); | 424 void updateLogicalWidthForAlignment(const ETextAlign&, const RootInlineBox*,
BidiRun* trailingSpaceRun, LayoutUnit& logicalLeft, LayoutUnit& totalLogicalWid
th, LayoutUnit& availableLogicalWidth, unsigned expansionOpportunityCount); |
422 void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bo
ol& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight); | 425 void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bo
ol& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight); |
423 | 426 |
424 bool shouldBreakAtLineToAvoidWidow() const { return m_rareData && m_rareData
->m_lineBreakToAvoidWidow >= 0; } | 427 bool shouldBreakAtLineToAvoidWidow() const { return m_rareData && m_rareData
->m_lineBreakToAvoidWidow >= 0; } |
425 void clearShouldBreakAtLineToAvoidWidow() const; | 428 void clearShouldBreakAtLineToAvoidWidow() const; |
426 int lineBreakToAvoidWidow() const { return m_rareData ? m_rareData->m_lineBr
eakToAvoidWidow : -1; } | 429 int lineBreakToAvoidWidow() const { return m_rareData ? m_rareData->m_lineBr
eakToAvoidWidow : -1; } |
427 void setBreakAtLineToAvoidWidow(int); | 430 void setBreakAtLineToAvoidWidow(int); |
428 void clearDidBreakAtLineToAvoidWidow(); | 431 void clearDidBreakAtLineToAvoidWidow(); |
429 void setDidBreakAtLineToAvoidWidow(); | 432 void setDidBreakAtLineToAvoidWidow(); |
430 bool didBreakAtLineToAvoidWidow() const { return m_rareData && m_rareData->m
_didBreakAtLineToAvoidWidow; } | 433 bool didBreakAtLineToAvoidWidow() const { return m_rareData && m_rareData->m
_didBreakAtLineToAvoidWidow; } |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 bool isSelfCollapsingBlock() const override; | 609 bool isSelfCollapsingBlock() const override; |
607 bool checkIfIsSelfCollapsingBlock() const; | 610 bool checkIfIsSelfCollapsingBlock() const; |
608 | 611 |
609 protected: | 612 protected: |
610 OwnPtr<LayoutBlockFlowRareData> m_rareData; | 613 OwnPtr<LayoutBlockFlowRareData> m_rareData; |
611 OwnPtr<FloatingObjects> m_floatingObjects; | 614 OwnPtr<FloatingObjects> m_floatingObjects; |
612 | 615 |
613 friend class MarginInfo; | 616 friend class MarginInfo; |
614 friend class LineWidth; // needs to know FloatingObject | 617 friend class LineWidth; // needs to know FloatingObject |
615 | 618 |
| 619 // LayoutRubyBase objects need to be able to split and merge, moving their c
hildren around |
| 620 // (calling makeChildrenNonInline). |
| 621 // TODO(mstensho): Try to get rid of this friendship. |
| 622 friend class LayoutRubyBase; |
| 623 |
616 // FIXME-BLOCKFLOW: These methods have implementations in | 624 // FIXME-BLOCKFLOW: These methods have implementations in |
617 // LayoutBlockFlowLine. They should be moved to the proper header once the | 625 // LayoutBlockFlowLine. They should be moved to the proper header once the |
618 // line layout code is separated from LayoutBlock and LayoutBlockFlow. | 626 // line layout code is separated from LayoutBlock and LayoutBlockFlow. |
619 // START METHODS DEFINED IN LayoutBlockFlowLine | 627 // START METHODS DEFINED IN LayoutBlockFlowLine |
620 private: | 628 private: |
621 InlineFlowBox* createLineBoxes(LineLayoutItem, const LineInfo&, InlineBox* c
hildBox); | 629 InlineFlowBox* createLineBoxes(LineLayoutItem, const LineInfo&, InlineBox* c
hildBox); |
622 RootInlineBox* constructLine(BidiRunList<BidiRun>&, const LineInfo&); | 630 RootInlineBox* constructLine(BidiRunList<BidiRun>&, const LineInfo&); |
623 void setMarginsForRubyRun(BidiRun*, LayoutRubyRun*, LayoutObject*, const Lin
eInfo&); | 631 void setMarginsForRubyRun(BidiRun*, LayoutRubyRun*, LayoutObject*, const Lin
eInfo&); |
624 void computeInlineDirectionPositionsForLine(RootInlineBox*, const LineInfo&,
BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd, GlyphOverflowAnd
FallbackFontsMap&, VerticalPositionCache&, WordMeasurements&); | 632 void computeInlineDirectionPositionsForLine(RootInlineBox*, const LineInfo&,
BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd, GlyphOverflowAnd
FallbackFontsMap&, VerticalPositionCache&, WordMeasurements&); |
625 BidiRun* computeInlineDirectionPositionsForSegment(RootInlineBox*, const Lin
eInfo&, ETextAlign, LayoutUnit& logicalLeft, | 633 BidiRun* computeInlineDirectionPositionsForSegment(RootInlineBox*, const Lin
eInfo&, ETextAlign, LayoutUnit& logicalLeft, |
(...skipping 23 matching lines...) Expand all Loading... |
649 | 657 |
650 // END METHODS DEFINED IN LayoutBlockFlowLine | 658 // END METHODS DEFINED IN LayoutBlockFlowLine |
651 | 659 |
652 }; | 660 }; |
653 | 661 |
654 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); | 662 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); |
655 | 663 |
656 } // namespace blink | 664 } // namespace blink |
657 | 665 |
658 #endif // LayoutBlockFlow_h | 666 #endif // LayoutBlockFlow_h |
OLD | NEW |