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

Issue 13008026: Merge 146227 "Separate SVG image size and container size" (Closed)

Created:
7 years, 9 months ago by pdr.
Modified:
7 years, 9 months ago
Reviewers:
pdr
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Visibility:
Public.

Description

Merge 146227 "Separate SVG image size and container size" > Separate SVG image size and container size > https://bugs.webkit.org/show_bug.cgi?id=112651 > > Reviewed by Stephen Chenney. > > Source/WebCore: > > Previously, SVG images could retain their cached size between reloads due to a bug where an > old container size would be re-used if the image's new container size was not available yet. > > This patch changes SVGImage::size() to return the intrinsic size of the image before a > container size has been set. SVGImageCache::imageSizeForRenderer will now return the > image's intrinsic size instead of a cached value if the container size cannot be looked up. > In javascript, querying [SVGImage].width will now return either the image's intrinsic size > or the size of 'imageForContainer'. > > Test: svg/as-image/svg-container-size-after-reload.html > > * svg/graphics/SVGImage.cpp: > (WebCore::SVGImage::setContainerSize): > (WebCore::SVGImage::containerSize): > (WebCore::SVGImage::draw): > (WebCore::SVGImage::dataChanged): > * svg/graphics/SVGImage.h: > > The member variable 'm_intrinsicSize' has been added to track the image's intrinsic > size. This term can be found in: http://www.w3.org/TR/css3-images/#default-sizing > > * svg/graphics/SVGImageCache.cpp: > (WebCore::SVGImageCache::imageSizeForRenderer): > (WebCore::SVGImageCache::imageForRenderer): > > In both of these functions, image has been renamed to imageForContainer here to clarify > that the cached container size is being returned, not the image's intrinsic size. > > LayoutTests: > > * svg/as-image/svg-container-size-after-reload-expected.txt: Added. > * svg/as-image/svg-container-size-after-reload.html: Added. > TBR=pdr@google.com Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=146635

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -8 lines) Patch
A + LayoutTests/svg/as-image/svg-container-size-after-reload.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/svg/as-image/svg-container-size-after-reload-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/WebCore/svg/graphics/SVGImage.h View 3 chunks +3 lines, -1 line 0 comments Download
M Source/WebCore/svg/graphics/SVGImage.cpp View 3 chunks +6 lines, -3 lines 0 comments Download
M Source/WebCore/svg/graphics/SVGImageCache.cpp View 2 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
pdr.
7 years, 9 months ago (2013-03-22 18:28:31 UTC) #1
pdr.
7 years, 9 months ago (2013-03-22 18:28:47 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 manually as r146635.

Powered by Google App Engine
This is Rietveld 408576698