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

Side by Side Diff: Source/core/html/HTMLMarqueeElement.js

Issue 634843002: UA shadow root of <marquee> should not be exposed to user scripts Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Element.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 installClass('HTMLMarqueeElement', function(HTMLMarqueeElementPrototype) { 7 installClass('HTMLMarqueeElement', function(HTMLMarqueeElementPrototype) {
8 8
9 var kDefaultScrollAmount = 6; 9 var kDefaultScrollAmount = 6;
10 var kDefaultScrollDelayMS = 85; 10 var kDefaultScrollDelayMS = 85;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 reflectAttribute(HTMLMarqueeElementPrototype, 'behavior', 'behavior'); 84 reflectAttribute(HTMLMarqueeElementPrototype, 'behavior', 'behavior');
85 reflectAttribute(HTMLMarqueeElementPrototype, 'bgcolor', 'bgColor'); 85 reflectAttribute(HTMLMarqueeElementPrototype, 'bgcolor', 'bgColor');
86 reflectAttribute(HTMLMarqueeElementPrototype, 'direction', 'direction'); 86 reflectAttribute(HTMLMarqueeElementPrototype, 'direction', 'direction');
87 reflectAttribute(HTMLMarqueeElementPrototype, 'height', 'height'); 87 reflectAttribute(HTMLMarqueeElementPrototype, 'height', 'height');
88 reflectAttribute(HTMLMarqueeElementPrototype, 'hspace', 'hspace'); 88 reflectAttribute(HTMLMarqueeElementPrototype, 'hspace', 'hspace');
89 reflectAttribute(HTMLMarqueeElementPrototype, 'vspace', 'vspace'); 89 reflectAttribute(HTMLMarqueeElementPrototype, 'vspace', 'vspace');
90 reflectAttribute(HTMLMarqueeElementPrototype, 'width', 'width'); 90 reflectAttribute(HTMLMarqueeElementPrototype, 'width', 'width');
91 reflectBooleanAttribute(HTMLMarqueeElementPrototype, 'truespeed', 'trueSpeed '); 91 reflectBooleanAttribute(HTMLMarqueeElementPrototype, 'truespeed', 'trueSpeed ');
92 92
93 HTMLMarqueeElementPrototype.createdCallback = function() { 93 HTMLMarqueeElementPrototype.createdCallback = function() {
94 var shadow = this.createShadowRoot(); 94 var shadow = this.createUserAgentShadowRoot();
95 var style = document.createElement('style'); 95 var style = document.createElement('style');
96 style.textContent = ':host { display: inline-block; width: -webkit-fill- available; overflow: hidden; text-align: initial; }' 96 style.textContent = ':host { display: inline-block; width: -webkit-fill- available; overflow: hidden; text-align: initial; }'
97 + ':host([direction="up"]), :host([direction="down"]) { overflow: in itial; overflow-y: hidden; }'; 97 + ':host([direction="up"]), :host([direction="down"]) { overflow: in itial; overflow-y: hidden; }';
98 shadow.appendChild(style); 98 shadow.appendChild(style);
99 99
100 var mover = document.createElement('div'); 100 var mover = document.createElement('div');
101 shadow.appendChild(mover); 101 shadow.appendChild(mover);
102 102
103 mover.appendChild(document.createElement('content')); 103 mover.appendChild(document.createElement('content'));
104 104
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 cancelAnimationFrame(this.continueCallback_); 388 cancelAnimationFrame(this.continueCallback_);
389 this.continueCallback_ = null; 389 this.continueCallback_ = null;
390 return; 390 return;
391 } 391 }
392 392
393 if (this.player_) { 393 if (this.player_) {
394 this.player_.pause(); 394 this.player_.pause();
395 } 395 }
396 }; 396 };
397 }); 397 });
OLDNEW
« no previous file with comments | « Source/core/dom/Element.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698