Bug 128248 - Large SVG sprite does not display (small does) with CSS background-position
Summary: Large SVG sprite does not display (small does) with CSS background-position
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad All
: P2 Critical
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-05 07:39 PST by Ben Frain
Modified: 2014-02-05 07:40 PST (History)
1 user (show)

See Also:


Attachments
basic HTML page (2.77 KB, text/html)
2014-02-05 07:39 PST, Ben Frain
no flags Details
This is the SVG sprite that needs saving alongside the HTML for testing (3.56 KB, image/svg+xml)
2014-02-05 07:40 PST, Ben Frain
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.