Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ private void compileNode(PreparedNode<DocumentNode> prepared,

if (definition.paginationPolicy(node) == PaginationPolicy.SPLITTABLE) {
SplittableLeafCompiler.compile(prepared, definition, path, semanticName, parentPath, childIndex, depth, regionX,
availableWidth, state, prepareContext, fragmentContext, nodes, fragments);
availableWidth, new CompileContext(state, prepareContext, fragmentContext, nodes, fragments));
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ private SplittableLeafCompiler() {
* @param depth the leaf's tree depth
* @param regionX the content region's left edge
* @param availableWidth the content width available to the leaf
* @param state the compiler cursor (mutated as pages advance)
* @param prepareContext the node preparation context (drives re-measurement of tails)
* @param fragmentContext the fragment emission context
* @param nodes accumulator for placed nodes (appended to)
* @param fragments accumulator for placed fragments (appended to)
* @param ctx the cursor + emission context (mutated as pages advance)
* @throws AtomicNodeTooLargeException if a piece cannot fit on an empty page
*/
static void compile(PreparedNode<DocumentNode> prepared,
Expand All @@ -60,11 +56,13 @@ static void compile(PreparedNode<DocumentNode> prepared,
int depth,
double regionX,
double availableWidth,
CompilerState state,
PrepareContext prepareContext,
FragmentContext fragmentContext,
List<PlacedNode> nodes,
List<PlacedFragment> fragments) {
CompileContext ctx) {
CompilerState state = ctx.state();
PrepareContext prepareContext = ctx.prepareContext();
FragmentContext fragmentContext = ctx.fragmentContext();
List<PlacedNode> nodes = ctx.nodes();
List<PlacedFragment> fragments = ctx.fragments();

Margin originalMargin = toMargin(prepared.node().margin());
Padding originalPadding = toPadding(prepared.node().padding());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private static PreparedNode<DocumentNode> leaf(double height) {

private void compile(PreparedNode<DocumentNode> prepared) {
SplittableLeafCompiler.compile(prepared, definition, "leaf", "leaf", null, 0, 1,
10, 180, state, prepareContext, fragmentContext, nodes, fragments);
10, 180, new CompileContext(state, prepareContext, fragmentContext, nodes, fragments));
}

@Test
Expand Down
Loading