<?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>185370</bug_id>
          
          <creation_ts>2018-05-06 21:48:22 -0700</creation_ts>
          <short_desc>WKPageSetMediaVolume() API couldn&apos;t be used to restore the volume</short_desc>
          <delta_ts>2018-05-11 03:32:29 -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>WebKit API</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Vivek Arumugam">vivek_arumugam</reporter>
          <assigned_to name="Xabier Rodríguez Calvar">calvaris</assigned_to>
          <cc>calvaris</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>jer.noble</cc>
    
    <cc>pvollan</cc>
    
    <cc>ramasamy_thalavaypillai</cc>
    
    <cc>rniwa</cc>
    
    <cc>vivek_arumugam</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1421212</commentid>
    <comment_count>0</comment_count>
      <attachid>339705</attachid>
    <who name="Vivek Arumugam">vivek_arumugam</who>
    <bug_when>2018-05-06 21:48:22 -0700</bug_when>
    <thetext>Created attachment 339705
.

The WKPageSetMediaVolume() API takes a floating point input ranging 0-1 which is used as a multiplier against all the media elements of a page thus acts as a master volume control. But however the current implementation doesn&apos;t maintain the actual volume set from the upper layers (i.e JS / Media Player App) so every time UI Process calls this API the internal volume gets only reduced thus preventing us to get the previous volume back. Result is this API can&apos;t be used to temporarily reduce and restore the volume on demand.

An example scenario is :
* Assume initial volume of HTMLMediaElement is 0.9 &amp; the multiplier (page::mediaVolume()) is 1 (Media player plays with full volume)

* Do WKPageSetMediaVolume(xyz, 0.5)
     * page::mediaVolume() = 0.5
     * HTMLMediaPlayer&apos;s m_volume is updated as (m_volume = 0.9 * page-&gt;mediaVolume = 0.5) = 0.45

* Do WKPageSetMediaVolume(xyz, 1)
     * page::mediaVolume() = 1
     * HTMLMediaPlayer&apos;s m_volume is updated as (m_volume = 0.45 * page-&gt;mediaVolume = 1) = 0.45 (volume is still 0.45)

And call WKPageSetMediaVolume(xyz, 0.5) again then the volume gets reduced even lower. I guess this is not the intended behavior. I was trying to fix this with the below patchset.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1421225</commentid>
    <comment_count>1</comment_count>
    <who name="EWS Watchlist">ews-watchlist</who>
    <bug_when>2018-05-07 01:15:13 -0700</bug_when>
    <thetext>Attachment 339705 did not pass style-queue:


ERROR: Source/WebCore/html/HTMLMediaElement.cpp:4819:  Missing space before ( in if(  [whitespace/parens] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1421226</commentid>
    <comment_count>2</comment_count>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2018-05-07 01:16:57 -0700</bug_when>
    <thetext>(In reply to Vivek Arumugam from comment #0)
&gt; The WKPageSetMediaVolume() API takes a floating point input ranging 0-1
&gt; which is used as a multiplier against all the media elements of a page thus
&gt; acts as a master volume control. But however the current implementation
&gt; doesn&apos;t maintain the actual volume set from the upper layers (i.e JS / Media
&gt; Player App) so every time UI Process calls this API the internal volume gets
&gt; only reduced thus preventing us to get the previous volume back. Result is
&gt; this API can&apos;t be used to temporarily reduce and restore the volume on
&gt; demand.

Yes, as we discussed in private, we&apos;d need Dimm and UnDimm API that goes from the WebKit API layer down to the HTMLMediaElement. In the HTMLMediaElement or the MediaPlayer we would keep the former volume and when Dimming and restore it without multiplying when UnDimming.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1421252</commentid>
    <comment_count>3</comment_count>
    <who name="Vivek Arumugam">vivek_arumugam</who>
    <bug_when>2018-05-07 04:25:13 -0700</bug_when>
    <thetext>Introducing another set of APIs to reduce and restore the volume might be redundant and requires few assumptions as below:

1) If we are to have an API to Dim the volume do we need to pass any value / should we assume that it should reduce the volume to 25% or someother value?

2) And if we are to pass some value, again, we can&apos;t be passing any absolute value from UI Process because at that moment the media players (from different documents) from the same page might have different volumes. This argument supports the use of factored/multiplier approach as WKPageSetMediaVolume().

If we are worried about breaking existing functionality of WKPageSetMediaVolume(), we should first confirm that the purpose of WKPageSetMediaVolume() is different than what I think it is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1421253</commentid>
    <comment_count>4</comment_count>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2018-05-07 04:51:38 -0700</bug_when>
    <thetext>(In reply to Vivek Arumugam from comment #3)
&gt; 1) If we are to have an API to Dim the volume do we need to pass any value /
&gt; should we assume that it should reduce the volume to 25% or someother value?

IMHO, it should take a value.

&gt; 2) And if we are to pass some value, again, we can&apos;t be passing any absolute
&gt; value from UI Process because at that moment the media players (from
&gt; different documents) from the same page might have different volumes. This
&gt; argument supports the use of factored/multiplier approach as
&gt; WKPageSetMediaVolume().

This value would reduce the volume as it is done for WKPageSetMediaVolume but it would be recoverable after with UnDimm.

&gt; If we are worried about breaking existing functionality of
&gt; WKPageSetMediaVolume(), we should first confirm that the purpose of
&gt; WKPageSetMediaVolume() is different than what I think it is.

We need to consider this, yes. If a set is made while the volume is dimmed, we need to deal with it somehow, either by failing or ignoring the set or by failing/ignoring the undimm.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1421261</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2018-05-07 06:38:46 -0700</bug_when>
    <thetext>(In reply to Xabier Rodríguez Calvar from comment #4)
&gt; (In reply to Vivek Arumugam from comment #3)
&gt; &gt; 2) And if we are to pass some value, again, we can&apos;t be passing any absolute
&gt; &gt; value from UI Process because at that moment the media players (from
&gt; &gt; different documents) from the same page might have different volumes. This
&gt; &gt; argument supports the use of factored/multiplier approach as
&gt; &gt; WKPageSetMediaVolume().
&gt; 
&gt; This value would reduce the volume as it is done for WKPageSetMediaVolume
&gt; but it would be recoverable after with UnDimm.
&gt; 
&gt; &gt; If we are worried about breaking existing functionality of
&gt; &gt; WKPageSetMediaVolume(), we should first confirm that the purpose of
&gt; &gt; WKPageSetMediaVolume() is different than what I think it is.
&gt; 
&gt; We need to consider this, yes. If a set is made while the volume is dimmed,
&gt; we need to deal with it somehow, either by failing or ignoring the set or by
&gt; failing/ignoring the undimm.

I would prefer to fix the existing API if possible instead of introducing a new one. The proposed change will not break any usage I am aware of.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1421262</commentid>
    <comment_count>6</comment_count>
      <attachid>339705</attachid>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2018-05-07 06:42:08 -0700</bug_when>
    <thetext>Comment on attachment 339705
.

View in context: https://bugs.webkit.org/attachment.cgi?id=339705&amp;action=review

&gt; Source/WebCore/html/HTMLMediaElement.h:969
&gt; +    double m_refVolume { 1 };

There is no need to abbreviate: m_referenceVolume.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1421265</commentid>
    <comment_count>7</comment_count>
      <attachid>339715</attachid>
    <who name="Vivek Arumugam">vivek_arumugam</who>
    <bug_when>2018-05-07 06:56:15 -0700</bug_when>
    <thetext>Created attachment 339715
.

Addressed comments, please review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1422187</commentid>
    <comment_count>8</comment_count>
      <attachid>339715</attachid>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2018-05-09 01:10:27 -0700</bug_when>
    <thetext>Comment on attachment 339715
.

View in context: https://bugs.webkit.org/attachment.cgi?id=339715&amp;action=review

We can&apos;t land this as it does not have ChangeLog.

&gt; Source/WebCore/html/HTMLMediaElement.cpp:4820
&gt; +            Page* page = document().page();
&gt; +            if (!page || page-&gt;mediaVolume() == 1)
&gt; +                m_referenceVolume = vol;

I see a big problem with this code. Let&apos;s think of this use case:

1. m_volume = 1; m_referenceVolume = 1; page-&gt;m_mediaVolume = 1;
2. setPageMediaVolume(0.5); -&gt; m_volume = 0.5; m_referenceVolume = 1; page-&gt;m_mediaVolume = 0.5;
3. Lower the stream volume to 0.25 -&gt; m_volume = 0.25; m_referenceVolume = 1; page-&gt;m_mediaVolume = 0.5;
4. setPageMediaVolume(1); -&gt; m_volume = 1; m_referenceVolume = 1; page-&gt;m_mediaVolume = 1;

Step 4 is a problem, because you lowered the volume to almost nothing and then the set page volume ramps it up to 1 when the user had lowered the volume to 0.25.

Eric, I think this behavior is wrong. We should consider, at least, m_referenceVolume to scale as if page volume were always 1 since we are already multiplying it with the volumeMultiplier when going back down to the player. If we go for this solution, we should, IMHO, instead of this code, do:
m_referenceVolume = m_volume;
if (page)
    m_referenceVolume /= page-&gt;mediaVolume();

And if we accept my premise, we could even consider m_referenceVolume to be redundant and consider that m_volume is always scaled with reference to the page being 1. If we consider this alternative, we might want to touch HTMLMediaElement::setReadyState and HTMLMediaElement::volume() to correct with the page volume or we would be getting lots of tests failing. We might just change HTMLMediaElement::volume() and have HTMLMediaElement::setReadyState using HTMLMediaElement::volume(). I would also add a couple of comments in m_volume and HTMLMediaElement::volume() regarding this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1422194</commentid>
    <comment_count>9</comment_count>
      <attachid>339945</attachid>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2018-05-09 01:24:22 -0700</bug_when>
    <thetext>Created attachment 339945
Patch

I think this is a better solution for the issue we have here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1422196</commentid>
    <comment_count>10</comment_count>
    <who name="Vivek Arumugam">vivek_arumugam</who>
    <bug_when>2018-05-09 01:31:35 -0700</bug_when>
    <thetext>(In reply to Xabier Rodríguez Calvar from comment #8)
&gt; Comment on attachment 339715 [details]
&gt; .
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=339715&amp;action=review
&gt; 
&gt; We can&apos;t land this as it does not have ChangeLog.
&gt; 
&gt; &gt; Source/WebCore/html/HTMLMediaElement.cpp:4820
&gt; &gt; +            Page* page = document().page();
&gt; &gt; +            if (!page || page-&gt;mediaVolume() == 1)
&gt; &gt; +                m_referenceVolume = vol;
&gt; 
&gt; I see a big problem with this code. Let&apos;s think of this use case:
&gt; 
&gt; 1. m_volume = 1; m_referenceVolume = 1; page-&gt;m_mediaVolume = 1;
&gt; 2. setPageMediaVolume(0.5); -&gt; m_volume = 0.5; m_referenceVolume = 1;
&gt; page-&gt;m_mediaVolume = 0.5;
&gt; 3. Lower the stream volume to 0.25 -&gt; m_volume = 0.25; m_referenceVolume =
&gt; 1; page-&gt;m_mediaVolume = 0.5;
&gt; 4. setPageMediaVolume(1); -&gt; m_volume = 1; m_referenceVolume = 1;
&gt; page-&gt;m_mediaVolume = 1;
&gt; 
&gt; Step 4 is a problem, because you lowered the volume to almost nothing and
&gt; then the set page volume ramps it up to 1 when the user had lowered the
&gt; volume to 0.25.
&gt; 
&gt; Eric, I think this behavior is wrong. We should consider, at least,
&gt; m_referenceVolume to scale as if page volume were always 1 since we are
&gt; already multiplying it with the volumeMultiplier when going back down to the
&gt; player. If we go for this solution, we should, IMHO, instead of this code,
&gt; do:
&gt; m_referenceVolume = m_volume;
&gt; if (page)
&gt;     m_referenceVolume /= page-&gt;mediaVolume();
&gt; 
&gt; And if we accept my premise, we could even consider m_referenceVolume to be
&gt; redundant and consider that m_volume is always scaled with reference to the
&gt; page being 1. If we consider this alternative, we might want to touch
&gt; HTMLMediaElement::setReadyState and HTMLMediaElement::volume() to correct
&gt; with the page volume or we would be getting lots of tests failing. We might
&gt; just change HTMLMediaElement::volume() and have
&gt; HTMLMediaElement::setReadyState using HTMLMediaElement::volume(). I would
&gt; also add a couple of comments in m_volume and HTMLMediaElement::volume()
&gt; regarding this.

Hi Calvaris, Thank you for the review. I would like to know what do you mean by step 3? Which code flow is that? If you mean HTMLMediaElement::setVolume() the m_referenceVolume too gets updated with m_volume. Please clarify.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1422199</commentid>
    <comment_count>11</comment_count>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2018-05-09 01:45:40 -0700</bug_when>
    <thetext>(In reply to Vivek Arumugam from comment #10)
&gt; Hi Calvaris, Thank you for the review. I would like to know what do you mean
&gt; by step 3? Which code flow is that? If you mean
&gt; HTMLMediaElement::setVolume() the m_referenceVolume too gets updated with
&gt; m_volume. Please clarify.

Volume can be updated through pulseaudio or other volume managers so we would still get callbacks for those changes which would end up in a situation like step 3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1422275</commentid>
    <comment_count>12</comment_count>
      <attachid>339945</attachid>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2018-05-09 08:58:33 -0700</bug_when>
    <thetext>Comment on attachment 339945
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=339945&amp;action=review

&gt; Source/WebCore/html/HTMLMediaElement.cpp:3634
&gt; +    Page* page = document().page();

Nit: auto* page = ...

&gt; Source/WebCore/html/HTMLMediaElement.cpp:3657
&gt; +    Page* page = document().page();
&gt; +    if (page)
&gt; +        m_volume /= page-&gt;mediaVolume();
&gt; +    if (m_mediaController)
&gt; +        m_volume /= m_mediaController-&gt;volume();
&gt; +#if ENABLE(MEDIA_SESSION)
&gt; +    if (m_shouldDuck)
&gt; +        m_volume /= 0.25;
&gt; +#endif

This is identical to the code in volume(), it should be shared.

&gt; Source/WebCore/html/HTMLMediaElement.cpp:3658
&gt; +    m_volume = CLAMP(m_volume, 0.0, 1.0);

You can use clampToFloat() from MathExtras.h

&gt; Source/WebCore/html/HTMLMediaElement.cpp:3675
&gt; +    setScaledVolume(newVolume);

setScaledVolume() will redo the same calculations just done in the call to volume() above. If setScaledVolume() returned a bool if the volume doesn&apos;t new volume is identical to the current volume, you could use it above and only do the calculations once.

&gt; Source/WebCore/html/HTMLMediaElement.cpp:4841
&gt; +        if (vol != volume()) {
&gt; +            setScaledVolume(vol);

Ditto.

&gt; Source/WebCore/html/HTMLMediaElement.cpp:5243
&gt; +    if (volume() != volume) {
&gt; +        setScaledVolume(volume);

Ditto.

&gt; Source/WebCore/html/HTMLMediaElement.cpp:5252
&gt; +            Page* page = document().page();

Nit: auto* page = ...

&gt; Source/WebCore/html/HTMLMediaElement.cpp:5257
&gt; +        m_player-&gt;setVolume(volume());

Why calculate the volume again, won&apos;t m_volume be correct after the call to setScaledVolume()?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1422276</commentid>
    <comment_count>13</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2018-05-09 09:00:03 -0700</bug_when>
    <thetext>(In reply to Xabier Rodríguez Calvar from comment #8)
&gt; Comment on attachment 339715 [details]
&gt; 
&gt; I see a big problem with this code. Let&apos;s think of this use case:
&gt; 
&gt; 1. m_volume = 1; m_referenceVolume = 1; page-&gt;m_mediaVolume = 1;
&gt; 2. setPageMediaVolume(0.5); -&gt; m_volume = 0.5; m_referenceVolume = 1;
&gt; page-&gt;m_mediaVolume = 0.5;
&gt; 3. Lower the stream volume to 0.25 -&gt; m_volume = 0.25; m_referenceVolume =
&gt; 1; page-&gt;m_mediaVolume = 0.5;
&gt; 4. setPageMediaVolume(1); -&gt; m_volume = 1; m_referenceVolume = 1;
&gt; page-&gt;m_mediaVolume = 1;
&gt; 
&gt; Step 4 is a problem, because you lowered the volume to almost nothing and
&gt; then the set page volume ramps it up to 1 when the user had lowered the
&gt; volume to 0.25.
&gt; 
&gt; Eric, I think this behavior is wrong. 

Good point, thanks for thinking this through!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1422685</commentid>
    <comment_count>14</comment_count>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2018-05-10 02:31:58 -0700</bug_when>
    <thetext>(In reply to Eric Carlson from comment #12)
&gt; &gt; Source/WebCore/html/HTMLMediaElement.cpp:3634
&gt; &gt; +    Page* page = document().page();
&gt; 
&gt; Nit: auto* page = ...

Roger.

&gt; &gt; Source/WebCore/html/HTMLMediaElement.cpp:3657
&gt; &gt; +    Page* page = document().page();
&gt; &gt; +    if (page)
&gt; &gt; +        m_volume /= page-&gt;mediaVolume();
&gt; &gt; +    if (m_mediaController)
&gt; &gt; +        m_volume /= m_mediaController-&gt;volume();
&gt; &gt; +#if ENABLE(MEDIA_SESSION)
&gt; &gt; +    if (m_shouldDuck)
&gt; &gt; +        m_volume /= 0.25;
&gt; &gt; +#endif
&gt; 
&gt; This is identical to the code in volume(), it should be shared.

No, one multiplies, the other divides.

&gt; &gt; Source/WebCore/html/HTMLMediaElement.cpp:3658
&gt; &gt; +    m_volume = CLAMP(m_volume, 0.0, 1.0);
&gt; 
&gt; You can use clampToFloat() from MathExtras.h

Roger.

&gt; &gt; Source/WebCore/html/HTMLMediaElement.cpp:3675
&gt; &gt; +    setScaledVolume(newVolume);
&gt; 
&gt; setScaledVolume() will redo the same calculations just done in the call to
&gt; volume() above. If setScaledVolume() returned a bool if the volume doesn&apos;t
&gt; new volume is identical to the current volume, you could use it above and
&gt; only do the calculations once.

I can work try to work this out.

&gt; &gt; Source/WebCore/html/HTMLMediaElement.cpp:5257
&gt; &gt; +        m_player-&gt;setVolume(volume());
&gt; 
&gt; Why calculate the volume again, won&apos;t m_volume be correct after the call to
&gt; setScaledVolume()?

No, the idea was that in the HTMLMediaElement, we kept the volume unscaled from the Page and then, when committing to the player, we could apply the scale.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1423104</commentid>
    <comment_count>15</comment_count>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2018-05-11 03:32:00 -0700</bug_when>
    <thetext>Eric:

Vivek and I had private conversations about the results of this patch and the truth is that it does not work either.

Let&apos;s see:

| Operation                 | Page | Element  | Player |
|--------------------------:|-----:|---------:|-------:|
| Init                      | 1    | 1        | 1      |
| Element::setVolume(0.7)   | 1    | 0.7      | 0.7    |
| Page::setMediaVolume(0.1) | 0.1  | 0.7      | 0.07   |
| Element::setVolume(0.25)  | 0.1  | 2.5 -&gt; 1 | 1      |

What I tried to do with the patch was trying to decouple the player volume and the element volume so that we could recover the player volume when resetting the page volume.

The problem is that HTMLMediaElement::setVolume should respect the volume of the player (and so should setting it through any other API, like pulseaudio), which didn&apos;t happen with my patch leading to situations like the one here.

If we consider the page multiplier as it was, we always go down when we change it and we can&apos;t recover from that. If we try to keep the different scales, we can get out of them and screw up. We could consider the multiplier the first time, keep the same scale between player and element but again we wouldn&apos;t be able to recover and the page scale would be out of sync.

My opinion on what we should do to fix the current mess is consider the Page::setMediaVolume a one time only thing. The page decides to scale the volume? Fine, we do it and forget. That volume change would be translated to element and player but if JS, the element controls or external entities (of course I talk about non-IOS devices) decide to ramp up the volume, they could.

Always respecting the page volume would mean that we&apos;d have to reduce the scale in our volume controls, meaning that if page volume is set to 50%, volume would have to move between 0..50% and we&apos;d have to find a way to deal with volumes higher than that set by JS or set by external volume controls. JS could be easier, we clamp to page volume and we can be happy, but external controls would be another issue because we can&apos;t set the scale there, you would drag that volume bar and see it coming down to the page volume, which would be weird.

Then we still have the problem of Dimming and UnDimming the volume and the only solution I can think of to do this properly would be a Dimm and UnDimm API. Dimm would keep the page volume in the element and UnDimm would undo the dimming if the volume has not been touched by hand in any other control.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>339705</attachid>
            <date>2018-05-06 21:48:22 -0700</date>
            <delta_ts>2018-05-08 00:17:17 -0700</delta_ts>
            <desc>.</desc>
            <filename>webkit_master_volume_control.diff</filename>
            <type>text/plain</type>
            <size>2017</size>
            <attacher name="Vivek Arumugam">vivek_arumugam</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL2h0bWwvSFRNTE1lZGlhRWxlbWVudC5jcHAgYi9T
b3VyY2UvV2ViQ29yZS9odG1sL0hUTUxNZWRpYUVsZW1lbnQuY3BwCmluZGV4IDk2Y2Y4YjliMTRh
Li5mNmQxMGRjMGM4MSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvaHRtbC9IVE1MTWVkaWFF
bGVtZW50LmNwcAorKysgYi9Tb3VyY2UvV2ViQ29yZS9odG1sL0hUTUxNZWRpYUVsZW1lbnQuY3Bw
CkBAIC0zNjQ4LDYgKzM2NDgsNyBAQCBFeGNlcHRpb25Pcjx2b2lkPiBIVE1MTWVkaWFFbGVtZW50
OjpzZXRWb2x1bWUoZG91YmxlIHZvbHVtZSkKICAgICAgICAgcmVtb3ZlQmVoYXZpb3JzUmVzdHJp
Y3Rpb25zQWZ0ZXJGaXJzdFVzZXJHZXN0dXJlKE1lZGlhRWxlbWVudFNlc3Npb246OkFsbFJlc3Ry
aWN0aW9ucyAmIH5NZWRpYUVsZW1lbnRTZXNzaW9uOjpSZXF1aXJlVXNlckdlc3R1cmVUb0NvbnRy
b2xDb250cm9sc01hbmFnZXIpOwogCiAgICAgbV92b2x1bWUgPSB2b2x1bWU7CisgICAgbV9yZWZW
b2x1bWUgPSBtX3ZvbHVtZTsKICAgICBtX3ZvbHVtZUluaXRpYWxpemVkID0gdHJ1ZTsKICAgICB1
cGRhdGVWb2x1bWUoKTsKICAgICBzY2hlZHVsZUV2ZW50KGV2ZW50TmFtZXMoKS52b2x1bWVjaGFu
Z2VFdmVudCk7CkBAIC00ODE0LDYgKzQ4MTUsOSBAQCB2b2lkIEhUTUxNZWRpYUVsZW1lbnQ6Om1l
ZGlhUGxheWVyVm9sdW1l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b2x1bWUgKiB2b2x1bWVNdWx0
aXBsaWVyKTsKICAgICB9CiAKICNpZiBFTkFCTEUoTUVESUFfU0VTU0lPTikKZGlmZiAtLWdpdCBh
L1NvdXJjZS9XZWJDb3JlL2h0bWwvSFRNTE1lZGlhRWxlbWVudC5oIGIvU291cmNlL1dlYkNvcmUv
aHRtbC9IVE1MTWVkaWFFbGVtZW50LmgKaW5kZXggYmE5ZjU5YTc3YzIuLjU1ZjFhZmEyN2I1IDEw
MDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29yZS9odG1sL0hUTUxNZWRpYUVsZW1lbnQuaAorKysgYi9T
b3VyY2UvV2ViQ29yZS9odG1sL0hUTUxNZWRpYUVsZW1lbnQuaApAQCAtOTY2LDYgKzk2Niw3IEBA
IHByaXZhdGU6CiAgICAgU2Vla1R5cGUgbV9wZW5kaW5nU2Vla1R5cGUgeyBOb1NlZWsgfTsKIAog
ICAgIGRvdWJsZSBtX3ZvbHVtZSB7IDEgfTsKKyAgICBkb3VibGUgbV9yZWZWb2x1bWUgeyAxIH07
CiAgICAgYm9vbCBtX3ZvbHVtZUluaXRpYWxpemVkIHsgZmFsc2UgfTsKICAgICBNZWRpYVRpbWUg
bV9sYXN0U2Vla1RpbWU7CiAgICAgCg==
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>339715</attachid>
            <date>2018-05-07 06:56:15 -0700</date>
            <delta_ts>2018-05-09 01:24:02 -0700</delta_ts>
            <desc>.</desc>
            <filename>webkit_master_volume_control-02.diff</filename>
            <type>text/plain</type>
            <size>2048</size>
            <attacher name="Vivek Arumugam">vivek_arumugam</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL2h0bWwvSFRNTE1lZGlhRWxlbWVudC5jcHAgYi9T
b3VyY2UvV2ViQ29yZS9odG1sL0hUTUxNZWRpYUVsZW1lbnQuY3BwCmluZGV4IDk2Y2Y4YjliMTRh
Li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1OWE3N2MyLi41ZDA5ZTZmOTRmZiAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvaHRtbC9I
VE1MTWVkaWFFbGVtZW50LmgKKysrIGIvU291cmNlL1dlYkNvcmUvaHRtbC9IVE1MTWVkaWFFbGVt
ZW50LmgKQEAgLTk2Niw2ICs5NjYsNyBAQCBwcml2YXRlOgogICAgIFNlZWtUeXBlIG1fcGVuZGlu
Z1NlZWtUeXBlIHsgTm9TZWVrIH07CiAKICAgICBkb3VibGUgbV92b2x1bWUgeyAxIH07CisgICAg
ZG91YmxlIG1fcmVmZXJlbmNlVm9sdW1lIHsgMSB9OwogICAgIGJvb2wgbV92b2x1bWVJbml0aWFs
aXplZCB7IGZhbHNlIH07CiAgICAgTWVkaWFUaW1lIG1fbGFzdFNlZWtUaW1lOwogICAgIAo=
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>339945</attachid>
            <date>2018-05-09 01:24:22 -0700</date>
            <delta_ts>2018-05-11 03:32:29 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-185370-20180509102421.patch</filename>
            <type>text/plain</type>
            <size>6456</size>
            <attacher name="Xabier Rodríguez Calvar">calvaris</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjMxNDgyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggOTk3OGY5NjhhMDlhNmU5
NWYxMmJmYzgxMWM0NzExZjdkNTk1MWQ1Ny4uNGU5MTc1ZTk1N2RhZjBkZDgxZTg2ZTNiYjkzYTNk
NjJhMWE3MDE3YiAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDI5IEBACisyMDE4LTA1L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