<?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>118859</bug_id>
          
          <creation_ts>2013-07-18 12:08:40 -0700</creation_ts>
          <short_desc>Sandbox attribute on an iframe blocks PDF documents from being rendered</short_desc>
          <delta_ts>2013-07-19 11:33:12 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Frames</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 7</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="Vestigal Organ">vestigalorgan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>thorton</cc>
    
    <cc>vestigalorgan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>909837</commentid>
    <comment_count>0</comment_count>
      <attachid>207012</attachid>
    <who name="Vestigal Organ">vestigalorgan</who>
    <bug_when>2013-07-18 12:08:40 -0700</bug_when>
    <thetext>Created attachment 207012
A test case that shows the behavior.

For an iframe, the sandbox attribute appears to block PDF files from being rendered, even if all of the sandbox&apos;s attributes are specified.

I&apos;ve attached a simple test case that demonstrates it. The test case requires a PDF file named &quot;test.pdf&quot; to be in the same folder as the HTML file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>909845</commentid>
    <comment_count>1</comment_count>
    <who name="Vestigal Organ">vestigalorgan</who>
    <bug_when>2013-07-18 12:30:40 -0700</bug_when>
    <thetext>Looking around a bit more, it seems that there is some debate as to how this should work. https://bugs.webkit.org/show_bug.cgi?id=39219 talked a bit about an allow-plugins value for the sandbox attribute, but it doesn&apos;t seem like much happened with it.

http://www.whatwg.org/specs/web-apps/current-work/#sandboxed-plugins-browsing-context-flag talks about a flag that can be set to allow plugins, but I don&apos;t see any way to do that.

http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-sandbox first says that plugins should be &quot;secured&quot; when the sandbox attribute is added, but then in the next couple of paragraphs it moves to talking about the plugins being disabled, instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>910249</commentid>
    <comment_count>2</comment_count>
      <attachid>207126</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-07-19 11:12:32 -0700</bug_when>
    <thetext>Created attachment 207126
test case

The previous test case did not actually have a sandbox attribute, so it didn&apos;t demonstrate the issue.

Plug-ins are a complicated issue indeed, but I think that Safari&apos;s built-in PDF support should work (and it doesn&apos;t).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>910264</commentid>
    <comment_count>3</comment_count>
    <who name="Vestigal Organ">vestigalorgan</who>
    <bug_when>2013-07-19 11:33:12 -0700</bug_when>
    <thetext>Ah, hehe, I can&apos;t believe that I messed up the original test case so badly XD

Your test case reproduces the issue on my machine, as well. Thanks for writing it.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>207012</attachid>
            <date>2013-07-18 12:08:40 -0700</date>
            <delta_ts>2013-07-19 11:12:32 -0700</delta_ts>
            <desc>A test case that shows the behavior.</desc>
            <filename>iframeSandboxPdf.html</filename>
            <type>text/html</type>
            <size>82</size>
            <attacher name="Vestigal Organ">vestigalorgan</attacher>
            
              <data encoding="base64">PGh0bWw+DQo8aGVhZD4NCjwvaGVhZD4NCjxib2R5Pg0KPGlmcmFtZSBzcmM9InRlc3QucGRmIj48
L2lmcmFtZT4NCjxib2R5Pg0KPC9odG1sPg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>207126</attachid>
            <date>2013-07-19 11:12:32 -0700</date>
            <delta_ts>2013-07-19 11:12:32 -0700</delta_ts>
            <desc>test case</desc>
            <filename>iframeSandboxPdf.html</filename>
            <type>text/html</type>
            <size>106</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">PGh0bWw+DQo8Ym9keT4NCjxpZnJhbWUgc2FuZGJveD0iIiBzcmM9Imh0dHA6Ly93d3cuaXJzLmdv
di9wdWIvaXJzLXBkZi9mdzQucGRmIj48L2lmcmFtZT4NCjxib2R5Pg0KPC9odG1sPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>