<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[175384] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/175384">175384</a></dd>
<dt>Author</dt> <dd>adachan@apple.com</dd>
<dt>Date</dt> <dd>2014-10-30 15:06:12 -0700 (Thu, 30 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>The Page's muted setting should not affect the HTMLMediaElement's 'muted' IDL attribute.
https://bugs.webkit.org/show_bug.cgi?id=138215

Reviewed by Eric Carlson.

Source/WebCore:

Add m_muted in Page to keep track of the Page's muted state. Change AudioProducer::setMuted()
to pageMutedStateDidChange(). When that method is called, the AudioProducer is supposed to
update its muted state again taking the Page's muted state into account.

Add HTMLMediaElement::effectiveMuted(), which returns the effective muted state of the
HTMLMediaElement, taking the Page's muted state into account.

Test: media/video-muted-after-setting-page-muted-state.html

* dom/Document.cpp:
(WebCore::Document::pageMutedStateDidChange):
(WebCore::Document::setMuted): Deleted.
* dom/Document.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):
Set the MediaPlayer's muted state to the result of effectiveMuted() rather than m_muted.
(WebCore::HTMLMediaElement::updateVolume):
Ditto, and also make sure the MediaController's muted state does not override the Page's
muted state.
(WebCore::HTMLMediaElement::updatePlayState):
Set the MediaPlayer's muted state to the result of effectiveMuted() rather than muted().
(WebCore::HTMLMediaElement::pageMutedStateDidChange):
Call updateVolume(), which will update the MediaPlayer's muted state.
(WebCore::HTMLMediaElement::effectiveMuted):
Figure out the muted value taking Page's muted state into account.
* html/HTMLMediaElement.h:
* page/AudioProducer.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setMuted):
Update m_muted, and only iterate through the frames' documents to call pageMutedStateDidChange()
if m_muted changes.
* page/Page.h:
(WebCore::Page::isMuted):
* testing/Internals.cpp:
(WebCore::Internals::setPageMuted):
Expose a way to set the Page's muted state in Internals for testing.
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* media/video-muted-after-setting-page-muted-state-expected.txt: Added.
* media/video-muted-after-setting-page-muted-state.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementh">trunk/Source/WebCore/html/HTMLMediaElement.h</a></li>
<li><a href="#trunkSourceWebCorepageAudioProducerh">trunk/Source/WebCore/page/AudioProducer.h</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageh">trunk/Source/WebCore/page/Page.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsidl">trunk/Source/WebCore/testing/Internals.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsmediavideomutedaftersettingpagemutedstateexpectedtxt">trunk/LayoutTests/media/video-muted-after-setting-page-muted-state-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediavideomutedaftersettingpagemutedstatehtml">trunk/LayoutTests/media/video-muted-after-setting-page-muted-state.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (175383 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-10-30 21:39:27 UTC (rev 175383)
+++ trunk/LayoutTests/ChangeLog        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-10-30  Ada Chan  &lt;adachan@apple.com&gt;
+
+        The Page's muted setting should not affect the HTMLMediaElement's 'muted' IDL attribute.
+        https://bugs.webkit.org/show_bug.cgi?id=138215
+
+        Reviewed by Eric Carlson.
+
+        * media/video-muted-after-setting-page-muted-state-expected.txt: Added.
+        * media/video-muted-after-setting-page-muted-state.html: Added.
+
</ins><span class="cx"> 2014-10-30  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         IndexedDB is deleting data when a PK is shared amongst two objectStores
</span></span></pre></div>
<a id="trunkLayoutTestsmediavideomutedaftersettingpagemutedstateexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/video-muted-after-setting-page-muted-state-expected.txt (0 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-muted-after-setting-page-muted-state-expected.txt                                (rev 0)
+++ trunk/LayoutTests/media/video-muted-after-setting-page-muted-state-expected.txt        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+
+Test 'muted' IDL attribute after setting the Page's muted state. The Page's muted state should not affect the 'muted' IDL attribute.
+
+EXPECTED (video.muted == 'false') OK
+EXPECTED (video.muted == 'false') OK
+RUN(video.muted = true)
+EXPECTED (video.muted == 'true') OK
+EXPECTED (video.muted == 'true') OK
+END OF TEST
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmediavideomutedaftersettingpagemutedstatehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/video-muted-after-setting-page-muted-state.html (0 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-muted-after-setting-page-muted-state.html                                (rev 0)
+++ trunk/LayoutTests/media/video-muted-after-setting-page-muted-state.html        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+&lt;video controls&gt;&lt;/video&gt;
+&lt;p&gt;Test 'muted' IDL attribute after setting the Page's muted state. The Page's muted state should not affect the 'muted' IDL attribute.&lt;p&gt;
+&lt;script src=media-file.js&gt;&lt;/script&gt;
+&lt;script src=video-test.js&gt;&lt;/script&gt;
+&lt;script&gt;
+    testExpected(&quot;video.muted&quot;, false);
+    if (window.internals)
+        internals.setPageMuted(true);
+    testExpected(&quot;video.muted&quot;, false);
+
+    run(&quot;video.muted = true&quot;);
+    testExpected(&quot;video.muted&quot;, true);
+    if (window.internals)
+        internals.setPageMuted(false);
+    testExpected(&quot;video.muted&quot;, true);
+    endTest();
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (175383 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-30 21:39:27 UTC (rev 175383)
+++ trunk/Source/WebCore/ChangeLog        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -1,3 +1,50 @@
</span><ins>+2014-10-30  Ada Chan  &lt;adachan@apple.com&gt;
+
+        The Page's muted setting should not affect the HTMLMediaElement's 'muted' IDL attribute.
+        https://bugs.webkit.org/show_bug.cgi?id=138215
+
+        Reviewed by Eric Carlson.
+
+        Add m_muted in Page to keep track of the Page's muted state. Change AudioProducer::setMuted()
+        to pageMutedStateDidChange(). When that method is called, the AudioProducer is supposed to
+        update its muted state again taking the Page's muted state into account.
+
+        Add HTMLMediaElement::effectiveMuted(), which returns the effective muted state of the
+        HTMLMediaElement, taking the Page's muted state into account.
+
+        Test: media/video-muted-after-setting-page-muted-state.html
+
+        * dom/Document.cpp:
+        (WebCore::Document::pageMutedStateDidChange):
+        (WebCore::Document::setMuted): Deleted.
+        * dom/Document.h:
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::setMuted):
+        Set the MediaPlayer's muted state to the result of effectiveMuted() rather than m_muted.
+        (WebCore::HTMLMediaElement::updateVolume):
+        Ditto, and also make sure the MediaController's muted state does not override the Page's
+        muted state.
+        (WebCore::HTMLMediaElement::updatePlayState):
+        Set the MediaPlayer's muted state to the result of effectiveMuted() rather than muted().
+        (WebCore::HTMLMediaElement::pageMutedStateDidChange):
+        Call updateVolume(), which will update the MediaPlayer's muted state.
+        (WebCore::HTMLMediaElement::effectiveMuted):
+        Figure out the muted value taking Page's muted state into account.
+        * html/HTMLMediaElement.h:
+        * page/AudioProducer.h:
+        * page/Page.cpp:
+        (WebCore::Page::Page):
+        (WebCore::Page::setMuted):
+        Update m_muted, and only iterate through the frames' documents to call pageMutedStateDidChange()
+        if m_muted changes.
+        * page/Page.h:
+        (WebCore::Page::isMuted):
+        * testing/Internals.cpp:
+        (WebCore::Internals::setPageMuted):
+        Expose a way to set the Page's muted state in Internals for testing.
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
</ins><span class="cx"> 2014-10-30  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Use references in calculateMinimumPageHeight() for non-optional arguments
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (175383 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2014-10-30 21:39:27 UTC (rev 175383)
+++ trunk/Source/WebCore/dom/Document.cpp        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -3304,10 +3304,10 @@
</span><span class="cx">         page()-&gt;updateIsPlayingAudio();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Document::setMuted(bool muted)
</del><ins>+void Document::pageMutedStateDidChange()
</ins><span class="cx"> {
</span><span class="cx">     for (auto audioProducer : m_audioProducers)
</span><del>-        audioProducer-&gt;setMuted(muted);
</del><ins>+        audioProducer-&gt;pageMutedStateDidChange();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Document::styleResolverChanged(StyleResolverUpdateFlag updateFlag)
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (175383 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2014-10-30 21:39:27 UTC (rev 175383)
+++ trunk/Source/WebCore/dom/Document.h        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -1292,7 +1292,7 @@
</span><span class="cx">     void removeAudioProducer(AudioProducer*);
</span><span class="cx">     bool isPlayingAudio() const { return m_isPlayingAudio; }
</span><span class="cx">     void updateIsPlayingAudio();
</span><del>-    void setMuted(bool);
</del><ins>+    void pageMutedStateDidChange();
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     enum ConstructionFlags { Synthesized = 1, NonRenderedPlaceholder = 1 &lt;&lt; 1 };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (175383 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2014-10-30 21:39:27 UTC (rev 175383)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -3001,7 +3001,7 @@
</span><span class="cx">         // Avoid recursion when the player reports volume changes.
</span><span class="cx">         if (!processingMediaPlayerCallback()) {
</span><span class="cx">             if (m_player) {
</span><del>-                m_player-&gt;setMuted(m_muted);
</del><ins>+                m_player-&gt;setMuted(effectiveMuted());
</ins><span class="cx">                 if (hasMediaControls())
</span><span class="cx">                     mediaControls()-&gt;changedMute();
</span><span class="cx">             }
</span><span class="lines">@@ -4470,11 +4470,11 @@
</span><span class="cx">     if (!processingMediaPlayerCallback()) {
</span><span class="cx">         Page* page = document().page();
</span><span class="cx">         double volumeMultiplier = page ? page-&gt;mediaVolume() : 1;
</span><del>-        bool shouldMute = muted();
</del><ins>+        bool shouldMute = effectiveMuted();
</ins><span class="cx"> 
</span><span class="cx">         if (m_mediaController) {
</span><span class="cx">             volumeMultiplier *= m_mediaController-&gt;volume();
</span><del>-            shouldMute = m_mediaController-&gt;muted();
</del><ins>+            shouldMute = m_mediaController-&gt;muted() || (page &amp;&amp; page-&gt;isMuted());
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         m_player-&gt;setMuted(shouldMute);
</span><span class="lines">@@ -4520,7 +4520,7 @@
</span><span class="cx">             // Set rate, muted before calling play in case they were set before the media engine was setup.
</span><span class="cx">             // The media engine should just stash the rate and muted values since it isn't already playing.
</span><span class="cx">             m_player-&gt;setRate(effectivePlaybackRate());
</span><del>-            m_player-&gt;setMuted(muted());
</del><ins>+            m_player-&gt;setMuted(effectiveMuted());
</ins><span class="cx"> 
</span><span class="cx">             m_player-&gt;play();
</span><span class="cx">         }
</span><span class="lines">@@ -6032,6 +6032,16 @@
</span><span class="cx">     return isPlaying() &amp;&amp; hasAudio();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void HTMLMediaElement::pageMutedStateDidChange()
+{
+    updateVolume();
+}
+
+bool HTMLMediaElement::effectiveMuted() const
+{
+    return muted() || (document().page() &amp;&amp; document().page()-&gt;isMuted());
+}
+
</ins><span class="cx"> bool HTMLMediaElement::doesHaveAttribute(const AtomicString&amp; attribute, AtomicString* value) const
</span><span class="cx"> {
</span><span class="cx">     QualifiedName attributeName(nullAtom, attribute, nullAtom);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (175383 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.h        2014-10-30 21:39:27 UTC (rev 175383)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -712,7 +712,10 @@
</span><span class="cx"> 
</span><span class="cx">     // AudioProducer overrides
</span><span class="cx">     virtual bool isPlayingAudio() override;
</span><ins>+    virtual void pageMutedStateDidChange() override;
</ins><span class="cx"> 
</span><ins>+    bool effectiveMuted() const;
+
</ins><span class="cx">     void registerWithDocument(Document&amp;);
</span><span class="cx">     void unregisterWithDocument(Document&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageAudioProducerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/AudioProducer.h (175383 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/AudioProducer.h        2014-10-30 21:39:27 UTC (rev 175383)
+++ trunk/Source/WebCore/page/AudioProducer.h        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> class AudioProducer {
</span><span class="cx"> public:
</span><span class="cx">     virtual bool isPlayingAudio() = 0;
</span><del>-    virtual void setMuted(bool) = 0;
</del><ins>+    virtual void pageMutedStateDidChange() = 0;
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     virtual ~AudioProducer() { }
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (175383 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2014-10-30 21:39:27 UTC (rev 175383)
+++ trunk/Source/WebCore/page/Page.cpp        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -160,6 +160,7 @@
</span><span class="cx">     , m_inLowQualityInterpolationMode(false)
</span><span class="cx">     , m_areMemoryCacheClientCallsEnabled(true)
</span><span class="cx">     , m_mediaVolume(1)
</span><ins>+    , m_muted(false)
</ins><span class="cx">     , m_pageScaleFactor(1)
</span><span class="cx">     , m_zoomedOutPageScaleFactor(0)
</span><span class="cx">     , m_deviceScaleFactor(1)
</span><span class="lines">@@ -1215,8 +1216,13 @@
</span><span class="cx"> 
</span><span class="cx"> void Page::setMuted(bool muted)
</span><span class="cx"> {
</span><ins>+    if (m_muted == muted)
+        return;
+
+    m_muted = muted;
+
</ins><span class="cx">     for (Frame* frame = &amp;mainFrame(); frame; frame = frame-&gt;tree().traverseNext())
</span><del>-        frame-&gt;document()-&gt;setMuted(muted);
</del><ins>+        frame-&gt;document()-&gt;pageMutedStateDidChange();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if !ASSERT_DISABLED
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (175383 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.h        2014-10-30 21:39:27 UTC (rev 175383)
+++ trunk/Source/WebCore/page/Page.h        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -438,6 +438,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool isPlayingAudio() const { return m_isPlayingAudio; }
</span><span class="cx">     void updateIsPlayingAudio();
</span><ins>+    bool isMuted() const { return m_muted; }
</ins><span class="cx">     WEBCORE_EXPORT void setMuted(bool);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -517,6 +518,7 @@
</span><span class="cx">     bool m_inLowQualityInterpolationMode;
</span><span class="cx">     bool m_areMemoryCacheClientCallsEnabled;
</span><span class="cx">     float m_mediaVolume;
</span><ins>+    bool m_muted;
</ins><span class="cx"> 
</span><span class="cx">     float m_pageScaleFactor;
</span><span class="cx">     float m_zoomedOutPageScaleFactor;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (175383 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2014-10-30 21:39:27 UTC (rev 175383)
+++ trunk/Source/WebCore/testing/Internals.cpp        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -2402,4 +2402,14 @@
</span><span class="cx">     return MockPageOverlayClient::shared().layerTreeAsText(document-&gt;frame()-&gt;mainFrame());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Internals::setPageMuted(bool muted)
+{
+    Document* document = contextDocument();
+    if (!document)
+        return;
+
+    if (Page* page = document-&gt;page())
+        page-&gt;setMuted(muted);
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (175383 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2014-10-30 21:39:27 UTC (rev 175383)
+++ trunk/Source/WebCore/testing/Internals.h        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -346,6 +346,8 @@
</span><span class="cx">     void installMockPageOverlay(const String&amp; overlayType, ExceptionCode&amp;);
</span><span class="cx">     String pageOverlayLayerTreeAsText(ExceptionCode&amp;) const;
</span><span class="cx"> 
</span><ins>+    void setPageMuted(bool);
+
</ins><span class="cx"> private:
</span><span class="cx">     explicit Internals(Document*);
</span><span class="cx">     Document* contextDocument() const;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (175383 => 175384)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2014-10-30 21:39:27 UTC (rev 175383)
+++ trunk/Source/WebCore/testing/Internals.idl        2014-10-30 22:06:12 UTC (rev 175384)
</span><span class="lines">@@ -301,4 +301,6 @@
</span><span class="cx"> 
</span><span class="cx">     [RaisesException] void installMockPageOverlay(PageOverlayType type);
</span><span class="cx">     [RaisesException] DOMString pageOverlayLayerTreeAsText();
</span><ins>+
+    void setPageMuted(boolean muted);
</ins><span class="cx"> };
</span></span></pre>
</div>
</div>

</body>
</html>