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

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

Issue 2513643002: Introduce adjustFloatLogicalTopForPagination(), to offload positionAndLayoutFloat(). (Closed)
Patch Set: Code review Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 812
813 void setBreakBefore(EBreak); 813 void setBreakBefore(EBreak);
814 void setBreakAfter(EBreak); 814 void setBreakAfter(EBreak);
815 EBreak breakBefore() const override; 815 EBreak breakBefore() const override;
816 EBreak breakAfter() const override; 816 EBreak breakAfter() const override;
817 817
818 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTop, 818 LayoutUnit adjustBlockChildForPagination(LayoutUnit logicalTop,
819 LayoutBox& child, 819 LayoutBox& child,
820 BlockChildrenLayoutInfo&, 820 BlockChildrenLayoutInfo&,
821 bool atBeforeSideOfBlock); 821 bool atBeforeSideOfBlock);
822
823 // If a float cannot fit in the current fragmentainer, return the logical top
824 // margin edge that the float needs to have in order to be pushed to the top
825 // of the next fragmentainer. Otherwise, just return |logicalTopMarginEdge|.
826 LayoutUnit adjustFloatLogicalTopForPagination(
827 LayoutBox&,
828 LayoutUnit logicalTopMarginEdge);
829
822 // Computes a deltaOffset value that put a line at the top of the next page if 830 // Computes a deltaOffset value that put a line at the top of the next page if
823 // it doesn't fit on the current page. 831 // it doesn't fit on the current page.
824 void adjustLinePositionForPagination(RootInlineBox&, LayoutUnit& deltaOffset); 832 void adjustLinePositionForPagination(RootInlineBox&, LayoutUnit& deltaOffset);
833
825 // If the child is unsplittable and can't fit on the current page, return the 834 // If the child is unsplittable and can't fit on the current page, return the
826 // top of the next page/column. 835 // top of the next page/column.
827 LayoutUnit adjustForUnsplittableChild(LayoutBox&, 836 LayoutUnit adjustForUnsplittableChild(LayoutBox&,
828 LayoutUnit logicalOffset) const; 837 LayoutUnit logicalOffset) const;
829 838
830 // Used to store state between styleWillChange and styleDidChange 839 // Used to store state between styleWillChange and styleDidChange
831 static bool s_canPropagateFloatIntoSibling; 840 static bool s_canPropagateFloatIntoSibling;
832 841
833 LineBoxList m_lineBoxes; // All of the root line boxes created for this block 842 LineBoxList m_lineBoxes; // All of the root line boxes created for this block
834 // flow. For example, <div>Hello<br>world.</div> 843 // flow. For example, <div>Hello<br>world.</div>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 void positionDialog(); 943 void positionDialog();
935 944
936 // END METHODS DEFINED IN LayoutBlockFlowLine 945 // END METHODS DEFINED IN LayoutBlockFlowLine
937 }; 946 };
938 947
939 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); 948 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow());
940 949
941 } // namespace blink 950 } // namespace blink
942 951
943 #endif // LayoutBlockFlow_h 952 #endif // LayoutBlockFlow_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698