Bug 82623 - SVG target style not respected when used in an img tag
Summary: SVG target style not respected when used in an img tag
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-29 09:26 PDT by Stephen Chenney
Modified: 2021-05-01 03:03 PDT (History)
3 users (show)

See Also:


Attachments
Two files for repro. Load the html file. (1.17 KB, application/zip)
2012-03-29 09:26 PDT, Stephen Chenney
no flags Details
Updated repro (1.94 KB, application/octet-stream)
2012-04-18 11:36 PDT, Tyler Young
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Chenney 2012-03-29 09:26:31 PDT
Created attachment 134600 [details]
Two files for repro. Load the html file.

Chromium http://code.google.com/p/chromium/issues/detail?id=120248

A user reports that the :target CSS selector does not work correctly with SVG content under some circumstances around the image tag. The easiest thing is to look at the attached repro case. In the repro case, the html file shoudl result in a set of cases and the text "Targetted" or "Not Targetted" after each case. The text to display is driven by the :target style selector, so failure of the text to appear represents failure of the CSS handling.

All other browsers do the right thing.

(It's a zip file because Ubuntu crashes when it tries to preview the repro case in a file load dialog. Beware.)

Here's the Chrome report:

Chrome Version       : 19.0.1077.3 (Official Build 128359) dev-m
URLs (if applicable) : http://www.w3.org/TR/SVG/linking.html#ViewHighlight
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
  Firefox Nightly 14.0a1: PASS
               Firefox 9: PASS
                   IE 10: PASS
                    IE 9: PASS
                Safari 5: FAIL
                  Chrome: FAIL

What steps will reproduce the problem?
1. Create an SVG that uses a :target style selector.
1. Use the img tag to display an image with a target component in the url (e.g. something.svg#the-target-id) to provide a CSS target.
2. Attempt to view the image.

What is the expected result?
The image is rendered with appropriate styling as per spec.

What happens instead?
The target is ignored, and rendered as if none given.

Please provide any additional information below. Attach a screenshot if possible.
Renders correctly if using embed, object, or iframe - but I don't want to allow any scripts contained within execute - using an embed also slows down page loading dramatically.