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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement onRefEncodedData for lazy pixel refs.
This allows printToSkPicture to write the original
encoded data to the stream.
Add a method to ImageFrameGenerator to copy its
data, which is used by onRefEncodedData.
https://bugs.webkit.org/show_bug.cgi?id=110759

Patch by Leon Scroggins <scroggo@chromium.org> on 2013-03-19
Reviewed by Stephen White.

No new tests. New functionality is for testing purposes
(creating SKP files).

* platform/graphics/chromium/ImageFrameGenerator.cpp:
(WebCore::ImageFrameGenerator::data):
(WebCore):
* platform/graphics/chromium/ImageFrameGenerator.h:
(ImageFrameGenerator):
* platform/graphics/chromium/LazyDecodingPixelRef.cpp:
(WebCore::LazyDecodingPixelRef::isClipped):
(WebCore):
(WebCore::LazyDecodingPixelRef::onRefEncodedData):
* platform/graphics/chromium/LazyDecodingPixelRef.h:
(LazyDecodingPixelRef):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove deprecated/unused bits of WebLayerTreeView
https://bugs.webkit.org/show_bug.cgi?id=112714

Patch by James Robinson <jamesr@chromium.org> on 2013-03-19
Reviewed by Adam Barth.

* chromium/public/WebLayerTreeView.h:
(WebLayerTreeView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146229 268f45cc-cd09-0410-ab3c-d52691b4dbfc