DescriptionAvoid using ImageResource->imageSize() to get the marker size
In cases when LayoutListMarker represents an image it has a StyleImage
to determine the size of the the marker. Prior to this patch the
computed size is saved back to the StyleImage for later use. This
should be unnecessary since the size can be computed (or saved
locally) when it's actually needed.
When looking closer at one may notice that the zoom level is stored
inside SVGImageForContainer so that SVGImageForContainer::size()
actually returns the size _including zoom_. When LayoutListMarker
asked for the image size and provided zoom, the zoom level was applied
once more resulting in double zoom. The added test exposes this.
As part of 551419, the aim it to get rid of
ImageResource::setContainerSizeForLayoutObject and friends (storing
SVG image specific data inside ImageResource) and this is a step in
that direction.
BUG=551419, 551808
Committed: https://crrev.com/2bd5bf90d71c251c9cc777ee8b89e3a283f9cb75
Cr-Commit-Position: refs/heads/master@{#358552}
Patch Set 1 #Patch Set 2 : Add test for newly found zooming bug that this patch fixes #Patch Set 3 : Let imageBulletSize return IntSize #
Messages
Total messages: 30 (14 generated)
|