<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>13951</bug_id>
          
          <creation_ts>2007-05-31 09:34:57 -0700</creation_ts>
          <short_desc>&quot;unsafe&quot; error when accessing contentDocument of svg object created with data attribute</short_desc>
          <delta_ts>2010-01-02 09:56:44 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Teun">teun</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>8650</commentid>
    <comment_count>0</comment_count>
    <who name="Teun">teun</who>
    <bug_when>2007-05-31 09:34:57 -0700</bug_when>
    <thetext>On an &lt;object&gt; with data=&quot;data:image/svg+xml,&lt;?xml...&quot; i am not allowd to access the objectElement.contentDocument.
The followin error is given:

Unsafe JavaScript attempt to access frame with URL data:image/svg+xml,%3C?xml%20version=%221
...
94%3C/text%3E%3C/g%3E%3C/svg%3E from frame with URL http://local.domain.tld/html/. Domains must match.

Since the object was created from the current document, one would expect to be able to access it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8648</commentid>
    <comment_count>1</comment_count>
      <attachid>14804</attachid>
    <who name="Teun">teun</who>
    <bug_when>2007-05-31 09:45:31 -0700</bug_when>
    <thetext>Created attachment 14804
HTML file that creates an SVG object and attempts to access its contentDocument</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8481</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-06-01 08:11:10 -0700</bug_when>
    <thetext>Confirmed with a local debug build of WebKit r21911 with Safari 2.0.4 (419.3) on Mac OS X 10.4.9 (8P135).

JavaScript Console:

Unsafe JavaScript attempt to access frame with URL data:image/svg+xml,%3C?xml%20version=%221.0%22%20encoding=%22UTF-8%22?%3E%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20xmlns:xlink=%22http://www.w3.org/1999/xlink%22%20version=%221.1%22%20baseProfile=%22full%22%20width=%22100%%22%20height=%22100%%22%20viewBox=%220%200%20350%20235%22%3E%3Crect%20x=%220%22%20y=%2233%22%20width=%22350%22%20height=%22133%22%20fill=%22red%22/%3E%3C/svg%3E from frame with URL http://bugs.webkit.org/attachment.cgi?id=14804. Domains must match.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>176332</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-01-02 09:56:44 -0800</bug_when>
    <thetext>This is a consequence of WebKit treating data URLs as having a unique origin.  There&apos;s been some debate about whether we should change that behavior globally.  If/when we do that, this bug will be fixed as a consequence.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>14804</attachid>
            <date>2007-05-31 09:45:31 -0700</date>
            <delta_ts>2007-05-31 09:45:31 -0700</delta_ts>
            <desc>HTML file that creates an SVG object and attempts to access its contentDocument</desc>
            <filename>svgobject.html</filename>
            <type>text/html</type>
            <size>1071</size>
            <attacher name="Teun">teun</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL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