Skip to content
Permalink
Browse files
2011-10-31 Nikolas Zimmermann <nzimmermann@rim.com>
        CSS 2.1 failure: background-intrinsic-*
        https://bugs.webkit.org/show_bug.cgi?id=47156

        Reviewed by Antti Koivisto.

        Add all *intrinsic* tests from the CSS 2.1 Testsuite - we pass all of them now.
        All tests regarding SVG are now imported in LayoutTests, none are failing anymore.

        Add several new testcases covering the SVG Image size negotiation logic, as defined in CSS 2.1.

        * css2.1/20110323/background-intrinsic-001.htm: Added.
        * css2.1/20110323/background-intrinsic-002.htm: Added.
        * css2.1/20110323/background-intrinsic-003.htm: Added.
        * css2.1/20110323/background-intrinsic-004.htm: Added.
        * css2.1/20110323/background-intrinsic-005.htm: Added.
        * css2.1/20110323/background-intrinsic-006.htm: Added.
        * css2.1/20110323/background-intrinsic-007.htm: Added.
        * css2.1/20110323/background-intrinsic-008.htm: Added.
        * css2.1/20110323/background-intrinsic-009.htm: Added.
        * css2.1/20110323/resources/green-intrinsic-height-ratio.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-height.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-none.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-ratio-landscape.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-ratio-portrait.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-width-height.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-width-pc-height-pc.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-width-ratio.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-width.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-height-ratio.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-height.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-none.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-ratio-landscape.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-ratio-portrait.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-width-height.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-width-pc-height-pc.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-width-ratio.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-width.svg: Added.
        * fast/backgrounds/size/contain-and-cover-zoomed.html: Added.
        * fast/images/percent-height-image-expected.txt: Update results, testcase is fixed now.
        * fast/images/percent-height-image.html: Make test async, to make it work cross-browser. With this patch we now pass this testcase.
        * platform/mac-snowleopard/svg/zoom/page/relative-sized-document-scrollbars-expected.png: Removed.
        * platform/mac-snowleopard/svg/zoom/page/zoom-foreignObject-expected.png: Removed.
        * platform/mac/css1/text_properties/vertical_align-expected.txt: Update for rounding differences.
        * platform/mac/css2.1/20110323/background-intrinsic-001-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-001-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-002-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-002-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-003-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-003-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-004-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-004-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-005-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-005-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-006-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-006-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-007-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-007-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-008-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-008-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-009-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-009-expected.txt: Added.
        * platform/mac/fast/backgrounds/size/contain-and-cover-expected.png: Updated for rounding differences.
        * platform/mac/fast/backgrounds/size/contain-and-cover-zoomed-expected.png: Added.
        * platform/mac/fast/backgrounds/size/contain-and-cover-zoomed-expected.txt: Added.
        * platform/mac/fast/block/float/015-expected.png: Slight changes, due 49x50 -> 50x50 size change.
        * platform/mac/fast/block/float/015-expected.txt: Ditto.
        * platform/mac/fast/block/positioning/replaced-inside-fixed-top-bottom-expected.png: Slight changes due to rounding.
        * platform/mac/fast/block/positioning/replaced-inside-fixed-top-bottom-expected.txt: Ditto.
        * platform/mac/fast/repaint/block-layout-inline-children-replaced-expected.png: Ditto.
        * platform/mac/fast/repaint/block-layout-inline-children-replaced-expected.txt: Ditto.
        * platform/mac/svg/as-background-image/background-image-preserveaspectRatio-support-expected.png: Added.
        * platform/mac/svg/as-background-image/background-image-preserveaspectRatio-support-expected.txt: Added.
        * platform/mac/svg/as-background-image/background-image-tiled-expected.png: Added.
        * platform/mac/svg/as-background-image/background-image-tiled-expected.txt: Added.
        * platform/mac/svg/as-background-image/same-image-two-instances-background-image-expected.png: Added.
        * platform/mac/svg/as-background-image/same-image-two-instances-background-image-expected.txt: Added.
        * platform/mac/svg/as-background-image/svg-as-background-4-expected.png: Adapt to preserveAspectRatio changes in hearts.svg.
        * platform/mac/svg/as-border-image/svg-as-border-image-expected.png: This needed a rebaseline, it was forgotten before.
        * platform/mac/svg/as-image/animated-svg-as-image-expected.png: Progression, now both images share the same size & ratio, as desired.
        * platform/mac/svg/as-image/img-preserveAspectRatio-support-1-expected.png: Added.
        * platform/mac/svg/as-image/img-preserveAspectRatio-support-1-expected.txt: Added.
        * platform/mac/svg/as-image/same-image-two-instances-expected.png: Added.
        * platform/mac/svg/as-image/same-image-two-instances-expected.txt: Added.
        * platform/mac/svg/as-image/svg-as-relative-image-expected.png: Adapt to green-relative-size-rect.svg - a circle got added to make it easier to compare.
        * platform/mac/svg/as-image/svg-as-relative-image-with-explicit-size-expected.png: Added.
        * platform/mac/svg/as-image/svg-as-relative-image-with-explicit-size-expected.txt: Added.
        * platform/mac/svg/as-image/svg-image-change-content-size-expected.png: Added.
        * platform/mac/svg/as-image/svg-image-change-content-size-expected.txt: Added.
        * platform/mac/svg/zoom/page/relative-sized-document-scrollbars-expected.png: Updated, scrollbars are gone - now matching Opera/FF.
        * platform/mac/svg/zoom/page/relative-sized-document-scrollbars-expected.txt: Ditto.
        * platform/mac/svg/zoom/page/zoom-background-image-tiled-expected.png: Added.
        * platform/mac/svg/zoom/page/zoom-background-image-tiled-expected.txt: Added.
        * platform/mac/svg/zoom/page/zoom-background-images-expected.png: Added.
        * platform/mac/svg/zoom/page/zoom-background-images-expected.txt: Added.
        * platform/mac/svg/zoom/page/zoom-foreignObject-expected.png: Updated, scrollbars are gone - now matching Opera/FF.
        * platform/mac/svg/zoom/page/zoom-foreignObject-expected.txt: Ditto.
        * platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png: Added.
        * platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt: Added.
        * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.png: Added.
        * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.txt: Added.
        * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.png: Added.
        * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.txt: Added.
        * platform/mac/svg/zoom/page/zoom-svg-as-image-expected.png: Added.
        * platform/mac/svg/zoom/page/zoom-svg-as-image-expected.txt: Added.
        * platform/mac/svg/zoom/page/zoom-svg-as-relative-image-expected.png: Added.
        * platform/mac/svg/zoom/page/zoom-svg-as-relative-image-expected.txt: Added.
        * svg/as-background-image/background-image-preserveaspectRatio-support.html: Added.
        * svg/as-background-image/background-image-tiled.html: Added.
        * svg/as-background-image/resources/construction-tape.svg: Added.
        * svg/as-background-image/resources/hearts.svg: Fix testcase, by adding pAR="none", which is now respected. Now the image looks as desired across Opera/FF and us.
        * svg/as-background-image/same-image-two-instances-background-image.html: Added.
        * svg/as-image/img-preserveAspectRatio-support-1.html: Added.
        * svg/as-image/resources/circle-default-meet.svg: Added.
        * svg/as-image/resources/circle-default-none.svg: Added.
        * svg/as-image/resources/circle-default-slice.svg: Added.
        * svg/as-image/resources/circle-nosize.svg: Added.
        * svg/as-image/resources/circle-viewbox-default.svg: Added.
        * svg/as-image/resources/circle-viewbox-meet.svg: Added.
        * svg/as-image/resources/circle-viewbox-none.svg: Added.
        * svg/as-image/resources/circle-viewbox-slice.svg: Added.
        * svg/as-image/resources/green-relative-size-rect.svg: Use relative units everywhere as intended. Add circle to make it easy to spot ratio changes.
        * svg/as-image/same-image-two-instances.html: Added.
        * svg/as-image/svg-as-relative-image-with-explicit-size.html: Added.
        * svg/as-image/svg-image-change-content-size.xhtml: Added.
        * svg/zoom/page/resources/relative-sized-background-with-viewBox.svg: Added.
        * svg/zoom/page/zoom-background-image-tiled.html: Added.
        * svg/zoom/page/zoom-background-images.html: Added.
        * svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html: Added.
        * svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox.html: Added.
        * svg/zoom/page/zoom-svg-as-background-with-relative-size.html: Added.
        * svg/zoom/page/zoom-svg-as-image.html: Added.
        * svg/zoom/page/zoom-svg-as-relative-image.html: Added.

2011-10-31  Nikolas Zimmermann  <nzimmermann@rim.com>

        CSS 2.1 failure: background-intrinsic-*
        https://bugs.webkit.org/show_bug.cgi?id=47156

        SVGs do not work as tiled background images
        https://bugs.webkit.org/show_bug.cgi?id=16281

        Apply preserveAspectRatio and synthesize viewboxes in <img>
        https://bugs.webkit.org/show_bug.cgi?id=34521

        SVG background doesn't resize properly when dimensions are changed
        https://bugs.webkit.org/show_bug.cgi?id=42944

        Images with percent height inside a floated div should use intrinsic height.
        https://bugs.webkit.org/show_bug.cgi?id=45439

        SVG image in HTML changes size as the window is resized
        https://bugs.webkit.org/show_bug.cgi?id=52045

        Reviewed by Antti Koivisto.

        Implement intrinsic sizing support for SVGImage (svg embedded through <html:img>/<svg:image>/background-image/border-image/...).
        This is demanded by CSS 2.1, and covered by new layout tests in LayoutTests/css2.1 and several new custom testcases.

        Tests: css2.1/20110323/background-intrinsic-001.htm
               css2.1/20110323/background-intrinsic-002.htm
               css2.1/20110323/background-intrinsic-003.htm
               css2.1/20110323/background-intrinsic-004.htm
               css2.1/20110323/background-intrinsic-005.htm
               css2.1/20110323/background-intrinsic-006.htm
               css2.1/20110323/background-intrinsic-007.htm
               css2.1/20110323/background-intrinsic-008.htm
               css2.1/20110323/background-intrinsic-009.htm
               svg/as-background-image/background-image-preserveaspectRatio-support.html (adapted from testcase from bug 34521)
               svg/as-background-image/background-image-tiled.html (reduction from bug 16281)
               svg/as-background-image/same-image-two-instances-background-image.html
               svg/as-image/img-preserveAspectRatio-support-1.html (reduction from bug 34521)
               svg/as-image/same-image-two-instances.html
               svg/as-image/svg-as-relative-image-with-explicit-size.html
               svg/as-image/svg-image-change-content-size.xhtml (reduction from bug 42944)
               svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html
               svg/zoom/page/zoom-svg-as-image.html
               svg/zoom/page/zoom-svg-as-relative-image.html

        * css/CSSImageGeneratorValue.cpp:
        (WebCore::CSSImageGeneratorValue::addClient): Pass default zoom factor.
        (WebCore::CSSImageGeneratorValue::getImage): Ditto.
        * loader/cache/CachedImage.cpp: Enable SVGImage <-> IntSize cache.
        (WebCore::CachedImage::lookupImageForSize): Use recently introduced ImageBySizeCache, to lookup an image for a certain size.
        (WebCore::CachedImage::lookupOrCreateImageForRenderer): Use recently introduced ImageBySizeCache, to dynamically create copies of m_image if needed.
        (WebCore::CachedImage::imageForRenderer): Lookup image by renderer, which first looks up a size for a renderer, then uses lookupImageForSize().
        (WebCore::CachedImage::setContainerSizeForRenderer): For SVGImages, pass on container size handling to ImageBySizeCache.
        (WebCore::CachedImage::imageSizeForRenderer): Figure out the image size, respecting per-renderer overrides, for a certain renderer.
        (WebCore::CachedImage::computeIntrinsicDimensions): Remove unnecessary RenderObject parameter.
        * loader/cache/CachedImage.h:
        * page/ChromeClient.h:
        (WebCore::ChromeClient::isSVGImageChromeClient): Used to identify whether a RenderSVGRoot is embedded through a SVGImage. Returns false, by default.
        * platform/graphics/Image.h:
        (WebCore::Image::setImageObserver): Add helper.
        * rendering/ImageBySizeCache.cpp: Cleanup code.
        (WebCore::ImageBySizeCache::addClient): Assert the passed renderer is valid.
        (WebCore::ImageBySizeCache::removeClient): Ditto. Allow removeClient() to be called w/o prio addClient() usage.
        (WebCore::ImageBySizeCache::getImage): Add zoom parameter.
        (WebCore::ImageBySizeCache::getRequestedSizeAndZoom): Add way to get requested size from cache, instead of actual cached sizes.
        (WebCore::ImageBySizeCache::imageForSize): Respect empty sizes, just return 0, instead of asserting.
        (WebCore::ImageBySizeCache::imageForRenderer): Added a helper that retrieves an image for a renderer, by lookup up its size and using imageForSize().
        * rendering/ImageBySizeCache.h: Cleaup code, introduce struct that replaces the std::pair<IntSize, int>.
        (WebCore::SizeZoomAndCount::SizeZoomAndCount):
        * rendering/RenderBoxModelObject.cpp: Implement CSS 2.1 intrinsic size negotiation for images.
        (WebCore::resolveWidthForRatio): New inline helper function used by calculateImageIntrinsicDimensions.
        (WebCore::resolveHeightForRatio): Ditto.
        (WebCore::resolveAgainstIntrinsicWidthOrHeightAndRatio): Ditto.
        (WebCore::resolveAgainstIntrinsicRatio):  Ditto.
        (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): New helper function, containing the main algorithm, which is a pure transcription of the spec.
        (WebCore::RenderBoxModelObject::calculateFillTileSize): Use new calculateImageIntrinsicDimensions() helper to figure out the intrinsic size.
        (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Propagate calculateFillTileSize() result to the image resource, via setContainerSizeForRenderer().
        (WebCore::RenderBoxModelObject::paintNinePieceImage): Use new calculateImageIntrinsicDimensions() helper to figure out the intrinsic size.
        * rendering/RenderBoxModelObject.h: Clarify some variable names, added calculateImageIntrinsicDimensions().
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::RenderImage): Use IntSize(), instead of IntSize(0, 0).
        (WebCore::RenderImage::updateIntrinsicSizeIfNeeded): Refactored from imageDimensionsChanged().
        (WebCore::RenderImage::imageDimensionsChanged): Use updateIntrinsicSizeIfNeeded().
        (WebCore::RenderImage::computeReplacedLogicalWidth): Use RenderReplaced::computeReplacedLogicalWidth() exclusively. For this to work, the intrinsic size must be correct.
        (WebCore::RenderImage::computeIntrinsicRatioInformation): Default implementation for non-SVGImages.
        (WebCore::RenderImage::needsPreferredWidthsRecalculation): Return true, just like RenderPart, if embeddedContentBox is not null.
        (WebCore::RenderImage::embeddedContentBox): Returns the RenderSVGRoot* renderer of the embedded SVG, if possible.
        * rendering/RenderImage.h: Remove isLogicalWidth/HeightSpecified() / computeReplacedLogicalHeight() / calcAspectRatioLogicalWidth/Height().
        * rendering/RenderImageResource.cpp:
        (WebCore::RenderImageResource::setContainerSizeForRenderer): Pass around new "float containerZoomFactor" parameter.
        * rendering/RenderImageResourceStyleImage.cpp:
        (WebCore::RenderImageResourceStyleImage::image): embeddedContentBox() is now calling image() earlier than before. We now have to handle the case that the image is pending.
        (WebCore::RenderImageResourceStyleImage::setContainerSizeForRenderer): Pass zoom factor.
        * rendering/RenderImageResourceStyleImage.h:
        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::computePreferredLogicalWidths): Pass effective zoom to setContainerSizeForRenderer().
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::computeIntrinsicLogicalWidth): Generalized this code, as RenderImage is using it as well now. Marginal changes needed.
        (WebCore::RenderReplaced::computeIntrinsicLogicalHeight): Ditto.
        (WebCore::RenderReplaced::computeReplacedLogicalWidth): Ditto.
        * rendering/style/StyleCachedImage.cpp:
        (WebCore::StyleCachedImage::computeIntrinsicDimensions): Stop passing m_renderer to CachedImage, it's no longer needed.
        (WebCore::StyleCachedImage::setContainerSizeForRenderer): Add "float containerZoomFactor" parameter.
        * rendering/style/StyleCachedImage.h: Add "float containerZoomFactor" parameter to setContainerSizeForRenderer.
        * rendering/style/StyleGeneratedImage.h:
        (WebCore::StyleGeneratedImage::setContainerSizeForRenderer): Ditto.
        * rendering/style/StyleImage.h: Ditto.
        * rendering/style/StylePendingImage.h:
        (WebCore::StylePendingImage::setContainerSizeForRenderer): Ditto.
        * rendering/svg/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::layout): Always supply a container size when embedding SVGs in <svg:image>.
        * rendering/svg/RenderSVGRoot.cpp: Move "override container size" from SVGSVGElement into RenderSVGRoot, where it belongs.
        (WebCore::RenderSVGRoot::isEmbeddedThroughImageElement): Add helper method to determine whether we're loaded through SVGImage.
        (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): If we have a valid container size, it has precendence (only supplied via external SVGImages).
        (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
        (WebCore::RenderSVGRoot::layout): Remove calcViewport() usage, no need to track/override the viewport size anymore, all done in coputeReplacedLogical* now.
        (WebCore::RenderSVGRoot::paint): Use borderBoxRect() which now always matches the previously computed m_viewportSize.
        (WebCore::RenderSVGRoot::computeRectForRepaint): Ditto.
        * rendering/svg/RenderSVGRoot.h: Move "override container size" from SVGSVGElement into RenderSVGRoot, where it belongs.
        (WebCore::RenderSVGRoot::containerSize):
        (WebCore::RenderSVGRoot::setContainerSize):
        * svg/SVGLength.cpp:
        (WebCore::SVGLength::determineViewport): Resolve lengths against override container size in documents embedded through SVGImage.
        * svg/SVGSVGElement.cpp: Remove "override container size" handling from SVGSVGElement.
        (WebCore::SVGSVGElement::SVGSVGElement): Ditto.
        (WebCore::SVGSVGElement::currentViewBoxRect): Always synthesize a viewBox, if we're embedded through SVGImage, as demanded by SVG 1.1 2nd Edition.
        * svg/SVGSVGElement.h:
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImageChromeClient::isSVGImageChromeClient): Return true, used to identify whether RenderSVGRoot is embedded through SVGImage.
        (WebCore::SVGImage::createWithDataAndSize): Add new helper function.
        (WebCore::SVGImage::setContainerZoom): Forwarded to Page::setPageZoomFactor.
        (WebCore::SVGImage::setContainerSize): Assert that container size is not empty. We should never receive an empty container size.
        (WebCore::SVGImage::usesContainerSize): Adapt to override container size changes, it now lives in RenderSVGRoot instead of SVGSVGElement.
        (WebCore::SVGImage::size): New algorithm to figure out the size of an embedded SVG, as demanded by the CSS/SVG specs.
        (WebCore::SVGImage::embeddedContentBox): Add helper which returns the RenderSVGRoot of the document.
        (WebCore::SVGImage::computeIntrinsicDimensions): Implement intrinsic ratio calculation.
        (WebCore::SVGImage::dataChanged): Force calling FrameView::setCanHaveScrollbars(false), as SVG images now always synthesize a viewBox, and thus never receive scrollbars.
        * svg/graphics/SVGImage.h:


Canonical link: https://commits.webkit.org/87466@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@98852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Nikolas Zimmermann committed Oct 31, 2011
1 parent bde8935 commit 6c2b681f92ce48b65fdc37e6341a0a03a973a211
Showing with 3,748 additions and 501 deletions.
  1. +135 −0 LayoutTests/ChangeLog
  2. +65 −0 LayoutTests/css2.1/20110323/background-intrinsic-001.htm
  3. +67 −0 LayoutTests/css2.1/20110323/background-intrinsic-002.htm
  4. +67 −0 LayoutTests/css2.1/20110323/background-intrinsic-003.htm
  5. +70 −0 LayoutTests/css2.1/20110323/background-intrinsic-004.htm
  6. +70 −0 LayoutTests/css2.1/20110323/background-intrinsic-005.htm
  7. +68 −0 LayoutTests/css2.1/20110323/background-intrinsic-006.htm
  8. +68 −0 LayoutTests/css2.1/20110323/background-intrinsic-007.htm
  9. +68 −0 LayoutTests/css2.1/20110323/background-intrinsic-008.htm
  10. +68 −0 LayoutTests/css2.1/20110323/background-intrinsic-009.htm
  11. +5 −0 LayoutTests/css2.1/20110323/resources/green-intrinsic-height-ratio.svg
  12. +5 −0 LayoutTests/css2.1/20110323/resources/green-intrinsic-height.svg
  13. +4 −0 LayoutTests/css2.1/20110323/resources/green-intrinsic-none.svg
  14. +5 −0 LayoutTests/css2.1/20110323/resources/green-intrinsic-ratio-landscape.svg
  15. +5 −0 LayoutTests/css2.1/20110323/resources/green-intrinsic-ratio-portrait.svg
  16. +5 −0 LayoutTests/css2.1/20110323/resources/green-intrinsic-width-height.svg
  17. +5 −0 LayoutTests/css2.1/20110323/resources/green-intrinsic-width-pc-height-pc.svg
  18. +5 −0 LayoutTests/css2.1/20110323/resources/green-intrinsic-width-ratio.svg
  19. +5 −0 LayoutTests/css2.1/20110323/resources/green-intrinsic-width.svg
  20. +5 −0 LayoutTests/css2.1/20110323/resources/red-intrinsic-height-ratio.svg
  21. +5 −0 LayoutTests/css2.1/20110323/resources/red-intrinsic-height.svg
  22. +4 −0 LayoutTests/css2.1/20110323/resources/red-intrinsic-none.svg
  23. +5 −0 LayoutTests/css2.1/20110323/resources/red-intrinsic-ratio-landscape.svg
  24. +5 −0 LayoutTests/css2.1/20110323/resources/red-intrinsic-ratio-portrait.svg
  25. +5 −0 LayoutTests/css2.1/20110323/resources/red-intrinsic-width-height.svg
  26. +5 −0 LayoutTests/css2.1/20110323/resources/red-intrinsic-width-pc-height-pc.svg
  27. +5 −0 LayoutTests/css2.1/20110323/resources/red-intrinsic-width-ratio.svg
  28. +5 −0 LayoutTests/css2.1/20110323/resources/red-intrinsic-width.svg
  29. +63 −0 LayoutTests/fast/backgrounds/size/contain-and-cover-zoomed.html
  30. +1 −1 LayoutTests/fast/images/percent-height-image-expected.txt
  31. +14 −9 LayoutTests/fast/images/percent-height-image.html
  32. BIN LayoutTests/platform/mac-snowleopard/svg/zoom/page/relative-sized-document-scrollbars-expected.png
  33. BIN LayoutTests/platform/mac-snowleopard/svg/zoom/page/zoom-foreignObject-expected.png
  34. +164 −164 LayoutTests/platform/mac/css1/text_properties/vertical_align-expected.txt
  35. BIN LayoutTests/platform/mac/css2.1/20110323/abspos-non-replaced-width-margin-000-expected.png
  36. BIN LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-001-expected.png
  37. +20 −0 LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-001-expected.txt
  38. BIN LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-002-expected.png
  39. +20 −0 LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-002-expected.txt
  40. BIN LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-003-expected.png
  41. +20 −0 LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-003-expected.txt
  42. BIN LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-004-expected.png
  43. +20 −0 LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-004-expected.txt
  44. BIN LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-005-expected.png
  45. +20 −0 LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-005-expected.txt
  46. BIN LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-006-expected.png
  47. +20 −0 LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-006-expected.txt
  48. BIN LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-007-expected.png
  49. +20 −0 LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-007-expected.txt
  50. BIN LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-008-expected.png
  51. +20 −0 LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-008-expected.txt
  52. BIN LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-009-expected.png
  53. +20 −0 LayoutTests/platform/mac/css2.1/20110323/background-intrinsic-009-expected.txt
  54. BIN LayoutTests/platform/mac/css2.1/20110323/block-non-replaced-width-008-expected.png
  55. BIN LayoutTests/platform/mac/fast/backgrounds/background-leakage-transforms-expected.png
  56. BIN LayoutTests/platform/mac/fast/backgrounds/size/contain-and-cover-expected.png
  57. BIN LayoutTests/platform/mac/fast/backgrounds/size/contain-and-cover-zoomed-expected.png
  58. +13 −0 LayoutTests/platform/mac/fast/backgrounds/size/contain-and-cover-zoomed-expected.txt
  59. BIN LayoutTests/platform/mac/fast/block/float/015-expected.png
  60. +5 −5 LayoutTests/platform/mac/fast/block/float/015-expected.txt
  61. BIN LayoutTests/platform/mac/fast/block/positioning/replaced-inside-fixed-top-bottom-expected.png
  62. +1 −1 LayoutTests/platform/mac/fast/block/positioning/replaced-inside-fixed-top-bottom-expected.txt
  63. BIN LayoutTests/platform/mac/fast/repaint/block-layout-inline-children-replaced-expected.png
  64. +1 −1 LayoutTests/platform/mac/fast/repaint/block-layout-inline-children-replaced-expected.txt
  65. BIN ...ts/platform/mac/svg/as-background-image/background-image-preserveaspectRatio-support-expected.png
  66. +94 −0 ...ts/platform/mac/svg/as-background-image/background-image-preserveaspectRatio-support-expected.txt
  67. BIN LayoutTests/platform/mac/svg/as-background-image/background-image-tiled-expected.png
  68. +6 −0 LayoutTests/platform/mac/svg/as-background-image/background-image-tiled-expected.txt
  69. BIN ...Tests/platform/mac/svg/as-background-image/same-image-two-instances-background-image-expected.png
  70. +7 −0 ...Tests/platform/mac/svg/as-background-image/same-image-two-instances-background-image-expected.txt
  71. BIN LayoutTests/platform/mac/svg/as-background-image/svg-as-background-4-expected.png
  72. BIN LayoutTests/platform/mac/svg/as-border-image/svg-as-border-image-expected.png
  73. BIN LayoutTests/platform/mac/svg/as-image/animated-svg-as-image-expected.png
  74. BIN LayoutTests/platform/mac/svg/as-image/img-preserveAspectRatio-support-1-expected.png
  75. +156 −0 LayoutTests/platform/mac/svg/as-image/img-preserveAspectRatio-support-1-expected.txt
  76. BIN LayoutTests/platform/mac/svg/as-image/same-image-two-instances-expected.png
  77. +10 −0 LayoutTests/platform/mac/svg/as-image/same-image-two-instances-expected.txt
  78. BIN LayoutTests/platform/mac/svg/as-image/svg-as-relative-image-expected.png
  79. BIN LayoutTests/platform/mac/svg/as-image/svg-as-relative-image-with-explicit-size-expected.png
  80. +8 −0 LayoutTests/platform/mac/svg/as-image/svg-as-relative-image-with-explicit-size-expected.txt
  81. BIN LayoutTests/platform/mac/svg/as-image/svg-image-change-content-size-expected.png
  82. +11 −0 LayoutTests/platform/mac/svg/as-image/svg-image-change-content-size-expected.txt
  83. BIN LayoutTests/platform/mac/svg/zoom/page/relative-sized-document-scrollbars-expected.png
  84. +5 −5 LayoutTests/platform/mac/svg/zoom/page/relative-sized-document-scrollbars-expected.txt
  85. BIN LayoutTests/platform/mac/svg/zoom/page/zoom-background-image-tiled-expected.png
  86. +6 −0 LayoutTests/platform/mac/svg/zoom/page/zoom-background-image-tiled-expected.txt
  87. BIN LayoutTests/platform/mac/svg/zoom/page/zoom-background-images-expected.png
  88. +21 −0 LayoutTests/platform/mac/svg/zoom/page/zoom-background-images-expected.txt
  89. BIN LayoutTests/platform/mac/svg/zoom/page/zoom-foreignObject-expected.png
  90. +5 −5 LayoutTests/platform/mac/svg/zoom/page/zoom-foreignObject-expected.txt
  91. BIN LayoutTests/platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png
  92. +156 −0 LayoutTests/platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt
  93. BIN ...sts/platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.png
  94. +8 −0 ...sts/platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.txt
  95. BIN LayoutTests/platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.png
  96. +8 −0 LayoutTests/platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.txt
  97. BIN LayoutTests/platform/mac/svg/zoom/page/zoom-svg-as-image-expected.png
  98. +8 −0 LayoutTests/platform/mac/svg/zoom/page/zoom-svg-as-image-expected.txt
  99. BIN LayoutTests/platform/mac/svg/zoom/page/zoom-svg-as-relative-image-expected.png
  100. +8 −0 LayoutTests/platform/mac/svg/zoom/page/zoom-svg-as-relative-image-expected.txt
  101. +134 −0 LayoutTests/svg/as-background-image/background-image-preserveaspectRatio-support.html
  102. +21 −0 LayoutTests/svg/as-background-image/background-image-tiled.html
  103. +24 −0 LayoutTests/svg/as-background-image/resources/construction-tape.svg
  104. +1 −1 LayoutTests/svg/as-background-image/resources/hearts.svg
  105. +23 −0 LayoutTests/svg/as-background-image/same-image-two-instances-background-image.html
  106. +139 −0 LayoutTests/svg/as-image/img-preserveAspectRatio-support-1.html
  107. +76 −0 LayoutTests/svg/as-image/resources/circle-default-meet.svg
  108. +76 −0 LayoutTests/svg/as-image/resources/circle-default-none.svg
  109. +76 −0 LayoutTests/svg/as-image/resources/circle-default-slice.svg
  110. +73 −0 LayoutTests/svg/as-image/resources/circle-nosize.svg
  111. +76 −0 LayoutTests/svg/as-image/resources/circle-viewbox-default.svg
  112. +77 −0 LayoutTests/svg/as-image/resources/circle-viewbox-meet.svg
  113. +77 −0 LayoutTests/svg/as-image/resources/circle-viewbox-none.svg
  114. +77 −0 LayoutTests/svg/as-image/resources/circle-viewbox-slice.svg
  115. +2 −1 LayoutTests/svg/as-image/resources/green-relative-size-rect.svg
  116. +23 −0 LayoutTests/svg/as-image/same-image-two-instances.html
  117. +16 −0 LayoutTests/svg/as-image/svg-as-relative-image-with-explicit-size.html
  118. +38 −0 LayoutTests/svg/as-image/svg-image-change-content-size.xhtml
  119. +4 −0 LayoutTests/svg/zoom/page/resources/relative-sized-background-with-viewBox.svg
  120. +24 −0 LayoutTests/svg/zoom/page/zoom-background-image-tiled.html
  121. +40 −0 LayoutTests/svg/zoom/page/zoom-background-images.html
  122. +142 −0 LayoutTests/svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html
  123. +20 −0 LayoutTests/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox.html
  124. +20 −0 LayoutTests/svg/zoom/page/zoom-svg-as-background-with-relative-size.html
  125. +20 −0 LayoutTests/svg/zoom/page/zoom-svg-as-image.html
  126. +20 −0 LayoutTests/svg/zoom/page/zoom-svg-as-relative-image.html
  127. +139 −0 Source/WebCore/ChangeLog
  128. +2 −2 Source/WebCore/css/CSSImageGeneratorValue.cpp
  129. +66 −20 Source/WebCore/loader/cache/CachedImage.cpp
  130. +3 −5 Source/WebCore/loader/cache/CachedImage.h
  131. +2 −0 Source/WebCore/page/ChromeClient.h
  132. +1 −0 Source/WebCore/platform/graphics/Image.h
  133. +36 −18 Source/WebCore/rendering/ImageBySizeCache.cpp
  134. +23 −5 Source/WebCore/rendering/ImageBySizeCache.h
  135. +120 −14 Source/WebCore/rendering/RenderBoxModelObject.cpp
  136. +2 −1 Source/WebCore/rendering/RenderBoxModelObject.h
  137. +64 −89 Source/WebCore/rendering/RenderImage.cpp
  138. +5 −7 Source/WebCore/rendering/RenderImage.h
  139. +1 −1 Source/WebCore/rendering/RenderImageResource.cpp
  140. +14 −0 Source/WebCore/rendering/RenderImageResourceStyleImage.cpp
  141. +2 −2 Source/WebCore/rendering/RenderImageResourceStyleImage.h
  142. +1 −1 Source/WebCore/rendering/RenderListMarker.cpp
  143. +6 −5 Source/WebCore/rendering/RenderReplaced.cpp
  144. +4 −4 Source/WebCore/rendering/style/StyleCachedImage.cpp
  145. +1 −1 Source/WebCore/rendering/style/StyleCachedImage.h
  146. +1 −1 Source/WebCore/rendering/style/StyleGeneratedImage.h
  147. +1 −1 Source/WebCore/rendering/style/StyleImage.h
  148. +1 −1 Source/WebCore/rendering/style/StylePendingImage.h
  149. +1 −0 Source/WebCore/rendering/svg/RenderSVGImage.cpp
  150. +39 −44 Source/WebCore/rendering/svg/RenderSVGRoot.cpp
  151. +7 −7 Source/WebCore/rendering/svg/RenderSVGRoot.h
  152. +13 −5 Source/WebCore/svg/SVGLength.cpp
  153. +10 −21 Source/WebCore/svg/SVGSVGElement.cpp
  154. +0 −8 Source/WebCore/svg/SVGSVGElement.h
  155. +65 −43 Source/WebCore/svg/graphics/SVGImage.cpp
  156. +6 −2 Source/WebCore/svg/graphics/SVGImage.h
@@ -1,3 +1,138 @@
2011-10-31 Nikolas Zimmermann <nzimmermann@rim.com>

CSS 2.1 failure: background-intrinsic-*
https://bugs.webkit.org/show_bug.cgi?id=47156

Reviewed by Antti Koivisto.

Add all *intrinsic* tests from the CSS 2.1 Testsuite - we pass all of them now.
All tests regarding SVG are now imported in LayoutTests, none are failing anymore.

Add several new testcases covering the SVG Image size negotiation logic, as defined in CSS 2.1.

* css2.1/20110323/background-intrinsic-001.htm: Added.
* css2.1/20110323/background-intrinsic-002.htm: Added.
* css2.1/20110323/background-intrinsic-003.htm: Added.
* css2.1/20110323/background-intrinsic-004.htm: Added.
* css2.1/20110323/background-intrinsic-005.htm: Added.
* css2.1/20110323/background-intrinsic-006.htm: Added.
* css2.1/20110323/background-intrinsic-007.htm: Added.
* css2.1/20110323/background-intrinsic-008.htm: Added.
* css2.1/20110323/background-intrinsic-009.htm: Added.
* css2.1/20110323/resources/green-intrinsic-height-ratio.svg: Added.
* css2.1/20110323/resources/green-intrinsic-height.svg: Added.
* css2.1/20110323/resources/green-intrinsic-none.svg: Added.
* css2.1/20110323/resources/green-intrinsic-ratio-landscape.svg: Added.
* css2.1/20110323/resources/green-intrinsic-ratio-portrait.svg: Added.
* css2.1/20110323/resources/green-intrinsic-width-height.svg: Added.
* css2.1/20110323/resources/green-intrinsic-width-pc-height-pc.svg: Added.
* css2.1/20110323/resources/green-intrinsic-width-ratio.svg: Added.
* css2.1/20110323/resources/green-intrinsic-width.svg: Added.
* css2.1/20110323/resources/red-intrinsic-height-ratio.svg: Added.
* css2.1/20110323/resources/red-intrinsic-height.svg: Added.
* css2.1/20110323/resources/red-intrinsic-none.svg: Added.
* css2.1/20110323/resources/red-intrinsic-ratio-landscape.svg: Added.
* css2.1/20110323/resources/red-intrinsic-ratio-portrait.svg: Added.
* css2.1/20110323/resources/red-intrinsic-width-height.svg: Added.
* css2.1/20110323/resources/red-intrinsic-width-pc-height-pc.svg: Added.
* css2.1/20110323/resources/red-intrinsic-width-ratio.svg: Added.
* css2.1/20110323/resources/red-intrinsic-width.svg: Added.
* fast/backgrounds/size/contain-and-cover-zoomed.html: Added.
* fast/images/percent-height-image-expected.txt: Update results, testcase is fixed now.
* fast/images/percent-height-image.html: Make test async, to make it work cross-browser. With this patch we now pass this testcase.
* platform/mac-snowleopard/svg/zoom/page/relative-sized-document-scrollbars-expected.png: Removed.
* platform/mac-snowleopard/svg/zoom/page/zoom-foreignObject-expected.png: Removed.
* platform/mac/css1/text_properties/vertical_align-expected.txt: Update for rounding differences.
* platform/mac/css2.1/20110323/background-intrinsic-001-expected.png: Added.
* platform/mac/css2.1/20110323/background-intrinsic-001-expected.txt: Added.
* platform/mac/css2.1/20110323/background-intrinsic-002-expected.png: Added.
* platform/mac/css2.1/20110323/background-intrinsic-002-expected.txt: Added.
* platform/mac/css2.1/20110323/background-intrinsic-003-expected.png: Added.
* platform/mac/css2.1/20110323/background-intrinsic-003-expected.txt: Added.
* platform/mac/css2.1/20110323/background-intrinsic-004-expected.png: Added.
* platform/mac/css2.1/20110323/background-intrinsic-004-expected.txt: Added.
* platform/mac/css2.1/20110323/background-intrinsic-005-expected.png: Added.
* platform/mac/css2.1/20110323/background-intrinsic-005-expected.txt: Added.
* platform/mac/css2.1/20110323/background-intrinsic-006-expected.png: Added.
* platform/mac/css2.1/20110323/background-intrinsic-006-expected.txt: Added.
* platform/mac/css2.1/20110323/background-intrinsic-007-expected.png: Added.
* platform/mac/css2.1/20110323/background-intrinsic-007-expected.txt: Added.
* platform/mac/css2.1/20110323/background-intrinsic-008-expected.png: Added.
* platform/mac/css2.1/20110323/background-intrinsic-008-expected.txt: Added.
* platform/mac/css2.1/20110323/background-intrinsic-009-expected.png: Added.
* platform/mac/css2.1/20110323/background-intrinsic-009-expected.txt: Added.
* platform/mac/fast/backgrounds/size/contain-and-cover-expected.png: Updated for rounding differences.
* platform/mac/fast/backgrounds/size/contain-and-cover-zoomed-expected.png: Added.
* platform/mac/fast/backgrounds/size/contain-and-cover-zoomed-expected.txt: Added.
* platform/mac/fast/block/float/015-expected.png: Slight changes, due 49x50 -> 50x50 size change.
* platform/mac/fast/block/float/015-expected.txt: Ditto.
* platform/mac/fast/block/positioning/replaced-inside-fixed-top-bottom-expected.png: Slight changes due to rounding.
* platform/mac/fast/block/positioning/replaced-inside-fixed-top-bottom-expected.txt: Ditto.
* platform/mac/fast/repaint/block-layout-inline-children-replaced-expected.png: Ditto.
* platform/mac/fast/repaint/block-layout-inline-children-replaced-expected.txt: Ditto.
* platform/mac/svg/as-background-image/background-image-preserveaspectRatio-support-expected.png: Added.
* platform/mac/svg/as-background-image/background-image-preserveaspectRatio-support-expected.txt: Added.
* platform/mac/svg/as-background-image/background-image-tiled-expected.png: Added.
* platform/mac/svg/as-background-image/background-image-tiled-expected.txt: Added.
* platform/mac/svg/as-background-image/same-image-two-instances-background-image-expected.png: Added.
* platform/mac/svg/as-background-image/same-image-two-instances-background-image-expected.txt: Added.
* platform/mac/svg/as-background-image/svg-as-background-4-expected.png: Adapt to preserveAspectRatio changes in hearts.svg.
* platform/mac/svg/as-border-image/svg-as-border-image-expected.png: This needed a rebaseline, it was forgotten before.
* platform/mac/svg/as-image/animated-svg-as-image-expected.png: Progression, now both images share the same size & ratio, as desired.
* platform/mac/svg/as-image/img-preserveAspectRatio-support-1-expected.png: Added.
* platform/mac/svg/as-image/img-preserveAspectRatio-support-1-expected.txt: Added.
* platform/mac/svg/as-image/same-image-two-instances-expected.png: Added.
* platform/mac/svg/as-image/same-image-two-instances-expected.txt: Added.
* platform/mac/svg/as-image/svg-as-relative-image-expected.png: Adapt to green-relative-size-rect.svg - a circle got added to make it easier to compare.
* platform/mac/svg/as-image/svg-as-relative-image-with-explicit-size-expected.png: Added.
* platform/mac/svg/as-image/svg-as-relative-image-with-explicit-size-expected.txt: Added.
* platform/mac/svg/as-image/svg-image-change-content-size-expected.png: Added.
* platform/mac/svg/as-image/svg-image-change-content-size-expected.txt: Added.
* platform/mac/svg/zoom/page/relative-sized-document-scrollbars-expected.png: Updated, scrollbars are gone - now matching Opera/FF.
* platform/mac/svg/zoom/page/relative-sized-document-scrollbars-expected.txt: Ditto.
* platform/mac/svg/zoom/page/zoom-background-image-tiled-expected.png: Added.
* platform/mac/svg/zoom/page/zoom-background-image-tiled-expected.txt: Added.
* platform/mac/svg/zoom/page/zoom-background-images-expected.png: Added.
* platform/mac/svg/zoom/page/zoom-background-images-expected.txt: Added.
* platform/mac/svg/zoom/page/zoom-foreignObject-expected.png: Updated, scrollbars are gone - now matching Opera/FF.
* platform/mac/svg/zoom/page/zoom-foreignObject-expected.txt: Ditto.
* platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png: Added.
* platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt: Added.
* platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.png: Added.
* platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.txt: Added.
* platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.png: Added.
* platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.txt: Added.
* platform/mac/svg/zoom/page/zoom-svg-as-image-expected.png: Added.
* platform/mac/svg/zoom/page/zoom-svg-as-image-expected.txt: Added.
* platform/mac/svg/zoom/page/zoom-svg-as-relative-image-expected.png: Added.
* platform/mac/svg/zoom/page/zoom-svg-as-relative-image-expected.txt: Added.
* svg/as-background-image/background-image-preserveaspectRatio-support.html: Added.
* svg/as-background-image/background-image-tiled.html: Added.
* svg/as-background-image/resources/construction-tape.svg: Added.
* svg/as-background-image/resources/hearts.svg: Fix testcase, by adding pAR="none", which is now respected. Now the image looks as desired across Opera/FF and us.
* svg/as-background-image/same-image-two-instances-background-image.html: Added.
* svg/as-image/img-preserveAspectRatio-support-1.html: Added.
* svg/as-image/resources/circle-default-meet.svg: Added.
* svg/as-image/resources/circle-default-none.svg: Added.
* svg/as-image/resources/circle-default-slice.svg: Added.
* svg/as-image/resources/circle-nosize.svg: Added.
* svg/as-image/resources/circle-viewbox-default.svg: Added.
* svg/as-image/resources/circle-viewbox-meet.svg: Added.
* svg/as-image/resources/circle-viewbox-none.svg: Added.
* svg/as-image/resources/circle-viewbox-slice.svg: Added.
* svg/as-image/resources/green-relative-size-rect.svg: Use relative units everywhere as intended. Add circle to make it easy to spot ratio changes.
* svg/as-image/same-image-two-instances.html: Added.
* svg/as-image/svg-as-relative-image-with-explicit-size.html: Added.
* svg/as-image/svg-image-change-content-size.xhtml: Added.
* svg/zoom/page/resources/relative-sized-background-with-viewBox.svg: Added.
* svg/zoom/page/zoom-background-image-tiled.html: Added.
* svg/zoom/page/zoom-background-images.html: Added.
* svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html: Added.
* svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox.html: Added.
* svg/zoom/page/zoom-svg-as-background-with-relative-size.html: Added.
* svg/zoom/page/zoom-svg-as-image.html: Added.
* svg/zoom/page/zoom-svg-as-relative-image.html: Added.

2011-10-31 Vsevolod Vlasov <vsevik@chromium.org>

Unreviewed, skiped failing test inspector/debugger/selected-call-frame-after-formatting-source.html on QT.
@@ -0,0 +1,65 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="reference" href="background-intrinsic-ref.xht">
<title>CSS Test: Background Intrinsic Sizes: No intrinsic size</title>
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
<link rel="help" href="http://www.w3.org/TR/CSS21/colors.html#background-properties">
<link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size">
<meta name="flags" content="svg">
<meta name="assert" content="A background image with no intrinsic size covers the entire padding box.">
<style type="text/css">
/* Setup. Use 5:6 ratio because it's weird and unlikely to be hard-coded anywhere. */
div {
position: relative;
}
.cover, .limit {
width: 120px;
height: 120px;
margin: 0.5em;
background: green; /* Used to match reference; remove for debugging. */
}
.control {
position: absolute;
top: 10px; bottom: 10px;
left: 10px; right: 30px;
}
.cover .control {
background: red;
}
.limit .control {
background: green;
}
.test {
/* 80x100 bgpos area */
height: 80px;
width: 60px;
padding: 10px;
/* 100 x 120 bgpaint area */
border: 10px solid transparent;
}

/* Test */
.cover .test {
background: no-repeat url(resources/green-intrinsic-none.svg);
}
.limit .test {
background: no-repeat url(resources/red-intrinsic-none.svg);
}
</style>
</head>
<body>
<p>There must be two green boxes below and no red.</p>

<div class="cover">
<div class="control"></div>
<div class="test"></div>
</div>

<div class="limit">
<div class="test"></div>
<div class="control"></div>
</div>

</body>
</html>
@@ -0,0 +1,67 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="reference" href="background-intrinsic-ref.xht">
<title>CSS Test: Background Intrinsic Sizes: Intrinsic Width</title>
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
<link rel="help" href="http://www.w3.org/TR/CSS21/colors.html#background-properties">
<link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size">
<meta name="flags" content="svg">
<meta name="assert" content="A background image with only an intrinsic width covers its intrinsic width and the height of the padding box.">
<style type="text/css">
/* Setup. Use 5:6 ratio because it's weird and unlikely to be hard-coded anywhere. */
div {
position: relative;
}
.cover, .limit {
width: 120px;
height: 120px;
margin: 0.5em;
background: green; /* Used to match reference; remove for debugging. */
}
.control {
position: absolute;
top: 10px; bottom: 10px;
left: 10px; right: 30px;
}
.cover .control {
background: red;
}
.limit .control {
background: green;
}
.test {
/* 80x100 bgpos area */
height: 80px;
width: 60px;
padding: 10px;
border: 10px solid transparent;
}

/* Test */
.cover .test {
background: no-repeat url(resources/green-intrinsic-width.svg);
}
.limit .test {
background: no-repeat url(resources/red-intrinsic-width.svg);
}
.control {
width: 60px;
}
</style>
</head>
<body>
<p>There must be two green boxes below and no red.</p>

<div class="cover">
<div class="control"></div>
<div class="test"></div>
</div>

<div class="limit">
<div class="test"></div>
<div class="control"></div>
</div>

</body>
</html>
@@ -0,0 +1,67 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="reference" href="background-intrinsic-ref.xht">
<title>CSS Test: Background Intrinsic Sizes: Intrinsic Height</title>
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
<link rel="help" href="http://www.w3.org/TR/CSS21/colors.html#background-properties">
<link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size">
<meta name="flags" content="svg">
<meta name="assert" content="A background image with only an intrinsic height covers its intrinsic height and the width of the padding box.">
<style type="text/css">
/* Setup. Use 5:6 ratio because it's weird and unlikely to be hard-coded anywhere. */
div {
position: relative;
}
.cover, .limit {
width: 120px;
height: 120px;
margin: 0.5em;
background: green; /* Used to match reference; remove for debugging. */
}
.control {
position: absolute;
top: 10px; bottom: 10px;
left: 10px; right: 30px;
}
.cover .control {
background: red;
}
.limit .control {
background: green;
}
.test {
/* 80x100 bgpos area */
height: 80px;
width: 60px;
padding: 10px;
border: 10px solid transparent;
}

/* Test */
.cover .test {
background: no-repeat url(resources/green-intrinsic-height.svg);
}
.limit .test {
background: no-repeat url(resources/red-intrinsic-height.svg);
}
.control {
height: 60px;
}
</style>
</head>
<body>
<p>There must be two green boxes below and no red.</p>

<div class="cover">
<div class="control"></div>
<div class="test"></div>
</div>

<div class="limit">
<div class="test"></div>
<div class="control"></div>
</div>

</body>
</html>

0 comments on commit 6c2b681

Please sign in to comment.