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

Issue 1695243004: Prepare SVGImage for the default sizing algorithm (Closed)

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

Description

Prepare SVGImage for the default sizing algorithm This patch aligns sizing in SVGImage with sizing done in LayoutBoxModelObject::calculateImageIntrinsicDimensions() Split SVGImage::containerSize() into two parts. On part that calculates the concrete size. The other part return containerSize(), with concrete object size as fall-back for direct SVGImage::draw() users (webgl being the only one known). The long term plan is to only keep this sizing implementation and remove the one in LayoutBoxModelObject. As long as SVG is the only user of the complex version of the algorithm it makes sense to keep it as SVG-only code. BUG=581357 Committed: https://crrev.com/48a3d424ac967a77a648f12e5ac5058d7cef8b90 Cr-Commit-Position: refs/heads/master@{#376965}

Patch Set 1 #

Patch Set 2 : Push contain constraint to a later patch; inline and simplify code #

Patch Set 3 : Fix issue with containerSize and direct SVGImage::draw() call #

Patch Set 4 : Rebase #

Patch Set 5 : Use has{Width,Height} properties instead of checking larger than zero. #

Total comments: 4

Patch Set 6 : Add comment about what the concrete object size is in SVGImage context. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -24 lines) Patch
M third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height-svg-expected.txt View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImage.h View 1 2 3 4 5 3 chunks +15 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp View 1 2 3 4 2 chunks +57 lines, -20 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 21 (8 generated)
davve
May make more sense seen together with the planned follow-up patches: https://codereview.chromium.org/1694263003/ where this sizing ...
4 years, 10 months ago (2016-02-19 14:17:06 UTC) #3
fs
On 2016/02/19 at 14:17:06, davve wrote: > May make more sense seen together with the ...
4 years, 10 months ago (2016-02-19 15:47:21 UTC) #4
davve
On 2016/02/19 15:47:21, fs wrote: > I guess my biggest gripe might be the "volatile-ness", ...
4 years, 10 months ago (2016-02-19 16:34:15 UTC) #5
davve
On 2016/02/19 16:34:15, David Vest wrote: > If we put the wrapping in a virtual ...
4 years, 10 months ago (2016-02-19 16:48:02 UTC) #6
fs
On 2016/02/19 at 16:34:15, davve wrote: > On 2016/02/19 15:47:21, fs wrote: > > I ...
4 years, 10 months ago (2016-02-19 17:03:12 UTC) #7
fs
On 2016/02/19 at 16:48:02, davve wrote: > On 2016/02/19 16:34:15, David Vest wrote: > > ...
4 years, 10 months ago (2016-02-19 17:12:29 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1695243004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1695243004/80001
4 years, 10 months ago (2016-02-22 08:58:02 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-22 10:11:10 UTC) #12
pdr.
LGTM https://codereview.chromium.org/1695243004/diff/80001/third_party/WebKit/Source/core/svg/graphics/SVGImage.h File third_party/WebKit/Source/core/svg/graphics/SVGImage.h (right): https://codereview.chromium.org/1695243004/diff/80001/third_party/WebKit/Source/core/svg/graphics/SVGImage.h#newcode93 third_party/WebKit/Source/core/svg/graphics/SVGImage.h:93: FloatSize calculateConcreteObjectSize(const FloatSize&) const; Is this FloatSize parameter ...
4 years, 10 months ago (2016-02-23 04:42:28 UTC) #13
davve
https://codereview.chromium.org/1695243004/diff/80001/third_party/WebKit/Source/core/svg/graphics/SVGImage.h File third_party/WebKit/Source/core/svg/graphics/SVGImage.h (right): https://codereview.chromium.org/1695243004/diff/80001/third_party/WebKit/Source/core/svg/graphics/SVGImage.h#newcode93 third_party/WebKit/Source/core/svg/graphics/SVGImage.h:93: FloatSize calculateConcreteObjectSize(const FloatSize&) const; On 2016/02/23 04:42:28, pdr wrote: ...
4 years, 10 months ago (2016-02-23 08:34:37 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1695243004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1695243004/100001
4 years, 10 months ago (2016-02-23 09:00:54 UTC) #17
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 10 months ago (2016-02-23 10:43:05 UTC) #19
commit-bot: I haz the power
4 years, 10 months ago (2016-02-23 10:44:28 UTC) #21
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/48a3d424ac967a77a648f12e5ac5058d7cef8b90
Cr-Commit-Position: refs/heads/master@{#376965}

Powered by Google App Engine
This is Rietveld 408576698