Bug 128248

Summary: Large SVG sprite does not display (small does) with CSS background-position
Product: WebKit Reporter: Ben Frain <contact>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Critical CC: zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: All   
Description Flags
basic HTML page
This is the SVG sprite that needs saving alongside the HTML for testing none

Description Ben Frain 2014-02-05 07:39:10 PST
Created attachment 223233 [details]
basic HTML page

If an HTML element is assigned an SVG background-image in CSS, it does not render if the vector graphic sprite is too 'large'.

Is this because the UA is rendering out a large image and before painting to screen, ignoring the defined size in the CSS (e.g. background-size: 749px 27px;)? For example, if an SVG has its width and height attributes set thus: width="15520" height="560", then iOS is unable to render the background image.

However, if exactly the same vector data is saved out into an SVG sprite with smaller (albeit still unit-less) dimensions iOS is able to render it.

A test page is attached, view it on an iOS device to witness the problem (or rather not witness it because nothing appears). View the file in the desktop and the image it shown.
Comment 1 Ben Frain 2014-02-05 07:40:46 PST
Created attachment 223234 [details]
This is the SVG sprite that needs saving alongside the HTML for testing

Ensure this SVG sprite is saved alongside the original attachment to test the issue.