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 "config.h" | |
6 | |
7 #include "core/layout/ViewFragmentationContext.h" | 5 #include "core/layout/ViewFragmentationContext.h" |
8 | 6 |
9 #include "core/layout/LayoutView.h" | 7 #include "core/layout/LayoutView.h" |
10 | 8 |
11 namespace blink { | 9 namespace blink { |
12 | 10 |
13 bool ViewFragmentationContext::isFragmentainerLogicalHeightKnown() | 11 bool ViewFragmentationContext::isFragmentainerLogicalHeightKnown() |
14 { | 12 { |
15 ASSERT(m_view.pageLogicalHeight()); | 13 ASSERT(m_view.pageLogicalHeight()); |
16 return true; | 14 return true; |
17 } | 15 } |
18 | 16 |
19 LayoutUnit ViewFragmentationContext::fragmentainerLogicalHeightAt(LayoutUnit) | 17 LayoutUnit ViewFragmentationContext::fragmentainerLogicalHeightAt(LayoutUnit) |
20 { | 18 { |
21 ASSERT(m_view.pageLogicalHeight()); | 19 ASSERT(m_view.pageLogicalHeight()); |
22 return m_view.pageLogicalHeight(); | 20 return m_view.pageLogicalHeight(); |
23 } | 21 } |
24 | 22 |
25 LayoutUnit ViewFragmentationContext::remainingLogicalHeightAt(LayoutUnit blockOf
fset) | 23 LayoutUnit ViewFragmentationContext::remainingLogicalHeightAt(LayoutUnit blockOf
fset) |
26 { | 24 { |
27 LayoutUnit pageLogicalHeight = m_view.pageLogicalHeight(); | 25 LayoutUnit pageLogicalHeight = m_view.pageLogicalHeight(); |
28 return pageLogicalHeight - intMod(blockOffset, pageLogicalHeight); | 26 return pageLogicalHeight - intMod(blockOffset, pageLogicalHeight); |
29 } | 27 } |
30 | 28 |
31 } // namespace blink | 29 } // namespace blink |
OLD | NEW |