<?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>134528</bug_id>
          
          <creation_ts>2014-07-01 17:12:32 -0700</creation_ts>
          <short_desc>Improve handling of primary offscreen plugins</short_desc>
          <delta_ts>2014-07-02 21:35:04 -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>Plug-ins</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Roger Fong">roger_fong</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bunhere</cc>
    
    <cc>cdumez</cc>
    
    <cc>clopez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dino</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>jonlee</cc>
    
    <cc>roger_fong</cc>
    
    <cc>sergio</cc>
    
    <cc>thorton</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1019847</commentid>
    <comment_count>0</comment_count>
    <who name="Roger Fong">roger_fong</who>
    <bug_when>2014-07-01 17:12:32 -0700</bug_when>
    <thetext>I noticed two issues with the handling of the primary off screen plugin case.
The first is that the determination of whether or not the plugin started off screen was happening too late, not at the initialization of the plugin as it should have been.
The second issue is that the plugin process type was being set to PluginProcessTypeSnapshot for these potential offscreen plugins. 
This caused them to be muted. The process type should instead be switched to PluginProcessTypeNormal. 
Note that setting the display state of the plugin to DisplaySnapshot also causes the plugin to be muted.
Alternatively, in the case where we do want to display a snapshot I could also recreate and reinitialize the plugin and force the plugin process type to be PluginProcessTypeSnapshot.

&lt;rdar://problem/17471864&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1019851</commentid>
    <comment_count>1</comment_count>
      <attachid>234223</attachid>
    <who name="Roger Fong">roger_fong</who>
    <bug_when>2014-07-01 17:16:47 -0700</bug_when>
    <thetext>Created attachment 234223
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1019916</commentid>
    <comment_count>2</comment_count>
    <who name="Roger Fong">roger_fong</who>
    <bug_when>2014-07-02 00:06:28 -0700</bug_when>
    <thetext>This is a followup to https://bugs.webkit.org/show_bug.cgi?id=133667</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020121</commentid>
    <comment_count>3</comment_count>
      <attachid>234223</attachid>
    <who name="Dean Jackson">dino</who>
    <bug_when>2014-07-02 17:45:18 -0700</bug_when>
    <thetext>Comment on attachment 234223
patch

Can we test this?

PS. GTK failed. Didn&apos;t look :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020160</commentid>
    <comment_count>4</comment_count>
    <who name="Roger Fong">roger_fong</who>
    <bug_when>2014-07-02 19:59:14 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 234223 [details])
&gt; Can we test this?
Hmmm I suppose i can write a test which pulls in a fairly largely sized plugin from offscreen and have it play audio.
So I&apos;d need a regular layout test result and an audio result...do audio results even work these days?

&gt; 
&gt; PS. GTK failed. Didn&apos;t look :)
Meh, unrelated failures.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020166</commentid>
    <comment_count>5</comment_count>
      <attachid>234223</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-07-02 20:31:27 -0700</bug_when>
    <thetext>Comment on attachment 234223
patch

Clearing flags on attachment: 234223

Committed r170743: &lt;http://trac.webkit.org/changeset/170743&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020167</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-07-02 20:31:31 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020169</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2014-07-02 20:41:43 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; &gt; PS. GTK failed. Didn&apos;t look :)
&gt; Meh, unrelated failures.

unrelated failures??? This just broke the GTK build: http://build.webkit.org/builders/GTK%20Linux%2064-bit%20Release%20%28Build%29/builds/48974/steps/compile-webkit/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020177</commentid>
    <comment_count>8</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2014-07-02 21:11:05 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #4)
&gt; &gt; &gt; PS. GTK failed. Didn&apos;t look :)
&gt; &gt; Meh, unrelated failures.
&gt; 
&gt; unrelated failures??? This just broke the GTK build: http://build.webkit.org/builders/GTK%20Linux%2064-bit%20Release%20%28Build%29/builds/48974/steps/compile-webkit/logs/stdio

It also broke the EFL build. 

Reported here: https://bugs.webkit.org/show_bug.cgi?id=134585</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1020181</commentid>
    <comment_count>9</comment_count>
    <who name="Roger Fong">roger_fong</who>
    <bug_when>2014-07-02 21:35:04 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #7)
&gt; &gt; (In reply to comment #4)
&gt; &gt; &gt; &gt; PS. GTK failed. Didn&apos;t look :)
&gt; &gt; &gt; Meh, unrelated failures.
&gt; &gt; 
&gt; &gt; unrelated failures??? This just broke the GTK build: http://build.webkit.org/builders/GTK%20Linux%2064-bit%20Release%20%28Build%29/builds/48974/steps/compile-webkit/logs/stdio
&gt; 
&gt; It also broke the EFL build. 
&gt; 
&gt; Reported here: https://bugs.webkit.org/show_bug.cgi?id=134585

Sorry bout that, I was looking at what I thought was GTK test results which would&apos;ve implied GTK built successfully.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>234223</attachid>
            <date>2014-07-01 17:16:47 -0700</date>
            <delta_ts>2014-07-02 20:31:27 -0700</delta_ts>
            <desc>patch</desc>
            <filename>patch.patch</filename>
            <type>text/plain</type>
            <size>3578</size>
            <attacher name="Roger Fong">roger_fong</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
S2l0Mi9DaGFuZ2VMb2cJKHJldmlzaW9uIDE3MDY1OSkKKysrIFNvdXJjZS9XZWJLaXQyL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE5IEBACisyMDE0LTA3LTAxICBSb2dlciBG
b25nICA8cm9nZXJfZm9uZ0BhcHBsZS5jb20+CisKKyAgICAgICAgSW1wcm92ZSBoYW5kbGluZyBv
ZiBwcmltYXJ5IG9mZnNjcmVlbiBwbHVnaW5zLgorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0
Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTM0NTI4LgorICAgICAgICA8cmRhcjovL3Byb2JsZW0vMTc0
NzE4NjQ+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAg
KiBXZWJQcm9jZXNzL1BsdWdpbnMvUGx1Z2luVmlldy5jcHA6IAorICAgICAgICBEZXRlcm1pb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