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

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

Issue 394773003: Implement HTMLMarqueeElement's animation in private scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
« no previous file with comments | « Source/core/html/HTMLMarqueeElement.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMarqueeElement.js
diff --git a/Source/core/html/HTMLMarqueeElement.js b/Source/core/html/HTMLMarqueeElement.js
index b18756327e29177580caa63a03ee0f0a09b72ccc..b0e00a1d0d27095d74928356f0c5758112c094fb 100644
--- a/Source/core/html/HTMLMarqueeElement.js
+++ b/Source/core/html/HTMLMarqueeElement.js
@@ -81,32 +81,6 @@ installClass('HTMLMarqueeElement', function(global) {
});
}
- function defineInlineEventHandler(prototype, eventName) {
- var propertyName = 'on' + eventName;
- // FIXME: We should use symbols here instead.
- var functionPropertyName = propertyName + 'Function_';
- var eventHandlerPropertyName = propertyName + 'EventHandler_';
- Object.defineProperty(prototype, propertyName, {
- get: function() {
- var func = this[functionPropertyName];
- return func || null;
- },
- set: function(value) {
- var oldEventHandler = this[eventHandlerPropertyName];
- if (oldEventHandler)
- this.removeEventListener(eventName, oldEventHandler);
- // Notice that we wrap |value| in an anonymous function so that the
- // author can't call removeEventListener themselves to unregister the
- // inline event handler.
- var newEventHandler = value ? function() { value.apply(this, arguments) } : null;
- if (newEventHandler)
- this.addEventListener(eventName, newEventHandler);
- this[functionPropertyName] = value;
- this[eventHandlerPropertyName] = newEventHandler;
- },
- });
- }
-
var HTMLMarqueeElementPrototype = Object.create(HTMLElement.prototype);
reflectAttribute(HTMLMarqueeElementPrototype, 'behavior', 'behavior');
@@ -118,10 +92,6 @@ installClass('HTMLMarqueeElement', function(global) {
reflectAttribute(HTMLMarqueeElementPrototype, 'width', 'width');
reflectBooleanAttribute(HTMLMarqueeElementPrototype, 'truespeed', 'trueSpeed');
- defineInlineEventHandler(HTMLMarqueeElementPrototype, 'start');
- defineInlineEventHandler(HTMLMarqueeElementPrototype, 'finish');
- defineInlineEventHandler(HTMLMarqueeElementPrototype, 'bounce');
haraken 2014/07/15 12:57:07 I removed these event handlers, since we haven't y
-
HTMLMarqueeElementPrototype.createdCallback = function() {
haraken 2014/07/15 12:57:07 abarth@: When and how are you assuming that these
abarth-chromium 2014/07/15 17:10:07 These callbacks are all defined by http://w3c.gith
var shadow = this.createShadowRoot();
var style = global.document.createElement('style');
@@ -364,7 +334,6 @@ installClass('HTMLMarqueeElement', function(global) {
HTMLMarqueeElementPrototype.continue_ = function() {
if (!this.shouldContinue_()) {
this.player_ = null;
- this.dispatchEvent(new Event('finish', false, true));
return;
}
@@ -385,8 +354,6 @@ installClass('HTMLMarqueeElement', function(global) {
return;
++this.loopCount_;
this.continue_();
- if (this.player_ && this.behavior === kBehaviorAlternate)
- this.dispatchEvent(new Event('bounce', false, true));
}.bind(this));
};
@@ -397,7 +364,6 @@ installClass('HTMLMarqueeElement', function(global) {
this.continueCallback_ = null;
this.continue_();
}.bind(this));
- this.dispatchEvent(new Event('start', false, true));
};
HTMLMarqueeElementPrototype.stop = function() {
« no previous file with comments | « Source/core/html/HTMLMarqueeElement.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698