<!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>[185077] trunk/Source/WebCore</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/185077">185077</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-06-01 15:26:20 -0700 (Mon, 01 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Implemented the `eventTargetInterface` and `scriptExecutionContext` methods required by EventTarget, as well as
some required infrastructure.
https://bugs.webkit.org/show_bug.cgi?id=145523

Patch by Matt Rajca &lt;mrajca@apple.com&gt; on 2015-06-01
Reviewed by Eric Carlson.

* Modules/mediasession/MediaRemoteControls.cpp:
(WebCore::MediaRemoteControls::MediaRemoteControls): Initialize all instance variables.
* Modules/mediasession/MediaRemoteControls.h: MediaRemoteControl's constructor now takes a script execution
  context, which we provide to EventTarget. The required eventTargetInterface method has also been implemented.
(WebCore::MediaRemoteControls::create):
* Modules/mediasession/MediaRemoteControls.idl: Indicate MediaRemoteControls now takes a constructor that is
  passed in a script execution context. To prevent build errors, event handlers have been removed until they are
  implemented.
* WebCore.xcodeproj/project.pbxproj: We should be building the derived JSMediaRemoteControls class with WebCore.
* dom/EventTargetFactory.in: Ensure a MediaRemoteControlsEventTargetInterfaceType is generated.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasessionMediaRemoteControlscpp">trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasessionMediaRemoteControlsh">trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasessionMediaRemoteControlsidl">trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.idl</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoredomEventTargetFactoryin">trunk/Source/WebCore/dom/EventTargetFactory.in</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (185076 => 185077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-06-01 22:00:33 UTC (rev 185076)
+++ trunk/Source/WebCore/ChangeLog        2015-06-01 22:26:20 UTC (rev 185077)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2015-06-01  Matt Rajca  &lt;mrajca@apple.com&gt;
+
+        Implemented the `eventTargetInterface` and `scriptExecutionContext` methods required by EventTarget, as well as
+        some required infrastructure.
+        https://bugs.webkit.org/show_bug.cgi?id=145523
+
+        Reviewed by Eric Carlson.
+
+        * Modules/mediasession/MediaRemoteControls.cpp:
+        (WebCore::MediaRemoteControls::MediaRemoteControls): Initialize all instance variables.
+        * Modules/mediasession/MediaRemoteControls.h: MediaRemoteControl's constructor now takes a script execution
+          context, which we provide to EventTarget. The required eventTargetInterface method has also been implemented.
+        (WebCore::MediaRemoteControls::create):
+        * Modules/mediasession/MediaRemoteControls.idl: Indicate MediaRemoteControls now takes a constructor that is
+          passed in a script execution context. To prevent build errors, event handlers have been removed until they are
+          implemented.
+        * WebCore.xcodeproj/project.pbxproj: We should be building the derived JSMediaRemoteControls class with WebCore.
+        * dom/EventTargetFactory.in: Ensure a MediaRemoteControlsEventTargetInterfaceType is generated.
+
</ins><span class="cx"> 2015-06-01  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS JIT] Fail to compile when we are out of executable memory
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasessionMediaRemoteControlscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.cpp (185076 => 185077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.cpp        2015-06-01 22:00:33 UTC (rev 185076)
+++ trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.cpp        2015-06-01 22:26:20 UTC (rev 185077)
</span><span class="lines">@@ -30,6 +30,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+MediaRemoteControls::MediaRemoteControls(ScriptExecutionContext&amp; context)
+    : m_scriptExecutionContext(context)
+{
+}
+
</ins><span class="cx"> MediaRemoteControls::~MediaRemoteControls()
</span><span class="cx"> {
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasessionMediaRemoteControlsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.h (185076 => 185077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.h        2015-06-01 22:00:33 UTC (rev 185076)
+++ trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.h        2015-06-01 22:26:20 UTC (rev 185077)
</span><span class="lines">@@ -35,6 +35,11 @@
</span><span class="cx"> 
</span><span class="cx"> class MediaRemoteControls : public RefCounted&lt;MediaRemoteControls&gt;, public EventTargetWithInlineData {
</span><span class="cx"> public:
</span><ins>+    static Ref&lt;MediaRemoteControls&gt; create(ScriptExecutionContext&amp; context)
+    {
+        return adoptRef(*new MediaRemoteControls(context));
+    }
+
</ins><span class="cx">     bool previousTrackEnabled() const { return m_previousTrackEnabled; }
</span><span class="cx">     void setPreviousTrackEnabled(bool enabled) { m_previousTrackEnabled = enabled; }
</span><span class="cx"> 
</span><span class="lines">@@ -52,15 +57,19 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~MediaRemoteControls();
</span><span class="cx"> 
</span><del>-protected:
-    MediaRemoteControls() = default;
</del><ins>+    MediaRemoteControls(ScriptExecutionContext&amp;);
</ins><span class="cx"> 
</span><ins>+    virtual EventTargetInterface eventTargetInterface() const override { return MediaRemoteControlsEventTargetInterfaceType; }
+    virtual ScriptExecutionContext* scriptExecutionContext() const override { return &amp;m_scriptExecutionContext; }
+
</ins><span class="cx"> private:
</span><del>-    bool m_previousTrackEnabled;
-    bool m_nextTrackEnabled;
-    bool m_seekForwardEnabled;
-    bool m_seekBackwardEnabled;
</del><ins>+    ScriptExecutionContext&amp; m_scriptExecutionContext;
</ins><span class="cx"> 
</span><ins>+    bool m_previousTrackEnabled { false };
+    bool m_nextTrackEnabled { false };
+    bool m_seekForwardEnabled { false };
+    bool m_seekBackwardEnabled { false };
+
</ins><span class="cx">     virtual void refEventTarget() override final { ref(); }
</span><span class="cx">     virtual void derefEventTarget() override final { deref(); }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasessionMediaRemoteControlsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.idl (185076 => 185077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.idl        2015-06-01 22:00:33 UTC (rev 185076)
+++ trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.idl        2015-06-01 22:26:20 UTC (rev 185077)
</span><span class="lines">@@ -25,15 +25,12 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Conditional=MEDIA_SESSION,
</span><ins>+    Constructor,
+    ConstructorCallWith=ScriptExecutionContext,
</ins><span class="cx">     EventTarget,
</span><span class="cx"> ] interface MediaRemoteControls : EventTarget {
</span><span class="cx">     attribute boolean previousTrackEnabled;
</span><span class="cx">     attribute boolean nextTrackEnabled;
</span><span class="cx">     attribute boolean seekForwardEnabled;
</span><span class="cx">     attribute boolean seekBackwardEnabled;
</span><del>-
-    attribute EventHandler onprevioustrack;
-    attribute EventHandler onnexttrack;
-    attribute EventHandler onseekforward;
-    attribute EventHandler onseekbackward;
</del><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (185076 => 185077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-06-01 22:00:33 UTC (rev 185076)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-06-01 22:26:20 UTC (rev 185077)
</span><span class="lines">@@ -5684,6 +5684,7 @@
</span><span class="cx">                 C6F0917F143A2BB900685849 /* JSMutationObserverCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F0917E143A2BB900685849 /* JSMutationObserverCustom.cpp */; };
</span><span class="cx">                 C6F420A216B7164E0052A9F2 /* JSMutationCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F420A016B7164E0052A9F2 /* JSMutationCallback.cpp */; };
</span><span class="cx">                 C6F420A316B7164E0052A9F2 /* JSMutationCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F420A116B7164E0052A9F2 /* JSMutationCallback.h */; };
</span><ins>+                C9026B651B1CF5FE001D99A7 /* JSMediaRemoteControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C9026B631B1CF5AB001D99A7 /* JSMediaRemoteControls.cpp */; };
</ins><span class="cx">                 C90843CF1B18E47D00B68564 /* MediaRemoteControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C90843CD1B18E47D00B68564 /* MediaRemoteControls.cpp */; };
</span><span class="cx">                 C90843D01B18E47D00B68564 /* MediaRemoteControls.h in Headers */ = {isa = PBXBuildFile; fileRef = C90843CE1B18E47D00B68564 /* MediaRemoteControls.h */; };
</span><span class="cx">                 CA3BF67C10D99BAE00E6CE53 /* ScrollAnimator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA3BF67B10D99BAE00E6CE53 /* ScrollAnimator.cpp */; };
</span><span class="lines">@@ -13237,6 +13238,8 @@
</span><span class="cx">                 C6F0917E143A2BB900685849 /* JSMutationObserverCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationObserverCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C6F420A016B7164E0052A9F2 /* JSMutationCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationCallback.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C6F420A116B7164E0052A9F2 /* JSMutationCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMutationCallback.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                C9026B631B1CF5AB001D99A7 /* JSMediaRemoteControls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSMediaRemoteControls.cpp; path = &quot;JSMediaRemoteControls.cpp&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
+                C9026B641B1CF5AB001D99A7 /* JSMediaRemoteControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSMediaRemoteControls.h; path = &quot;JSMediaRemoteControls.h&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 C90843CD1B18E47D00B68564 /* MediaRemoteControls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaRemoteControls.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C90843CE1B18E47D00B68564 /* MediaRemoteControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaRemoteControls.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C93458BB1B18D77E0088EE12 /* MediaRemoteControls.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaRemoteControls.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -19201,6 +19204,8 @@
</span><span class="cx">                                 E44614110CD6826900FADA75 /* JSMediaError.h */,
</span><span class="cx">                                 CDB859F8160D493E00E5B07F /* JSMediaKeyEvent.cpp */,
</span><span class="cx">                                 CDB859F9160D493E00E5B07F /* JSMediaKeyEvent.h */,
</span><ins>+                                C9026B631B1CF5AB001D99A7 /* JSMediaRemoteControls.cpp */,
+                                C9026B641B1CF5AB001D99A7 /* JSMediaRemoteControls.h */,
</ins><span class="cx">                                 7E46F6F81627A2C900062223 /* JSOESElementIndexUint.cpp */,
</span><span class="cx">                                 7E46F6F91627A2C900062223 /* JSOESElementIndexUint.h */,
</span><span class="cx">                                 9001787E12E0370700648462 /* JSOESStandardDerivatives.cpp */,
</span><span class="lines">@@ -28896,6 +28901,7 @@
</span><span class="cx">                                 BC3C39B60C0D3D8D005F4D7A /* JSMediaList.cpp in Sources */,
</span><span class="cx">                                 D3A94A46122DC40F00A37BBC /* JSMediaQueryList.cpp in Sources */,
</span><span class="cx">                                 7C5343FC17B74B63004232F0 /* JSMediaQueryListListener.cpp in Sources */,
</span><ins>+                                C9026B651B1CF5FE001D99A7 /* JSMediaRemoteControls.cpp in Sources */,
</ins><span class="cx">                                 CD9DE17417AAC74C00EA386D /* JSMediaSource.cpp in Sources */,
</span><span class="cx">                                 07C59B7117F79C7C000FBCBB /* JSMediaSourceStates.cpp in Sources */,
</span><span class="cx">                                 07C59B6E17F794F6000FBCBB /* JSMediaSourceStatesCustom.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventTargetFactoryin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventTargetFactory.in (185076 => 185077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventTargetFactory.in        2015-06-01 22:00:33 UTC (rev 185076)
+++ trunk/Source/WebCore/dom/EventTargetFactory.in        2015-06-01 22:26:20 UTC (rev 185077)
</span><span class="lines">@@ -16,6 +16,7 @@
</span><span class="cx"> IDBTransaction conditional=INDEXED_DATABASE
</span><span class="cx"> MediaKeySession conditional=ENCRYPTED_MEDIA_V2
</span><span class="cx"> MediaController conditional=VIDEO
</span><ins>+MediaRemoteControls conditional=MEDIA_SESSION
</ins><span class="cx"> MediaSource conditional=MEDIA_SOURCE
</span><span class="cx"> MediaStream conditional=MEDIA_STREAM
</span><span class="cx"> MediaStreamTrack conditional=MEDIA_STREAM
</span></span></pre>
</div>
</div>

</body>
</html>