Skip to content

[FOP-3334] Recalculate external-graphic viewport after minimum dimensions - #131

Open
dajiaohuang wants to merge 1 commit into
apache:mainfrom
dajiaohuang:fix/fop-3334-minimum-viewport
Open

dajiaohuang wants to merge 1 commit into
apache:mainfrom
dajiaohuang:fix/fop-3334-minimum-viewport

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

Fix FOP-3334: when an external graphic has a minimum dimension but no optimum, the minimum was treated as the final viewport size. A zero minimum therefore produced a zero-width/height viewport even though the image retained its intrinsic content size.

Keep the minimum-derived extent available for content scaling, then derive the final viewport through the existing minimum/maximum constraint calculation. Preserve the parent-IPD override when it is available. Add a layout-engine regression case for both shorthand and longhand zero minimum dimensions.

This does not address the separate min-width="0" plus content-width="scale-to-fit" observation noted in FOP-3334.

Validation

  • external-graphic_minimum-zero.xml: 1/1 passed
  • Existing external-graphic_size_1.xml: 1/1 passed
  • Existing parent-IPD scaling cases (table_cell_image_scale_*): 3/3 passed
  • git diff --check: passed

The focused Maven runs compiled FOP Core and its test sources; the full test suite was not run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant