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

Issue 1720853002: Remove Image::computeIntrinsicDimensions() (Closed)

Created:
4 years, 10 months ago by davve
Modified:
4 years, 9 months ago
Reviewers:
pdr., fs, Justin Novosad
CC:
fs, blink-reviews, blink-reviews-paint_chromium.org, blink-reviews-platform-graphics_chromium.org, blink-reviews-style_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), gavinp+loader_chromium.org, gyuyoung2, Nate Chapin, jbroman, kinuko+watch, kouhei+svg_chromium.org, loading-reviews+fetch_chromium.org, pdr+svgwatchlist_chromium.org, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney, slimming-paint-reviews_chromium.org, tyoshino+watch_chromium.org, vmpstr+blinkwatch_chromium.org, Yoav Weiss
Base URL:
https://chromium.googlesource.com/chromium/src.git@add-and-use-updateconcretesize-upload
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove Image::computeIntrinsicDimensions() There were only one user of Image::computeIntrinsicDimensions() left, SVGImagePainter. It was used to calculate the container size in such a way to force non-uniform scaling in case of preserveAspectRatio=none. Use SVGImage::concreteObjectSize to get the viewport size for SVG images. BUG=581357 Committed: https://crrev.com/cf0913b5fc214804d5731c43a19472fbcffaf26b Cr-Commit-Position: refs/heads/master@{#380204}

Patch Set 1 #

Patch Set 2 : Use SVGImage::concreteObjectSize #

Total comments: 3

Patch Set 3 : Short-cut ImageResource for raster image size #

Patch Set 4 : Avoid using the size of the error image. Null-check in ImageResource saved the day in previous patc… #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -77 lines) Patch
M third_party/WebKit/LayoutTests/svg/custom/svg-image-par-none-no-intrinsic-size.html View 1 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/svg/custom/svg-image-par-none-no-intrinsic-size-expected.html View 1 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResource.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResource.cpp View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/paint/SVGImagePainter.cpp View 1 2 3 2 chunks +15 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleFetchedImage.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/StyleFetchedImage.cpp View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleFetchedImageSet.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleGeneratedImage.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp View 1 1 chunk +0 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleImage.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/StyleInvalidImage.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/StylePendingImage.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImage.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp View 1 1 chunk +0 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h View 1 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GeneratedImage.h View 1 1 chunk +0 lines, -1 line 2 comments Download
M third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp View 1 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Image.h View 1 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Image.cpp View 1 1 chunk +0 lines, -5 lines 0 comments Download

Messages

Total messages: 28 (12 generated)
davve
No hurry here but I think this is close to ready, assuming the other CLs ...
4 years, 9 months ago (2016-03-04 14:42:07 UTC) #3
fs
LGTM! +pdr for platform/ clog dancing https://codereview.chromium.org/1720853002/diff/20001/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp File third_party/WebKit/Source/core/paint/SVGImagePainter.cpp (right): https://codereview.chromium.org/1720853002/diff/20001/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp#newcode93 third_party/WebKit/Source/core/paint/SVGImagePainter.cpp:93: return FloatSize(cachedImage->imageSize(DoNotRespectImageOrientation, 1)); ...
4 years, 9 months ago (2016-03-04 15:10:11 UTC) #5
davve
https://codereview.chromium.org/1720853002/diff/20001/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp File third_party/WebKit/Source/core/paint/SVGImagePainter.cpp (right): https://codereview.chromium.org/1720853002/diff/20001/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp#newcode93 third_party/WebKit/Source/core/paint/SVGImagePainter.cpp:93: return FloatSize(cachedImage->imageSize(DoNotRespectImageOrientation, 1)); On 2016/03/04 15:10:10, fs wrote: > ...
4 years, 9 months ago (2016-03-04 15:22:42 UTC) #6
fs
https://codereview.chromium.org/1720853002/diff/20001/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp File third_party/WebKit/Source/core/paint/SVGImagePainter.cpp (right): https://codereview.chromium.org/1720853002/diff/20001/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp#newcode93 third_party/WebKit/Source/core/paint/SVGImagePainter.cpp:93: return FloatSize(cachedImage->imageSize(DoNotRespectImageOrientation, 1)); On 2016/03/04 at 15:22:41, David Vest ...
4 years, 9 months ago (2016-03-04 15:29:05 UTC) #7
davve
Justin, could you take a look at platform/?
4 years, 9 months ago (2016-03-08 12:15:54 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1720853002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1720853002/40001
4 years, 9 months ago (2016-03-08 12:16:41 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/191783)
4 years, 9 months ago (2016-03-08 13:37:33 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1720853002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1720853002/60001
4 years, 9 months ago (2016-03-08 14:52:47 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-08 16:21:57 UTC) #17
Justin Novosad
https://codereview.chromium.org/1720853002/diff/60001/third_party/WebKit/Source/platform/graphics/GeneratedImage.h File third_party/WebKit/Source/platform/graphics/GeneratedImage.h (left): https://codereview.chromium.org/1720853002/diff/60001/third_party/WebKit/Source/platform/graphics/GeneratedImage.h#oldcode41 third_party/WebKit/Source/platform/graphics/GeneratedImage.h:41: void computeIntrinsicDimensions(FloatSize& intrinsicSize, FloatSize& intrinsicRatio) override; Why is intrinsicRatio ...
4 years, 9 months ago (2016-03-08 21:56:35 UTC) #18
Justin Novosad
> Why is intrinsicRatio a FloatSize rather than a float? Follow-up question: when does intrinsicRatio ...
4 years, 9 months ago (2016-03-08 22:00:06 UTC) #19
davve
https://codereview.chromium.org/1720853002/diff/60001/third_party/WebKit/Source/platform/graphics/GeneratedImage.h File third_party/WebKit/Source/platform/graphics/GeneratedImage.h (left): https://codereview.chromium.org/1720853002/diff/60001/third_party/WebKit/Source/platform/graphics/GeneratedImage.h#oldcode41 third_party/WebKit/Source/platform/graphics/GeneratedImage.h:41: void computeIntrinsicDimensions(FloatSize& intrinsicSize, FloatSize& intrinsicRatio) override; On 2016/03/08 21:56:35, ...
4 years, 9 months ago (2016-03-09 08:06:10 UTC) #20
Justin Novosad
Wow! lgtm
4 years, 9 months ago (2016-03-09 17:42:43 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1720853002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1720853002/60001
4 years, 9 months ago (2016-03-09 18:38:31 UTC) #24
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 9 months ago (2016-03-09 20:36:15 UTC) #26
commit-bot: I haz the power
4 years, 9 months ago (2016-03-09 20:37:14 UTC) #28
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/cf0913b5fc214804d5731c43a19472fbcffaf26b
Cr-Commit-Position: refs/heads/master@{#380204}

Powered by Google App Engine
This is Rietveld 408576698