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

Issue 2203093003: Fix SVGImage::imageForCurrentFrameForContainer() sizing (Closed)

Created:
4 years, 4 months ago by f(malita)
Modified:
4 years, 4 months ago
Reviewers:
davve, pdr., Stephen Chennney, fs
CC:
blink-reviews, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, krit, gyuyoung2, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, slimming-paint-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix SVGImage::imageForCurrentFrameForContainer() sizing SVGImageForContainer implements the Image interface, and reports a size equal to the container size. But its imageForCurrentFrame() implementation delegates to SVGImage::imageForCurrentFrameForContainer(), which currently returns an SkImage with a size equal to the SVG intrinsic size. This mismatch between the size reported by SVGImageForContainer and the size of the SkImage returned by its imageForCurrentFrame() is causing problems when tiling. The CL updates SVGImage::imageForCurrentFrameForContainer() to return an SkImage reflecting the container size instead of intrinsic size. New pixel test: fast/backgrounds/background-svg-scaling.html BUG=632969, 633637 R=schenney@chromium.org, pdr@chromium.org, fs@opera.com Committed: https://crrev.com/8148eedf1595dab9ec126e3e20403bad53021db9 Cr-Commit-Position: refs/heads/master@{#409853}

Patch Set 1 #

Patch Set 2 : expectations #

Total comments: 2

Patch Set 3 : 1337 SVGImage detection #

Patch Set 4 : actual fix #

Patch Set 5 : updated canvas-default-object-sizing ref #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -18 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/backgrounds/background-svg-scaling.html View 1 chunk +32 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/svg/canvas/canvas-default-object-sizing-expected.html View 1 2 3 4 1 chunk +20 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp View 1 2 3 4 1 chunk +9 lines, -3 lines 0 comments Download

Messages

Total messages: 41 (28 generated)
f(malita)
Expected new test result: https://storage.googleapis.com/chromium-layout-test-archives/mac_chromium_rel_ng/270299/layout-test-results/fast/backgrounds/background-svg-scaling-actual.png I also have a proper fix for the underlying SVGImage ...
4 years, 4 months ago (2016-08-02 19:17:24 UTC) #10
Stephen Chennney
LGTM
4 years, 4 months ago (2016-08-02 19:32:10 UTC) #11
fs
https://codereview.chromium.org/2203093003/diff/2/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h File third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h (right): https://codereview.chromium.org/2203093003/diff/2/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h#newcode50 third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h:50: bool isSVGImage() const override { return m_image->isSVGImage(); } This ...
4 years, 4 months ago (2016-08-02 19:47:36 UTC) #12
f(malita)
https://codereview.chromium.org/2203093003/diff/2/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h File third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h (right): https://codereview.chromium.org/2203093003/diff/2/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h#newcode50 third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h:50: bool isSVGImage() const override { return m_image->isSVGImage(); } On ...
4 years, 4 months ago (2016-08-02 20:53:11 UTC) #15
Stephen Chennney
On 2016/08/02 20:53:11, f(malita) wrote: > https://codereview.chromium.org/2203093003/diff/2/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h > File third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h (right): > > https://codereview.chromium.org/2203093003/diff/2/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h#newcode50 > ...
4 years, 4 months ago (2016-08-02 20:54:47 UTC) #16
f(malita)
On 2016/08/02 20:53:11, f(malita) wrote: > Let me see how intrusive is the real fix, ...
4 years, 4 months ago (2016-08-03 18:08:57 UTC) #24
fs
On 2016/08/03 at 18:08:57, fmalita wrote: > On 2016/08/02 20:53:11, f(malita) wrote: > > Let ...
4 years, 4 months ago (2016-08-04 00:06:47 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2203093003/70001
4 years, 4 months ago (2016-08-04 18:17:39 UTC) #32
commit-bot: I haz the power
A disapproval has been posted by following reviewers: schenney@chromium.org. Please make sure to get positive ...
4 years, 4 months ago (2016-08-04 18:17:42 UTC) #34
Stephen Chennney
On 2016/08/04 00:06:47, fs (OoO until Aug 15) wrote: > On 2016/08/03 at 18:08:57, fmalita ...
4 years, 4 months ago (2016-08-04 18:19:26 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2203093003/70001
4 years, 4 months ago (2016-08-04 18:20:31 UTC) #37
commit-bot: I haz the power
Committed patchset #5 (id:70001)
4 years, 4 months ago (2016-08-04 19:00:08 UTC) #39
commit-bot: I haz the power
4 years, 4 months ago (2016-08-04 19:02:00 UTC) #41
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/8148eedf1595dab9ec126e3e20403bad53021db9
Cr-Commit-Position: refs/heads/master@{#409853}

Powered by Google App Engine
This is Rietveld 408576698