Repository navigation
[FOP-3334] Recalculate external-graphic viewport after minimum dimensions - #131
Open
dajiaohuang wants to merge 1 commit into
Open
dajiaohuang wants to merge 1 commit into
dajiaohuang wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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"pluscontent-width="scale-to-fit"observation noted in FOP-3334.Validation
external-graphic_minimum-zero.xml: 1/1 passedexternal-graphic_size_1.xml: 1/1 passedtable_cell_image_scale_*): 3/3 passedgit diff --check: passedThe focused Maven runs compiled FOP Core and its test sources; the full test suite was not run.