Title: [164279] trunk/Source/WebCore
- Revision
- 164279
- Author
- [email protected]
- Date
- 2014-02-18 02:22:21 -0800 (Tue, 18 Feb 2014)
Log Message
Move inheriting method to the superclass in the _javascript_ media controls
https://bugs.webkit.org/show_bug.cgi?id=128897
Reviewed by Jer Noble.
The inheriting method of the _javascript_ multimedia controls was
moved from the subclasses to the superclass because this way it is
only defined once.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.extend): Added to replace inheritFrom in the
subclasses.
* Modules/mediacontrols/mediaControlsGtk.js:
* Modules/mediacontrols/mediaControlsiOS.js: Removed inheritFrom
and used extend.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (164278 => 164279)
--- trunk/Source/WebCore/ChangeLog 2014-02-18 10:16:32 UTC (rev 164278)
+++ trunk/Source/WebCore/ChangeLog 2014-02-18 10:22:21 UTC (rev 164279)
@@ -1,5 +1,23 @@
2014-02-18 Xabier Rodriguez Calvar <[email protected]>
+ Move inheriting method to the superclass in the _javascript_ media controls
+ https://bugs.webkit.org/show_bug.cgi?id=128897
+
+ Reviewed by Jer Noble.
+
+ The inheriting method of the _javascript_ multimedia controls was
+ moved from the subclasses to the superclass because this way it is
+ only defined once.
+
+ * Modules/mediacontrols/mediaControlsApple.js:
+ (Controller.prototype.extend): Added to replace inheritFrom in the
+ subclasses.
+ * Modules/mediacontrols/mediaControlsGtk.js:
+ * Modules/mediacontrols/mediaControlsiOS.js: Removed inheritFrom
+ and used extend.
+
+2014-02-18 Xabier Rodriguez Calvar <[email protected]>
+
[GTK] Fix hitting hasClass() assertion in debug with the new JS media controls
https://bugs.webkit.org/show_bug.cgi?id=128820
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (164278 => 164279)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2014-02-18 10:16:32 UTC (rev 164278)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2014-02-18 10:22:21 UTC (rev 164279)
@@ -97,6 +97,13 @@
down: 40
},
+ extend: function(child) {
+ for (var property in this) {
+ if (!child.hasOwnProperty(property))
+ child[property] = this[property];
+ }
+ },
+
// Localized string accessor
UIString: function(s){
if (this.localizedStrings[s])
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js (164278 => 164279)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js 2014-02-18 10:16:32 UTC (rev 164278)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js 2014-02-18 10:22:21 UTC (rev 164279)
@@ -19,13 +19,6 @@
ControllerGtk.prototype = {
- inheritFrom: function(parent) {
- for (var property in parent) {
- if (!this.hasOwnProperty(property))
- this[property] = parent[property];
- }
- },
-
createControls: function()
{
Controller.prototype.createControls.apply(this);
@@ -213,5 +206,5 @@
},
};
-ControllerGtk.prototype.inheritFrom(Object.create(Controller.prototype));
+Object.create(Controller.prototype).extend(ControllerGtk.prototype);
Object.defineProperty(ControllerGtk.prototype, 'constructor', { enumerable:false, value:ControllerGtk });
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js (164278 => 164279)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2014-02-18 10:16:32 UTC (rev 164278)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2014-02-18 10:22:21 UTC (rev 164279)
@@ -12,13 +12,6 @@
ControllerIOS.StartPlaybackControls = 2;
ControllerIOS.prototype = {
- inheritFrom: function(parent) {
- for (var property in parent) {
- if (!this.hasOwnProperty(property))
- this[property] = parent[property];
- }
- },
-
addVideoListeners: function() {
Controller.prototype.addVideoListeners.call(this);
@@ -283,5 +276,5 @@
};
-ControllerIOS.prototype.inheritFrom(Object.create(Controller.prototype));
+Object.create(Controller.prototype).extend(ControllerIOS.prototype);
Object.defineProperty(ControllerIOS.prototype, 'constructor', { enumerable:false, value:ControllerIOS });
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes