Implement OCSP stapling in Windows BoringSSL port.
[chromium-blink-merge.git] / third_party / polymer / components-chromium / core-transition / core-transition-css-extracted.js
blob07b468b7cf69daf2d5237a45514590030b7c8c9c
3 Polymer('core-transition-css', {
5 /**
6 * The class that will be applied to all animated nodes.
8 * @attribute baseClass
9 * @type string
10 * @default "core-transition"
12 baseClass: 'core-transition',
14 /**
15 * The class that will be applied to nodes in the opened state.
17 * @attribute openedClass
18 * @type string
19 * @default "core-opened"
21 openedClass: 'core-opened',
23 /**
24 * The class that will be applied to nodes in the closed state.
26 * @attribute closedClass
27 * @type string
28 * @default "core-closed"
30 closedClass: 'core-closed',
32 /**
33 * Event to listen to for animation completion.
35 * @attribute completeEventName
36 * @type string
37 * @default "transitionEnd"
39 completeEventName: 'transitionend',
41 publish: {
42 /**
43 * A secondary configuration attribute for the animation. The class
44 * `<baseClass>-<transitionType` is applied to the animated node during
45 * `setup`.
47 * @attribute transitionType
48 * @type string
50 transitionType: null
53 registerCallback: function(element) {
54 this.transitionStyle = element.templateContent().firstElementChild;
57 // template is just for loading styles, we don't need a shadowRoot
58 fetchTemplate: function() {
59 return null;
62 go: function(node, state) {
63 if (state.opened !== undefined) {
64 this.transitionOpened(node, state.opened);
68 setup: function(node) {
69 if (!node._hasTransitionStyle) {
70 if (!node.shadowRoot) {
71 node.createShadowRoot().innerHTML = '<content></content>';
73 this.installScopeStyle(this.transitionStyle, 'transition',
74 node.shadowRoot);
75 node._hasTransitionStyle = true;
77 node.classList.add(this.baseClass);
78 if (this.transitionType) {
79 node.classList.add(this.baseClass + '-' + this.transitionType);
83 teardown: function(node) {
84 node.classList.remove(this.baseClass);
85 if (this.transitionType) {
86 node.classList.remove(this.baseClass + '-' + this.transitionType);
90 transitionOpened: function(node, opened) {
91 this.listenOnce(node, this.completeEventName, function() {
92 node.classList.toggle(this.revealedClass, opened);
93 if (!opened) {
94 node.classList.remove(this.closedClass);
96 this.complete(node);
97 });
98 node.classList.toggle(this.openedClass, opened);
99 node.classList.toggle(this.closedClass, !opened);