Chromium Code Reviews| OLD | NEW | 
|---|---|
| 1 /* | 1 /* | 
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 
| 3 * | 3 * | 
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without | 
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are | 
| 6 * met: | 6 * met: | 
| 7 * | 7 * | 
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright | 
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. | 
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above | 
| (...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1144 line_box.SetIsFirstAfterPageBreak(false); | 1144 line_box.SetIsFirstAfterPageBreak(false); | 
| 1145 LayoutState* layout_state = View()->GetLayoutState(); | 1145 LayoutState* layout_state = View()->GetLayoutState(); | 
| 1146 if (!layout_state->IsPaginated()) | 1146 if (!layout_state->IsPaginated()) | 
| 1147 return; | 1147 return; | 
| 1148 if (!IsPageLogicalHeightKnown()) | 1148 if (!IsPageLogicalHeightKnown()) | 
| 1149 return; | 1149 return; | 
| 1150 LayoutUnit page_logical_height = PageLogicalHeightForOffset(logical_offset); | 1150 LayoutUnit page_logical_height = PageLogicalHeightForOffset(logical_offset); | 
| 1151 LayoutUnit remaining_logical_height = PageRemainingLogicalHeightForOffset( | 1151 LayoutUnit remaining_logical_height = PageRemainingLogicalHeightForOffset( | 
| 1152 logical_offset, kAssociateWithLatterPage); | 1152 logical_offset, kAssociateWithLatterPage); | 
| 1153 int line_index = LineCount(&line_box); | 1153 int line_index = LineCount(&line_box); | 
| 1154 // We need to detect if we overlap a repeating footer and if so take the | |
| 
 
mstensho (USE GERRIT)
2017/08/01 18:58:18
Probably don't want this comment anymore.
 
 | |
| 1155 // full remaining logical height as our strut to the next page. | |
| 1154 if (remaining_logical_height < line_height || | 1156 if (remaining_logical_height < line_height || | 
| 1155 (ShouldBreakAtLineToAvoidWidow() && | 1157 (ShouldBreakAtLineToAvoidWidow() && | 
| 1156 LineBreakToAvoidWidow() == line_index)) { | 1158 LineBreakToAvoidWidow() == line_index)) { | 
| 1157 LayoutUnit pagination_strut = | 1159 LayoutUnit pagination_strut = | 
| 1158 CalculatePaginationStrutToFitContent(logical_offset, line_height); | 1160 CalculatePaginationStrutToFitContent(logical_offset, line_height); | 
| 1159 LayoutUnit new_logical_offset = logical_offset + pagination_strut; | 1161 LayoutUnit new_logical_offset = logical_offset + pagination_strut; | 
| 1160 // Moving to a different page or column may mean that its height is | 1162 // Moving to a different page or column may mean that its height is | 
| 1161 // different. | 1163 // different. | 
| 1162 page_logical_height = PageLogicalHeightForOffset(new_logical_offset); | 1164 page_logical_height = PageLogicalHeightForOffset(new_logical_offset); | 
| 1163 if (line_height > page_logical_height) { | 1165 if (line_height > page_logical_height) { | 
| (...skipping 3582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4746 include_block_overflows); | 4748 include_block_overflows); | 
| 4747 } | 4749 } | 
| 4748 | 4750 | 
| 4749 void LayoutBlockFlow::InvalidateDisplayItemClients( | 4751 void LayoutBlockFlow::InvalidateDisplayItemClients( | 
| 4750 PaintInvalidationReason invalidation_reason) const { | 4752 PaintInvalidationReason invalidation_reason) const { | 
| 4751 BlockFlowPaintInvalidator(*this).InvalidateDisplayItemClients( | 4753 BlockFlowPaintInvalidator(*this).InvalidateDisplayItemClients( | 
| 4752 invalidation_reason); | 4754 invalidation_reason); | 
| 4753 } | 4755 } | 
| 4754 | 4756 | 
| 4755 } // namespace blink | 4757 } // namespace blink | 
| OLD | NEW |