| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/layout/ViewFragmentationContext.h" | 5 #include "core/layout/ViewFragmentationContext.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutView.h" | 7 #include "core/layout/LayoutView.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 bool ViewFragmentationContext::isFragmentainerLogicalHeightKnown() { | 11 bool ViewFragmentationContext::isFragmentainerLogicalHeightKnown() { |
| 12 ASSERT(m_view.pageLogicalHeight()); | 12 DCHECK(m_view.pageLogicalHeight()); |
| 13 return true; | 13 return true; |
| 14 } | 14 } |
| 15 | 15 |
| 16 LayoutUnit ViewFragmentationContext::fragmentainerLogicalHeightAt(LayoutUnit) { | 16 LayoutUnit ViewFragmentationContext::fragmentainerLogicalHeightAt(LayoutUnit) { |
| 17 ASSERT(m_view.pageLogicalHeight()); | 17 DCHECK(m_view.pageLogicalHeight()); |
| 18 return m_view.pageLogicalHeight(); | 18 return m_view.pageLogicalHeight(); |
| 19 } | 19 } |
| 20 | 20 |
| 21 LayoutUnit ViewFragmentationContext::remainingLogicalHeightAt( | 21 LayoutUnit ViewFragmentationContext::remainingLogicalHeightAt( |
| 22 LayoutUnit blockOffset) { | 22 LayoutUnit blockOffset) { |
| 23 LayoutUnit pageLogicalHeight = m_view.pageLogicalHeight(); | 23 LayoutUnit pageLogicalHeight = m_view.pageLogicalHeight(); |
| 24 return pageLogicalHeight - intMod(blockOffset, pageLogicalHeight); | 24 return pageLogicalHeight - intMod(blockOffset, pageLogicalHeight); |
| 25 } | 25 } |
| 26 | 26 |
| 27 } // namespace blink | 27 } // namespace blink |
| OLD | NEW |