Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Issue 1433503003: Avoid using ImageResource->imageSize() to get the marker size (Closed)

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.

Description

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 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -14 lines) Patch
A third_party/WebKit/LayoutTests/svg/as-list-image/svg-list-image-intrinsic-size-zoom.html View 1 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutListMarker.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutListMarker.cpp View 1 2 6 chunks +23 lines, -14 lines 0 comments Download

Messages

Total messages: 30 (14 generated)
commit-bot: I haz the power
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
5 years, 1 month ago (2015-11-04 15:23:44 UTC) #2
commit-bot: I haz the power
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
5 years, 1 month ago (2015-11-05 10:53:53 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-05 11:58:12 UTC) #8
davve
5 years, 1 month ago (2015-11-05 12:57:52 UTC) #11
davve
Dan, could you take a look? https://codereview.chromium.org/1427943002/ has the general direction I'm aiming for here. ...
5 years, 1 month ago (2015-11-05 13:13:39 UTC) #13
fs
lgtm I guess one could argue that imageBulletSize() should just return IntSize and leave the ...
5 years, 1 month ago (2015-11-05 13:16:19 UTC) #15
commit-bot: I haz the power
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
5 years, 1 month ago (2015-11-05 13:30:31 UTC) #17
davve
> I guess one could argue that imageBulletSize() should just return IntSize and > leave ...
5 years, 1 month ago (2015-11-05 13:33:19 UTC) #18
fs
On 2015/11/05 at 13:33:19, davve wrote: > > I guess one could argue that imageBulletSize() ...
5 years, 1 month ago (2015-11-05 14:23:59 UTC) #19
fs
5 years, 1 month ago (2015-11-05 14:24:43 UTC) #21
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-05 14:50:51 UTC) #23
davve
Walter, could you weigh in perhaps? It could be useful to have a layout person ...
5 years, 1 month ago (2015-11-06 14:27:32 UTC) #25
wkorman
lgtm Sorry for delay -- this looks reasonable to me, thanks for fixing.
5 years, 1 month ago (2015-11-07 08:31:48 UTC) #26
commit-bot: I haz the power
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
5 years, 1 month ago (2015-11-08 15:35:40 UTC) #28
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 1 month ago (2015-11-08 16:45:09 UTC) #29
commit-bot: I haz the power
5 years, 1 month ago (2015-11-08 16:46:17 UTC) #30
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/2bd5bf90d71c251c9cc777ee8b89e3a283f9cb75
Cr-Commit-Position: refs/heads/master@{#358552}

Powered by Google App Engine
This is Rietveld 408576698