Bug 54325 - SVG data:image/svg+xml;base64 URLs inside CSS throw mime type warning
Summary: SVG data:image/svg+xml;base64 URLs inside CSS throw mime type warning
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 17:20 PST by Lauren Bosak
Modified: 2011-07-01 18:06 PDT (History)
5 users (show)

See Also:


Attachments
Test Case (722 bytes, text/html)
2011-02-11 17:20 PST, Lauren Bosak
no flags Details
Add image/svg+xml to the list of acceptable MIME types for Image (1.97 KB, patch)
2011-06-24 13:45 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Test that doesn't work (2.09 KB, application/zip)
2011-07-01 15:30 PDT, Tim Horton
no flags Details
Archive of layout-test-results from ec2-cq-03 (1.34 MB, application/zip)
2011-07-01 17:34 PDT, WebKit Review Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lauren Bosak 2011-02-11 17:20:02 PST
Created attachment 82212 [details]
Test Case

Overview:

SVG data:image/svg+xml;base64 URLs inside CSS background:url();s throw this mime type warning:
Resource interpreted as image but transferred with MIME type image/svg+xml.



Steps to Reproduce:

1) View the attached test case html file.
2) Show the error console.

The warning "Resource interpreted as image but transferred with MIME type image/svg+xml." is displayed.



Expected Results:

I would have expected to see no warning.



Build Date & Platform:

I am able to replicate this on both the WebKit nightly: Version 5.0.3 (6533.19.4, r78038)
and the shipping Safari: Version 5.0.3 (6533.19.4).

On Mac OS X 10.6.6 Build 10J567.
Comment 1 Tim Horton 2011-06-24 10:31:54 PDT
<rdar://problem/8348296>
Comment 2 Tim Horton 2011-06-24 13:45:37 PDT
Created attachment 98535 [details]
Add image/svg+xml to the list of acceptable MIME types for Image
Comment 3 Nikolas Zimmermann 2011-06-24 13:51:48 PDT
Comment on attachment 98535 [details]
Add image/svg+xml to the list of acceptable MIME types for Image

I'm not sure about inspector stuff, can you write a test for that somehow? You should ask Pavel Feldman & co.
Comment 4 Tim Horton 2011-06-27 12:24:54 PDT
(In reply to comment #3)
> (From update of attachment 98535 [details])
> I'm not sure about inspector stuff, can you write a test for that somehow? You should ask Pavel Feldman & co.

I just spent way too long trying to get this test to work. It seems that since the console isn't open when the test loads, the message isn't logged at all (try it with the live inspector, it's true there too!). For some odd reason, none of the inspector tests seem to have this problem. This don't-log-the-error-if-the-console-isn't-open thing seems to be unique to SVG, maybe? Or at least, it doesn't affect the other tests when tested manually...

Any ideas? Is this something we actually should test?
Comment 5 Lauren Bosak 2011-06-27 23:16:32 PDT
FWIW, shipping SL Safari — Version 5.0.5 (6533.21.1) — doesn't behave the same as the nightly. The inspector shows the warning regardless of it's open state on page load. Nightly behaves as described in [Comment #4 From Tim Horton 2011-06-27 12:24:54 PST] — doesn't show the warnings unless the inspector is open on page load.
Comment 6 Tim Horton 2011-07-01 15:30:38 PDT
Created attachment 99529 [details]
Test that doesn't work

My vote is to throw this one in without a test; I just made a test that involves throwing the web inspector up, loading the HTML-with-inline-SVG that throws a warning in the Console in an <iframe>, waiting various different amounts of time after that finishes loading, dumping the console messages, and finishing the test (see attached), nothing I can do will make it record that warning.
Comment 7 WebKit Review Bot 2011-07-01 17:34:06 PDT
Comment on attachment 98535 [details]
Add image/svg+xml to the list of acceptable MIME types for Image

Rejecting attachment 98535 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=ec2-cq-03', '--port..." exit_code: 2

Last 500 characters of output:
.5%)
      6 tests timed out          ( 0.5%)
     49 text diff mismatch       ( 4.0%)
    341 skipped                  (27.7%)

=> Tests that will only be fixed if they crash (WONTFIX) (8130):
      1 test timed out           ( 0.0%)
      1 no expected result found ( 0.0%)
    109 text diff mismatch       ( 1.3%)
   7970 skipped                  (98.0%)


Regressions: Unexpected no expected results found : (1)
  platform/gtk/editing/selection/directionality-after-undo-replace.html = MISSING



Full output: http://queues.webkit.org/results/8975267
Comment 8 WebKit Review Bot 2011-07-01 17:34:11 PDT
Created attachment 99541 [details]
Archive of layout-test-results from ec2-cq-03

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: ec2-cq-03  Port: Chromium  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 9 WebKit Review Bot 2011-07-01 18:06:12 PDT
Comment on attachment 98535 [details]
Add image/svg+xml to the list of acceptable MIME types for Image

Clearing flags on attachment: 98535

Committed r90307: <http://trac.webkit.org/changeset/90307>
Comment 10 WebKit Review Bot 2011-07-01 18:06:19 PDT
All reviewed patches have been landed.  Closing bug.