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

Issue 308643002: Teach SVGImage::containerSize() to deduce intrinsic values (Closed)

Created:
6 years, 6 months ago by davve
Modified:
6 years, 6 months ago
Reviewers:
pdr.
CC:
blink-reviews, krit, fs, ed+blinkwatch_opera.com, f(malita), gyuyoung.kim_webkit.org, Stephen Chennney, kouhei+svg_chromium.org, pdr., rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@remove-text-zoom-factor
Visibility:
Public.

Description

Teach SVGImage::containerSize() to deduce intrinsic values When an SVG has either intrinsic width or height but not both, and a intrinsic ratio, the missing intrinsic width or height can be calculated. Doing so enables us to return correct intrinsic width and height for SVG images in more cases when the image has no renderer. Also, this patch removes the unspecified use of the viewBox attribute as the source of intrinsic size. A small number of tests depended on this and has been updated. The reasoning to make this change is because we don't use the viewBox for intrinsic size in any other context than SVGImage. And we only use it until the renderer has a containerSize() anyway. http://www.whatwg.org/specs/web-apps/current-work/multipage/edits.html#dom-img-width http://www.whatwg.org/specs/web-apps/current-work/multipage/edits.html#dom-img-height BUG=376895 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175784

Patch Set 1 #

Patch Set 2 : Updated LayoutTests/ to not depend on viewBox for intrinsic size information #

Patch Set 3 : More testsuite adjustments #

Patch Set 4 : computeIntrinsicRatioInformation does not always write to intrinsicRatio; take care to init it #

Total comments: 9

Patch Set 5 : Lower timeout and use expandedIntSize #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -17 lines) Patch
M LayoutTests/css3/compositing/background-blend-mode-image-svg.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/css3/compositing/background-blend-mode-svg-color.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/css3/compositing/resources/blue-circle.svg View 1 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/css3/images/resources/half-circles.svg View 1 2 chunks +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/canvas/webgl/resources/red-green.svg View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/svg/as-image/resources/animated-visited-link.svg View 1 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/svg/as-image/resources/link.svg View 1 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/svg/as-image/svg-as-image-intrinsic-size.html View 1 2 3 4 1 chunk +24 lines, -0 lines 0 comments Download
M Source/core/svg/graphics/SVGImage.cpp View 1 2 3 4 1 chunk +13 lines, -8 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
davve
6 years, 6 months ago (2014-06-05 12:31:02 UTC) #1
pdr.
https://codereview.chromium.org/308643002/diff/60001/LayoutTests/css3/compositing/background-blend-mode-svg-color.html File LayoutTests/css3/compositing/background-blend-mode-svg-color.html (right): https://codereview.chromium.org/308643002/diff/60001/LayoutTests/css3/compositing/background-blend-mode-svg-color.html#newcode8 LayoutTests/css3/compositing/background-blend-mode-svg-color.html:8: background: url('resources/blue-circle.svg'), green; Was this change required? https://codereview.chromium.org/308643002/diff/60001/LayoutTests/svg/as-image/svg-as-image-intrinsic-size.html File ...
6 years, 6 months ago (2014-06-06 03:54:50 UTC) #2
davve
Thanks for the review! (Was off today celebrating the very important https://en.wikipedia.org/wiki/National_Day_of_Sweden. :) https://codereview.chromium.org/308643002/diff/60001/LayoutTests/css3/compositing/background-blend-mode-svg-color.html File ...
6 years, 6 months ago (2014-06-06 20:26:27 UTC) #3
pdr.
LGTM https://codereview.chromium.org/308643002/diff/60001/LayoutTests/css3/compositing/background-blend-mode-svg-color.html File LayoutTests/css3/compositing/background-blend-mode-svg-color.html (right): https://codereview.chromium.org/308643002/diff/60001/LayoutTests/css3/compositing/background-blend-mode-svg-color.html#newcode8 LayoutTests/css3/compositing/background-blend-mode-svg-color.html:8: background: url('resources/blue-circle.svg'), green; On 2014/06/06 20:26:26, David Vest ...
6 years, 6 months ago (2014-06-06 20:28:37 UTC) #4
davve
The CQ bit was checked by davve@opera.com
6 years, 6 months ago (2014-06-06 20:37:08 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davve@opera.com/308643002/80001
6 years, 6 months ago (2014-06-06 20:38:18 UTC) #6
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 6 months ago (2014-06-06 22:11:35 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-06 22:20:51 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/10678)
6 years, 6 months ago (2014-06-06 22:20:52 UTC) #9
davve
The CQ bit was checked by davve@opera.com
6 years, 6 months ago (2014-06-09 08:30:25 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davve@opera.com/308643002/80001
6 years, 6 months ago (2014-06-09 08:30:54 UTC) #11
commit-bot: I haz the power
6 years, 6 months ago (2014-06-09 09:31:24 UTC) #12
Message was sent while issue was closed.
Change committed as 175784

Powered by Google App Engine
This is Rietveld 408576698