Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Unified Diff: Source/core/html/HTMLVideoElement.js

Issue 456323002: [WIP] Re-implement MediaControls in Blink-in-JS (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLVideoElement.js
diff --git a/Source/core/html/HTMLVideoElement.js b/Source/core/html/HTMLVideoElement.js
new file mode 100644
index 0000000000000000000000000000000000000000..9dc7da256c7ee59f31ca8896d7a2fae556f8b9f4
--- /dev/null
+++ b/Source/core/html/HTMLVideoElement.js
@@ -0,0 +1,24 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+'use strict';
+
+installClass("HTMLVideoElement", function(global, HTMLVideoElementPrototype) {
+ function reflectAttribute(prototype, attributeName, propertyName) {
haraken 2014/08/11 11:09:33 We want to share this function with HTMLMarqueeEle
hajimehoshi 2014/08/12 06:54:09 I've removed HTMLVideoElement.js. PrivateScriptUti
+ Object.defineProperty(prototype, propertyName, {
+ get: function() {
+ return this.getAttribute(attributeName) || '';
+ },
+ set: function(value) {
+ this.setAttribute(attributeName, value);
+ },
+ configurable: true,
+ enumerable: true,
+ });
+ }
+
+ reflectAttribute(HTMLVideoElementPrototype, 'width', 'width');
+ reflectAttribute(HTMLVideoElementPrototype, 'height', 'height');
+ //reflectAttribute(HTMLVideoElementPrototype, 'poster', 'poster');
+});

Powered by Google App Engine
This is Rietveld 408576698