DescriptionFix min threshhold calculation for resizing the PDF graphics context
This fixes the calculation for the threshhold we use to calculate
whether the graphics context needs to be resized. There isn't a
correctness issue here, as the context will always be large enough
but it results in resizing more than necessary.
This example demonstrates the issue:
-If the plugin size was 100 x 100, we would set the context size to
100+kBufferSize x 100+kBufferSize.
-If the plugin was then resized to 90x90 we would check to see if the plugin
size is smaller than (100+kBufferSize)-kBufferSize x (100+kBufferSize)-kBufferSize
which is equal to 100 x 100.
-But we really intend to check whether it is smaller than
100-kBufferSize x 100-kBufferSize
Thus we should check whether the plugin is smaller than the
(current context size) - 2*kBufferSize which is kBufferSize less than
the plugin size when the context size was last computed.
BUG=303491
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=277387
Patch Set 1 #
Messages
Total messages: 6 (0 generated)
|