#include "third_party/blink/renderer/core/layout/pagination_utils.h"
#include "printing/mojom/print.mojom-blink.h"
#include "third_party/blink/public/web/web_print_page_description.h"
#include "third_party/blink/public/web/web_print_params.h"
#include "third_party/blink/renderer/core/css/resolver/style_resolver.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/layout/block_break_token.h"
#include "third_party/blink/renderer/core/layout/block_node.h"
#include "third_party/blink/renderer/core/layout/constraint_space.h"
#include "third_party/blink/renderer/core/layout/constraint_space_builder.h"
#include "third_party/blink/renderer/core/layout/geometry/box_strut.h"
#include "third_party/blink/renderer/core/layout/geometry/fragment_geometry.h"
#include "third_party/blink/renderer/core/layout/layout_block_flow.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/layout/length_utils.h"
#include "third_party/blink/renderer/core/layout/physical_box_fragment.h"
#include "third_party/blink/renderer/core/layout/physical_fragment_link.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
namespace blink {
namespace {
bool ShouldCenterPageOnPaper(const WebPrintParams& params) { … }
PhysicalSize PageBoxDefaultSize(const Document& document) { … }
LogicalSize PageBoxDefaultSizeWithSourceOrientation(const Document& document,
const ComputedStyle& style,
LogicalSize layout_size) { … }
float TargetShrinkScaleFactor(LogicalSize target_size,
LogicalSize source_size) { … }
wtf_size_t PageNumberFromPageArea(const PhysicalBoxFragment& page_area) { … }
}
void SetUpSpaceBuilderForPageBox(LogicalSize available_size,
ConstraintSpaceBuilder* builder) { … }
LogicalSize DesiredPageContainingBlockSize(const Document& document,
const ComputedStyle& style) { … }
void ResolvePageBoxGeometry(const BlockNode& page_box,
LogicalSize page_containing_block_size,
FragmentGeometry* geometry,
BoxStrut* margins) { … }
PhysicalSize CalculateInitialContainingBlockSizeForPagination(
Document& document) { … }
float TargetScaleForPage(const PhysicalBoxFragment& page_container) { … }
LogicalSize FittedPageContainerSize(const Document& document,
const ComputedStyle& style,
LogicalSize source_margin_box_size) { … }
LogicalRect TargetPageBorderBoxLogicalRect(
const Document& document,
const ComputedStyle& style,
const LogicalSize& source_margin_box_size,
const BoxStrut& margins) { … }
wtf_size_t PageCount(const LayoutView& view) { … }
const PhysicalBoxFragment* GetPageContainer(const LayoutView& view,
wtf_size_t page_index) { … }
const PhysicalBoxFragment* GetPageArea(const LayoutView& view,
wtf_size_t page_index) { … }
const PhysicalFragmentLink& GetPageBorderBoxLink(
const PhysicalBoxFragment& page_container) { … }
const PhysicalBoxFragment& GetPageBorderBox(
const PhysicalBoxFragment& page_container) { … }
const PhysicalBoxFragment& GetPageArea(
const PhysicalBoxFragment& page_border_box) { … }
PhysicalRect StitchedPageContentRect(const LayoutView& layout_view,
wtf_size_t page_index) { … }
PhysicalRect StitchedPageContentRect(
const PhysicalBoxFragment& page_container) { … }
const BlockBreakToken* FindPreviousBreakTokenForPageArea(
const PhysicalBoxFragment& page_area) { … }
float CalculateOverflowShrinkForPrinting(const LayoutView& view,
float maximum_shrink_factor) { … }
WebPrintPageDescription GetPageDescriptionFromLayout(const Document& document,
wtf_size_t page_number) { … }
}