| 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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const; | 758 virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const; |
| 759 | 759 |
| 760 private: | 760 private: |
| 761 LayoutUnit collapsedMarginBefore() const final { | 761 LayoutUnit collapsedMarginBefore() const final { |
| 762 return maxPositiveMarginBefore() - maxNegativeMarginBefore(); | 762 return maxPositiveMarginBefore() - maxNegativeMarginBefore(); |
| 763 } | 763 } |
| 764 LayoutUnit collapsedMarginAfter() const final { | 764 LayoutUnit collapsedMarginAfter() const final { |
| 765 return maxPositiveMarginAfter() - maxNegativeMarginAfter(); | 765 return maxPositiveMarginAfter() - maxNegativeMarginAfter(); |
| 766 } | 766 } |
| 767 | 767 |
| 768 // Floats' margins do not collapse with page or column boundaries, and we | |
| 769 // therefore need to treat them specially in some cases. | |
| 770 LayoutUnit marginBeforeIfFloating() const { | |
| 771 return isFloating() ? marginBefore() : LayoutUnit(); | |
| 772 } | |
| 773 | |
| 774 LayoutUnit collapseMargins(LayoutBox& child, | 768 LayoutUnit collapseMargins(LayoutBox& child, |
| 775 MarginInfo&, | 769 MarginInfo&, |
| 776 bool childIsSelfCollapsing, | 770 bool childIsSelfCollapsing, |
| 777 bool childDiscardMarginBefore, | 771 bool childDiscardMarginBefore, |
| 778 bool childDiscardMarginAfter); | 772 bool childDiscardMarginAfter); |
| 779 LayoutUnit clearFloatsIfNeeded(LayoutBox& child, | 773 LayoutUnit clearFloatsIfNeeded(LayoutBox& child, |
| 780 MarginInfo&, | 774 MarginInfo&, |
| 781 LayoutUnit oldTopPosMargin, | 775 LayoutUnit oldTopPosMargin, |
| 782 LayoutUnit oldTopNegMargin, | 776 LayoutUnit oldTopNegMargin, |
| 783 LayoutUnit yPos, | 777 LayoutUnit yPos, |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 void positionDialog(); | 918 void positionDialog(); |
| 925 | 919 |
| 926 // END METHODS DEFINED IN LayoutBlockFlowLine | 920 // END METHODS DEFINED IN LayoutBlockFlowLine |
| 927 }; | 921 }; |
| 928 | 922 |
| 929 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); | 923 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); |
| 930 | 924 |
| 931 } // namespace blink | 925 } // namespace blink |
| 932 | 926 |
| 933 #endif // LayoutBlockFlow_h | 927 #endif // LayoutBlockFlow_h |
| OLD | NEW |