Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.h

Issue 2682573002: Split EBreak enum into EBreakBetween & EBreakInside (Closed)
Patch Set: Update references to EBreak in ComputedStyle.h comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 WTF_MAKE_NONCOPYABLE(LayoutBlockFlowRareData); 670 WTF_MAKE_NONCOPYABLE(LayoutBlockFlowRareData);
671 USING_FAST_MALLOC(LayoutBlockFlowRareData); 671 USING_FAST_MALLOC(LayoutBlockFlowRareData);
672 672
673 public: 673 public:
674 LayoutBlockFlowRareData(const LayoutBlockFlow* block) 674 LayoutBlockFlowRareData(const LayoutBlockFlow* block)
675 : m_margins(positiveMarginBeforeDefault(block), 675 : m_margins(positiveMarginBeforeDefault(block),
676 negativeMarginBeforeDefault(block), 676 negativeMarginBeforeDefault(block),
677 positiveMarginAfterDefault(block), 677 positiveMarginAfterDefault(block),
678 negativeMarginAfterDefault(block)), 678 negativeMarginAfterDefault(block)),
679 m_multiColumnFlowThread(nullptr), 679 m_multiColumnFlowThread(nullptr),
680 m_breakBefore(BreakAuto), 680 m_breakBefore(static_cast<unsigned>(EBreakBetween::kAuto)),
681 m_breakAfter(BreakAuto), 681 m_breakAfter(static_cast<unsigned>(EBreakBetween::kAuto)),
682 m_lineBreakToAvoidWidow(-1), 682 m_lineBreakToAvoidWidow(-1),
683 m_didBreakAtLineToAvoidWidow(false), 683 m_didBreakAtLineToAvoidWidow(false),
684 m_discardMarginBefore(false), 684 m_discardMarginBefore(false),
685 m_discardMarginAfter(false) {} 685 m_discardMarginAfter(false) {}
686 686
687 static LayoutUnit positiveMarginBeforeDefault( 687 static LayoutUnit positiveMarginBeforeDefault(
688 const LayoutBlockFlow* block) { 688 const LayoutBlockFlow* block) {
689 return block->marginBefore().clampNegativeToZero(); 689 return block->marginBefore().clampNegativeToZero();
690 } 690 }
691 static LayoutUnit negativeMarginBeforeDefault( 691 static LayoutUnit negativeMarginBeforeDefault(
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 LayoutUnit&, 807 LayoutUnit&,
808 bool&) const; 808 bool&) const;
809 void handleAfterSideOfBlock(LayoutBox* lastChild, 809 void handleAfterSideOfBlock(LayoutBox* lastChild,
810 LayoutUnit top, 810 LayoutUnit top,
811 LayoutUnit bottom, 811 LayoutUnit bottom,
812 MarginInfo&); 812 MarginInfo&);
813 void setCollapsedBottomMargin(const MarginInfo&); 813 void setCollapsedBottomMargin(const MarginInfo&);
814 814
815 // Apply any forced fragmentainer break that's set on the current class A 815 // Apply any forced fragmentainer break that's set on the current class A
816 // break point. 816 // break point.
817 LayoutUnit applyForcedBreak(LayoutUnit logicalOffset, EBreak); 817 LayoutUnit applyForcedBreak(LayoutUnit logicalOffset, EBreakBetween);
818 818
819 void setBreakBefore(EBreak); 819 void setBreakBefore(EBreakBetween);
820 void setBreakAfter(EBreak); 820 void setBreakAfter(EBreakBetween);
821 EBreak breakBefore() const override; 821 EBreakBetween breakBefore() const override;
822 EBreak breakAfter() const override; 822 EBreakBetween breakAfter() const override;
823 823
824 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTop, 824 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTop,
825 LayoutBox& child, 825 LayoutBox& child,
826 BlockChildrenLayoutInfo&, 826 BlockChildrenLayoutInfo&,
827 bool atBeforeSideOfBlock); 827 bool atBeforeSideOfBlock);
828 828
829 // If a float cannot fit in the current fragmentainer, return the logical top 829 // If a float cannot fit in the current fragmentainer, return the logical top
830 // margin edge that the float needs to have in order to be pushed to the top 830 // margin edge that the float needs to have in order to be pushed to the top
831 // of the next fragmentainer. Otherwise, just return |logicalTopMarginEdge|. 831 // of the next fragmentainer. Otherwise, just return |logicalTopMarginEdge|.
832 LayoutUnit adjustFloatLogicalTopForPagination( 832 LayoutUnit adjustFloatLogicalTopForPagination(
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 void positionDialog(); 948 void positionDialog();
949 949
950 // END METHODS DEFINED IN LayoutBlockFlowLine 950 // END METHODS DEFINED IN LayoutBlockFlowLine
951 }; 951 };
952 952
953 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); 953 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow());
954 954
955 } // namespace blink 955 } // namespace blink
956 956
957 #endif // LayoutBlockFlow_h 957 #endif // LayoutBlockFlow_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ColumnBalancer.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698