blob: c9f07c5faa9728aa5bed002af51175929b226abb [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "core/layout/ViewFragmentationContext.h"
#include "core/layout/LayoutView.h"
namespace blink {
bool ViewFragmentationContext::IsFragmentainerLogicalHeightKnown() {
DCHECK(view_.PageLogicalHeight());
return true;
}
LayoutUnit ViewFragmentationContext::FragmentainerLogicalHeightAt(LayoutUnit) {
DCHECK(view_.PageLogicalHeight());
return view_.PageLogicalHeight();
}
LayoutUnit ViewFragmentationContext::RemainingLogicalHeightAt(
LayoutUnit block_offset) {
LayoutUnit page_logical_height = view_.PageLogicalHeight();
return page_logical_height - IntMod(block_offset, page_logical_height);
}
} // namespace blink