|
|
Created:
5 years, 1 month ago by davve Modified:
5 years, 1 month ago Reviewers:
dsinclair, wkorman, fs CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1 Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
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 #
Created: 5 years, 1 month ago
Messages
Total messages: 30 (14 generated)
The CQ bit was checked by davve@opera.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1433503003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1433503003/1
The CQ bit was unchecked by davve@opera.com
The CQ bit was checked by davve@opera.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1433503003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1433503003/20001
Description was changed from ========== Avoid using ImageResource->imageSize() to get the computed size Stop using the ImageResource to save the image size in the ImageResource. The list marker can instead compute the size when it needs it. This prepares us for eventually removing ImageResource::setContainerSizeForLayoutObject(). BUG=551419 ========== to ========== Avoid using ImageResource->imageSize() to get the computed size Stop using the ImageResource to save the image size in the ImageResource. The list marker can instead compute the size when it needs it. Using setContainerSizeForLayoutObject leads to appling the zoom level twice for SVG images. This also prepares us for eventually removing ImageResource::setContainerSizeForLayoutObject(). BUG=551419, 551808 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Avoid using ImageResource->imageSize() to get the computed size Stop using the ImageResource to save the image size in the ImageResource. The list marker can instead compute the size when it needs it. Using setContainerSizeForLayoutObject leads to appling the zoom level twice for SVG images. This also prepares us for eventually removing ImageResource::setContainerSizeForLayoutObject(). BUG=551419, 551808 ========== to ========== Avoid 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 ==========
davve@opera.com changed reviewers: + fs@opera.com
davve@opera.com changed reviewers: + dsinclair@chromium.org
Dan, could you take a look? https://codereview.chromium.org/1427943002/ has the general direction I'm aiming for here. fs and I decided to split this part out as it can be landed separately.
fs@opera.com changed reviewers: - dsinclair@chromium.org
lgtm I guess one could argue that imageBulletSize() should just return IntSize and leave the impedance matching to the users (where required). The majority of users wants LayoutUnits though so it seems ok the way it is too.
The CQ bit was checked by davve@opera.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1433503003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1433503003/40001
> I guess one could argue that imageBulletSize() should just return IntSize and > leave the impedance matching to the users (where required). The majority of > users wants LayoutUnits though so it seems ok the way it is too. I was back and forth on this, especially when I initially thought I should keep the setContainerSizeForLayoutObject() call. Returning IntSize might generate slightly more code(?) but looks a bit nicer. Uploaded in patch set 3.
On 2015/11/05 at 13:33:19, davve wrote: > > I guess one could argue that imageBulletSize() should just return IntSize and > > leave the impedance matching to the users (where required). The majority of > > users wants LayoutUnits though so it seems ok the way it is too. > > I was back and forth on this, especially when I initially thought I should keep the setContainerSizeForLayoutObject() call. Returning IntSize might generate slightly more code(?) but looks a bit nicer. Uploaded in patch set 3. Yeah, probably slightly more code. Still LGTM.
fs@opera.com changed reviewers: + dsinclair@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
davve@opera.com changed reviewers: + wkorman@chromium.org
Walter, could you weigh in perhaps? It could be useful to have a layout person at least a little bit involved here.
lgtm Sorry for delay -- this looks reasonable to me, thanks for fixing.
The CQ bit was checked by davve@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1433503003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1433503003/40001
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/2bd5bf90d71c251c9cc777ee8b89e3a283f9cb75 Cr-Commit-Position: refs/heads/master@{#358552} |