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

Side by Side Diff: Source/core/html/shadow/PluginPlaceholderElement.js

Issue 522783002: Add a custom element to own structure of shadow DOM plugin placeholders. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 3 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/html/shadow/PluginPlaceholderElement.idl ('k') | Source/core/testing/Internals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 * This is a placeholder to create the 2 // Use of this source code is governed by a BSD-style license that can be
3 * IDR_PRIVATE_SCRIPT_PLUGINPLACEHOLDERELEMENT_JS resource. 3 // found in the LICENSE file.
4 * 4
5 * It will be replaced by a complete file in: 5 'use strict';
6 * https://codereview.chromium.org/522783002/ 6
7 */ 7 installClass('PluginPlaceholderElement', function(PluginPlaceholderElementProtot ype) {
8 PluginPlaceholderElementPrototype.createdCallback = function() {
9 // FIXME: Move style out of script and into CSS.
10
11 this.id = 'plugin-placeholder';
12 this.style.width = '100%';
13 this.style.height = '100%';
14 this.style.overflow = 'hidden';
15 this.style.display = 'flex';
16 this.style.alignItems = 'center';
17 this.style.backgroundColor = 'gray';
18 this.style.font = '12px -webkit-control';
19
20 var contentElement = document.createElement('div');
21 contentElement.id = 'plugin-placeholder-content';
22 contentElement.style.textAlign = 'center';
23 contentElement.style.margin = 'auto';
24
25 var messageElement = document.createElement('div');
26 messageElement.id = 'plugin-placeholder-message';
27
28 contentElement.appendChild(messageElement);
29 this.appendChild(contentElement);
30
31 this.messageElement = messageElement;
32 };
33
34 Object.defineProperty(PluginPlaceholderElementPrototype, 'message', {
35 get: function() { return this.messageElement.textContent; },
36 set: function(message) { this.messageElement.textContent = message; },
37 });
38 });
OLDNEW
« no previous file with comments | « Source/core/html/shadow/PluginPlaceholderElement.idl ('k') | Source/core/testing/Internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698