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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>16136</bug_id>
          
          <creation_ts>2012-02-27 16:46:54 +0000</creation_ts>
          <short_desc>Requiring a &quot;plugin&quot; for &lt;embed&gt; is not compatible with &lt;embed&gt; pointing to SVG</short_desc>
          <delta_ts>2013-06-05 23:24:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64649</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-02-27 16:46:54 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html
Multipage: http://www.whatwg.org/C#the-embed-element
Complete: http://www.whatwg.org/c#the-embed-element

Comment:
Requiring a &quot;plugin&quot; for &lt;embed&gt; is not compatible with &lt;embed&gt; pointing to
SVG

Posted from: 71.184.125.56 by bzbarsky@mit.edu
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0a1) Gecko/20120218 Firefox/13.0a1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64650</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-02-27 16:50:32 +0000</bug_when>
    <thetext>Specifically, I believe &lt;embed&gt; pointing to SVG creates a child browsing context in browsers, whereas the current spec text requires that no child browsing context ever be created for &lt;embed&gt;....

Gecko&apos;s behavior for &lt;embed&gt; is that it&apos;s only handled via plug-ins (in the &quot;no child browsing context&quot; sense, though they also happen to be NPAPI plug-ins) except for &quot;image/svg+xml&quot; when it creates a child browsing context.  I haven&apos;t tested other browsers extensively to see what their behavior is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70609</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 16:21:11 +0000</bug_when>
    <thetext>This bug was cloned to create bug 18070 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73936</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-09-14 17:59:27 +0000</bug_when>
    <thetext>Is it an accessible browsing context? Or could it be simulated by an NPAPI plugin?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78753</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-11-25 03:05:53 +0000</bug_when>
    <thetext>The only method I seem to be able to get a hold of is getSVGDocument(), and it&apos;s always returning null for me:
   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1925</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78799</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-11-26 04:22:45 +0000</bug_when>
    <thetext>bz: Could you elaborate on what you mean by &quot;creates a child browsing context&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78800</commentid>
    <comment_count>6</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-11-26 04:42:08 +0000</bug_when>
    <thetext>Acts just like http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#the-object-element around where it says &quot;The object element must be associated with a newly created nested browsing context, if it does not already have one.&quot; 

Linking to that part specifically is slightly rocket-science because the various lists of steps are not actually linkable to.  :(  But it&apos;s in step 8 (&quot;Handler&quot;) of the steps run by the queued task that (re)determines what the object element represents...

It&apos;s a real child browsing context in at least the following senses:

1)  getSVGDocument() will return the document object inside, if you call it _after_ the SVG has actually had a chance to load, unlike the testcase linked in comment 4.  From here you can get to the Window, change the location, etc.  When that happens the browsing context participates in session history in the usual way, at first glance.

2)  It can be targeted by links, in at least Firefox, Safari, Chrome, and Opera; I haven&apos;t tested IE.  Yes, this may just be a bug they all share.  Testcase looks somewhat like this:

  &lt;embed name=&quot;foo&quot; src=&quot;test.svg&quot;&gt;
  &lt;a href=&quot;http://w3.org&quot; target=&quot;foo&quot;&gt;click me&lt;/a&gt;

When this happens, the browsing context participates in session history in the usual way.

3)  Scripts running in the SVG document see a Window, and window.parent is the Window corresponding to the document the &lt;embed&gt; is in.

I strongly suspect simulating the session history bits with an NPAPI plug-in would be .... difficult at best.  But I&apos;m not an NPAPI expert.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78863</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-11-26 20:41:48 +0000</bug_when>
    <thetext>Oy vey. Ok. Well that&apos;s... interesting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78875</commentid>
    <comment_count>8</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-11-26 22:23:01 +0000</bug_when>
    <thetext>Yeah, &quot;interesting&quot; is one way to describe it....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78888</commentid>
    <comment_count>9</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2012-11-27 05:20:54 +0000</bug_when>
    <thetext>Is (2) something we should try to change? Refuse navigation in &lt;embed&gt; browsing contexts?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82711</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-02-07 20:04:31 +0000</bug_when>
    <thetext>So really here we&apos;re just saying &lt;embed&gt; turns into a version of &lt;object&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82763</commentid>
    <comment_count>11</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-02-08 17:01:51 +0000</bug_when>
    <thetext>Yes, but with different behavior in terms of how it decides what type of content it&apos;s dealing with and how it will handle it...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86825</commentid>
    <comment_count>12</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-04-25 22:27:11 +0000</bug_when>
    <thetext>*** Bug 9362 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88772</commentid>
    <comment_count>13</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-06-05 23:23:15 +0000</bug_when>
    <thetext>I&apos;ve tried to define this better.

Note that WebKit is way more happy-go-lucky than Gecko with &lt;embed&gt; (e.g. it allows src=&quot;&quot; to point to HTML docs or images and happily renders them). I haven&apos;t specified this. I don&apos;t see much point in opening &lt;embed&gt; to be just a poor man&apos;s &lt;object&gt;; that would just lead to more surface for bugs, without adding anything.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88781</commentid>
    <comment_count>14</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-06-05 23:24:26 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7914.
Check-in comment: pushing &lt;embed&gt;&apos;s specification further towards its reality
http://html5.org/tools/web-apps-tracker?from=7913&amp;to=7914</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>