- Revision
- 185077
- Author
- commit-qu...@webkit.org
- Date
- 2015-06-01 15:26:20 -0700 (Mon, 01 Jun 2015)
Log Message
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 <mra...@apple.com> 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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (185076 => 185077)
--- 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)
@@ -1,3 +1,22 @@
+2015-06-01 Matt Rajca <mra...@apple.com>
+
+ 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.
+
2015-06-01 Benjamin Poulain <bpoul...@apple.com>
[CSS JIT] Fail to compile when we are out of executable memory
Modified: trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.cpp (185076 => 185077)
--- 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)
@@ -30,6 +30,11 @@
namespace WebCore {
+MediaRemoteControls::MediaRemoteControls(ScriptExecutionContext& context)
+ : m_scriptExecutionContext(context)
+{
+}
+
MediaRemoteControls::~MediaRemoteControls()
{
Modified: trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.h (185076 => 185077)
--- 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)
@@ -35,6 +35,11 @@
class MediaRemoteControls : public RefCounted<MediaRemoteControls>, public EventTargetWithInlineData {
public:
+ static Ref<MediaRemoteControls> create(ScriptExecutionContext& context)
+ {
+ return adoptRef(*new MediaRemoteControls(context));
+ }
+
bool previousTrackEnabled() const { return m_previousTrackEnabled; }
void setPreviousTrackEnabled(bool enabled) { m_previousTrackEnabled = enabled; }
@@ -52,15 +57,19 @@
virtual ~MediaRemoteControls();
-protected:
- MediaRemoteControls() = default;
+ MediaRemoteControls(ScriptExecutionContext&);
+ virtual EventTargetInterface eventTargetInterface() const override { return MediaRemoteControlsEventTargetInterfaceType; }
+ virtual ScriptExecutionContext* scriptExecutionContext() const override { return &m_scriptExecutionContext; }
+
private:
- bool m_previousTrackEnabled;
- bool m_nextTrackEnabled;
- bool m_seekForwardEnabled;
- bool m_seekBackwardEnabled;
+ ScriptExecutionContext& m_scriptExecutionContext;
+ bool m_previousTrackEnabled { false };
+ bool m_nextTrackEnabled { false };
+ bool m_seekForwardEnabled { false };
+ bool m_seekBackwardEnabled { false };
+
virtual void refEventTarget() override final { ref(); }
virtual void derefEventTarget() override final { deref(); }
};
Modified: trunk/Source/WebCore/Modules/mediasession/MediaRemoteControls.idl (185076 => 185077)
--- 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)
@@ -25,15 +25,12 @@
[
Conditional=MEDIA_SESSION,
+ Constructor,
+ ConstructorCallWith=ScriptExecutionContext,
EventTarget,
] interface MediaRemoteControls : EventTarget {
attribute boolean previousTrackEnabled;
attribute boolean nextTrackEnabled;
attribute boolean seekForwardEnabled;
attribute boolean seekBackwardEnabled;
-
- attribute EventHandler onprevioustrack;
- attribute EventHandler onnexttrack;
- attribute EventHandler onseekforward;
- attribute EventHandler onseekbackward;
};
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (185076 => 185077)
--- 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)
@@ -5684,6 +5684,7 @@
C6F0917F143A2BB900685849 /* JSMutationObserverCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F0917E143A2BB900685849 /* JSMutationObserverCustom.cpp */; };
C6F420A216B7164E0052A9F2 /* JSMutationCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F420A016B7164E0052A9F2 /* JSMutationCallback.cpp */; };
C6F420A316B7164E0052A9F2 /* JSMutationCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F420A116B7164E0052A9F2 /* JSMutationCallback.h */; };
+ C9026B651B1CF5FE001D99A7 /* JSMediaRemoteControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C9026B631B1CF5AB001D99A7 /* JSMediaRemoteControls.cpp */; };
C90843CF1B18E47D00B68564 /* MediaRemoteControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C90843CD1B18E47D00B68564 /* MediaRemoteControls.cpp */; };
C90843D01B18E47D00B68564 /* MediaRemoteControls.h in Headers */ = {isa = PBXBuildFile; fileRef = C90843CE1B18E47D00B68564 /* MediaRemoteControls.h */; };
CA3BF67C10D99BAE00E6CE53 /* ScrollAnimator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA3BF67B10D99BAE00E6CE53 /* ScrollAnimator.cpp */; };
@@ -13237,6 +13238,8 @@
C6F0917E143A2BB900685849 /* JSMutationObserverCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationObserverCustom.cpp; sourceTree = "<group>"; };
C6F420A016B7164E0052A9F2 /* JSMutationCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationCallback.cpp; sourceTree = "<group>"; };
C6F420A116B7164E0052A9F2 /* JSMutationCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMutationCallback.h; sourceTree = "<group>"; };
+ C9026B631B1CF5AB001D99A7 /* JSMediaRemoteControls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSMediaRemoteControls.cpp; path = "JSMediaRemoteControls.cpp"; sourceTree = "<group>"; };
+ C9026B641B1CF5AB001D99A7 /* JSMediaRemoteControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSMediaRemoteControls.h; path = "JSMediaRemoteControls.h"; sourceTree = "<group>"; };
C90843CD1B18E47D00B68564 /* MediaRemoteControls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaRemoteControls.cpp; sourceTree = "<group>"; };
C90843CE1B18E47D00B68564 /* MediaRemoteControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaRemoteControls.h; sourceTree = "<group>"; };
C93458BB1B18D77E0088EE12 /* MediaRemoteControls.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaRemoteControls.idl; sourceTree = "<group>"; };
@@ -19201,6 +19204,8 @@
E44614110CD6826900FADA75 /* JSMediaError.h */,
CDB859F8160D493E00E5B07F /* JSMediaKeyEvent.cpp */,
CDB859F9160D493E00E5B07F /* JSMediaKeyEvent.h */,
+ C9026B631B1CF5AB001D99A7 /* JSMediaRemoteControls.cpp */,
+ C9026B641B1CF5AB001D99A7 /* JSMediaRemoteControls.h */,
7E46F6F81627A2C900062223 /* JSOESElementIndexUint.cpp */,
7E46F6F91627A2C900062223 /* JSOESElementIndexUint.h */,
9001787E12E0370700648462 /* JSOESStandardDerivatives.cpp */,
@@ -28896,6 +28901,7 @@
BC3C39B60C0D3D8D005F4D7A /* JSMediaList.cpp in Sources */,
D3A94A46122DC40F00A37BBC /* JSMediaQueryList.cpp in Sources */,
7C5343FC17B74B63004232F0 /* JSMediaQueryListListener.cpp in Sources */,
+ C9026B651B1CF5FE001D99A7 /* JSMediaRemoteControls.cpp in Sources */,
CD9DE17417AAC74C00EA386D /* JSMediaSource.cpp in Sources */,
07C59B7117F79C7C000FBCBB /* JSMediaSourceStates.cpp in Sources */,
07C59B6E17F794F6000FBCBB /* JSMediaSourceStatesCustom.cpp in Sources */,
Modified: trunk/Source/WebCore/dom/EventTargetFactory.in (185076 => 185077)
--- 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)
@@ -16,6 +16,7 @@
IDBTransaction conditional=INDEXED_DATABASE
MediaKeySession conditional=ENCRYPTED_MEDIA_V2
MediaController conditional=VIDEO
+MediaRemoteControls conditional=MEDIA_SESSION
MediaSource conditional=MEDIA_SOURCE
MediaStream conditional=MEDIA_STREAM
MediaStreamTrack conditional=MEDIA_STREAM