polymer-paper-rails 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -18
  3. data/app/assets/components/core-a11y-keys/core-a11y-keys.html +4 -4
  4. data/app/assets/components/core-animation/web-animations.html +1 -1
  5. data/app/assets/components/core-collapse/core-collapse.html +1 -1
  6. data/app/assets/components/core-drawer-panel/core-drawer-panel.css +14 -6
  7. data/app/assets/components/core-drawer-panel/core-drawer-panel.html +32 -8
  8. data/app/assets/components/core-dropdown/core-dropdown.html +8 -2
  9. data/app/assets/components/core-icon/core-icon.html +0 -2
  10. data/app/assets/components/core-icons/av-icons.html +2 -9
  11. data/app/assets/components/core-icons/communication-icons.html +39 -42
  12. data/app/assets/components/core-icons/core-icons.html +231 -235
  13. data/app/assets/components/core-icons/device-icons.html +75 -90
  14. data/app/assets/components/core-icons/editor-icons.html +52 -52
  15. data/app/assets/components/core-icons/hardware-icons.html +40 -41
  16. data/app/assets/components/core-icons/image-icons.html +133 -137
  17. data/app/assets/components/core-icons/maps-icons.html +55 -57
  18. data/app/assets/components/core-icons/notification-icons.html +34 -34
  19. data/app/assets/components/core-icons/social-icons.html +23 -37
  20. data/app/assets/components/core-menu/core-menu.html +8 -3
  21. data/app/assets/components/core-menu/core-submenu.html +2 -2
  22. data/app/assets/components/core-overlay/core-key-helper.html +3 -0
  23. data/app/assets/components/core-overlay/core-overlay-layer.html +3 -0
  24. data/app/assets/components/core-overlay/core-overlay.html +20 -4
  25. data/app/assets/components/core-resizable/core-resizable.html +248 -0
  26. data/app/assets/components/core-scroll-header-panel/core-scroll-header-panel.html +14 -3
  27. data/app/assets/components/core-selection/core-selection.html +1 -1
  28. data/app/assets/components/core-selector/core-selector.html +26 -26
  29. data/app/assets/components/core-style/core-style.html +1 -1
  30. data/app/assets/components/core-toolbar/core-toolbar.html +1 -1
  31. data/app/assets/components/paper-button/paper-button-base.html +56 -12
  32. data/app/assets/components/paper-button/paper-button.html +22 -5
  33. data/app/assets/components/paper-checkbox/paper-checkbox.css +65 -184
  34. data/app/assets/components/paper-checkbox/paper-checkbox.html +47 -55
  35. data/app/assets/components/paper-dialog/paper-action-dialog.html +3 -3
  36. data/app/assets/components/paper-dialog/paper-dialog.html +2 -2
  37. data/app/assets/components/paper-dropdown-menu/paper-dropdown-menu.html +4 -1
  38. data/app/assets/components/{core-elements → paper-elements}/metadata.html +0 -0
  39. data/app/assets/components/{core-elements → paper-elements}/paper-elements.html +1 -0
  40. data/app/assets/components/paper-fab/paper-fab.html +2 -2
  41. data/app/assets/components/paper-input/paper-autogrow-textarea.html +8 -3
  42. data/app/assets/components/paper-input/paper-char-counter.html +121 -0
  43. data/app/assets/components/paper-input/paper-input-decorator.css +1 -21
  44. data/app/assets/components/paper-input/paper-input-decorator.html +130 -51
  45. data/app/assets/components/paper-input/paper-input.html +31 -5
  46. data/app/assets/components/paper-item/paper-item.html +1 -2
  47. data/app/assets/components/paper-progress/paper-progress.html +1 -1
  48. data/app/assets/components/paper-radio-button/paper-radio-button.css +16 -12
  49. data/app/assets/components/paper-radio-button/paper-radio-button.html +9 -3
  50. data/app/assets/components/paper-ripple/paper-ripple.html +2 -1
  51. data/app/assets/components/paper-shadow/paper-shadow.css +10 -10
  52. data/app/assets/components/paper-shadow/paper-shadow.html +8 -1
  53. data/app/assets/components/paper-slider/paper-slider.html +28 -4
  54. data/app/assets/components/paper-spinner/paper-spinner.css +35 -23
  55. data/app/assets/components/paper-spinner/paper-spinner.html +46 -5
  56. data/app/assets/components/paper-tabs/paper-tabs.css +5 -0
  57. data/app/assets/components/paper-tabs/paper-tabs.html +32 -7
  58. data/app/assets/components/paper-toggle-button/paper-toggle-button.css +58 -30
  59. data/app/assets/components/paper-toggle-button/paper-toggle-button.html +69 -44
  60. data/app/assets/components/sampler-scaffold/sampler-scaffold.css +1 -1
  61. data/app/assets/components/web-animations-js/web-animations-next-lite.min.js +17 -0
  62. data/app/assets/components/web-animations-js/web-animations-next.min.js +17 -0
  63. data/app/assets/components/web-animations-js/web-animations.min.js +17 -0
  64. data/app/assets/components/webcomponentsjs/CustomElements.js +634 -0
  65. data/app/assets/components/webcomponentsjs/CustomElements.min.js +11 -0
  66. data/app/assets/components/webcomponentsjs/HTMLImports.js +764 -0
  67. data/app/assets/components/webcomponentsjs/HTMLImports.min.js +11 -0
  68. data/app/assets/components/webcomponentsjs/ShadowDOM.js +4277 -0
  69. data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +13 -0
  70. data/app/assets/components/webcomponentsjs/package.json +31 -0
  71. data/app/assets/components/webcomponentsjs/webcomponents-lite.js +1728 -0
  72. data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +11 -0
  73. data/app/assets/components/webcomponentsjs/webcomponents.js +6114 -0
  74. data/app/assets/components/webcomponentsjs/webcomponents.min.js +14 -0
  75. data/lib/polymer-paper-rails/version.rb +1 -1
  76. metadata +20 -71
  77. data/app/assets/components/core-dropdown/metadata.html +0 -62
  78. data/app/assets/components/core-icons/png-icons.html +0 -19
  79. data/app/assets/components/core-label/core-label.html +0 -124
  80. data/app/assets/components/core-overlay/tests/html/core-overlay-basic.html +0 -127
  81. data/app/assets/components/core-overlay/tests/html/core-overlay-positioning-margin.html +0 -153
  82. data/app/assets/components/core-overlay/tests/html/core-overlay-positioning.html +0 -167
  83. data/app/assets/components/core-overlay/tests/html/core-overlay-scroll.html +0 -130
  84. data/app/assets/components/core-overlay/tests/js/htmltests.js +0 -6
  85. data/app/assets/components/core-overlay/tests/runner.html +0 -14
  86. data/app/assets/components/core-overlay/tests/tests.json +0 -6
  87. data/app/assets/components/core-popup-menu/core-popup-menu.css +0 -28
  88. data/app/assets/components/core-popup-menu/core-popup-menu.html +0 -198
  89. data/app/assets/components/core-popup-menu/core-popup-overlay.html +0 -111
  90. data/app/assets/components/core-popup-menu/metadata.html +0 -62
  91. data/app/assets/components/paper-focusable/paper-focusable.html +0 -146
  92. data/app/assets/components/platform/platform.js +0 -16
  93. data/app/assets/components/web-animations-js/web-animations.js +0 -5529
  94. data/app/assets/components/web-animations-next/Gruntfile.js +0 -279
  95. data/app/assets/components/web-animations-next/History.md +0 -76
  96. data/app/assets/components/web-animations-next/package.json +0 -33
  97. data/app/assets/components/web-animations-next/src/animation-constructor.js +0 -139
  98. data/app/assets/components/web-animations-next/src/animation-node.js +0 -31
  99. data/app/assets/components/web-animations-next/src/animation.js +0 -65
  100. data/app/assets/components/web-animations-next/src/apply-preserving-inline-style.js +0 -192
  101. data/app/assets/components/web-animations-next/src/apply.js +0 -25
  102. data/app/assets/components/web-animations-next/src/box-handler.js +0 -57
  103. data/app/assets/components/web-animations-next/src/color-handler.js +0 -62
  104. data/app/assets/components/web-animations-next/src/deprecation.js +0 -42
  105. data/app/assets/components/web-animations-next/src/dev.js +0 -16
  106. data/app/assets/components/web-animations-next/src/dimension-handler.js +0 -167
  107. data/app/assets/components/web-animations-next/src/effect-callback.js +0 -86
  108. data/app/assets/components/web-animations-next/src/effect.js +0 -110
  109. data/app/assets/components/web-animations-next/src/element-animatable.js +0 -19
  110. data/app/assets/components/web-animations-next/src/font-weight-handler.js +0 -42
  111. data/app/assets/components/web-animations-next/src/group-constructors.js +0 -81
  112. data/app/assets/components/web-animations-next/src/handler-utils.js +0 -177
  113. data/app/assets/components/web-animations-next/src/interpolation.js +0 -49
  114. data/app/assets/components/web-animations-next/src/matrix-decomposition.js +0 -452
  115. data/app/assets/components/web-animations-next/src/matrix-interpolation.js +0 -130
  116. data/app/assets/components/web-animations-next/src/maxifill-player.js +0 -162
  117. data/app/assets/components/web-animations-next/src/normalize-keyframes.js +0 -259
  118. data/app/assets/components/web-animations-next/src/number-handler.js +0 -72
  119. data/app/assets/components/web-animations-next/src/player.js +0 -193
  120. data/app/assets/components/web-animations-next/src/position-handler.js +0 -117
  121. data/app/assets/components/web-animations-next/src/property-interpolation.js +0 -62
  122. data/app/assets/components/web-animations-next/src/property-names.js +0 -35
  123. data/app/assets/components/web-animations-next/src/scope.js +0 -20
  124. data/app/assets/components/web-animations-next/src/shadow-handler.js +0 -108
  125. data/app/assets/components/web-animations-next/src/shape-handler.js +0 -85
  126. data/app/assets/components/web-animations-next/src/tick.js +0 -148
  127. data/app/assets/components/web-animations-next/src/timeline.js +0 -77
  128. data/app/assets/components/web-animations-next/src/timing-utilities.js +0 -242
  129. data/app/assets/components/web-animations-next/src/transform-handler.js +0 -262
  130. data/app/assets/components/web-animations-next/src/visibility-handler.js +0 -29
  131. data/app/assets/components/web-animations-next/target-config.js +0 -124
  132. data/app/assets/components/web-animations-next/target-loader.js +0 -13
  133. data/app/assets/components/web-animations-next/templates/boilerplate +0 -13
  134. data/app/assets/components/web-animations-next/templates/runner.html +0 -26
  135. data/app/assets/components/web-animations-next/templates/web-animations.html +0 -18
  136. data/app/assets/components/web-animations-next/templates/web-animations.js +0 -21
  137. data/app/assets/components/web-animations-next/web-animations-next-lite.dev.html +0 -44
  138. data/app/assets/components/web-animations-next/web-animations-next-lite.dev.js +0 -21
  139. data/app/assets/components/web-animations-next/web-animations-next.dev.html +0 -49
  140. data/app/assets/components/web-animations-next/web-animations-next.dev.js +0 -21
  141. data/app/assets/components/web-animations-next/web-animations.dev.html +0 -44
  142. data/app/assets/components/web-animations-next/web-animations.dev.js +0 -21
  143. data/app/assets/components/web-animations-next/web-animations.html +0 -50
@@ -1,31 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- (function(shared, scope) {
16
-
17
- scope.AnimationNode = function(timing) {
18
- var timeFraction = 0;
19
- var activeDuration = shared.calculateActiveDuration(timing);
20
- var animationNode = function(localTime) {
21
- return shared.calculateTimeFraction(activeDuration, localTime, timing);
22
- };
23
- animationNode._totalDuration = timing.delay + activeDuration + timing.endDelay;
24
- animationNode._isCurrent = function(localTime) {
25
- var phase = shared.calculatePhase(activeDuration, localTime, timing);
26
- return phase === PhaseActive || phase === PhaseBefore;
27
- };
28
- return animationNode;
29
- };
30
-
31
- })(webAnimationsShared, webAnimationsMinifill);
@@ -1,65 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- (function(shared, scope, testing) {
16
-
17
- scope.Animation = function(target, effectInput, timingInput) {
18
- var animationNode = scope.AnimationNode(shared.normalizeTimingInput(timingInput));
19
- var effect = scope.convertEffectInput(effectInput);
20
- var timeFraction;
21
- var animation = function() {
22
- WEB_ANIMATIONS_TESTING && console.assert(typeof timeFraction !== 'undefined');
23
- effect(target, timeFraction);
24
- };
25
- // Returns whether the animation is in effect or not after the timing update.
26
- animation._update = function(localTime) {
27
- timeFraction = animationNode(localTime);
28
- return timeFraction !== null;
29
- };
30
- animation._clear = function() {
31
- effect(target, null);
32
- };
33
- animation._hasSameTarget = function(otherTarget) {
34
- return target === otherTarget;
35
- };
36
- animation._isCurrent = animationNode._isCurrent;
37
- animation._totalDuration = animationNode._totalDuration;
38
- return animation;
39
- };
40
-
41
- scope.NullAnimation = function(clear) {
42
- var nullAnimation = function() {
43
- if (clear) {
44
- clear();
45
- clear = null;
46
- }
47
- };
48
- nullAnimation._update = function() {
49
- return null;
50
- };
51
- nullAnimation._totalDuration = 0;
52
- nullAnimation._isCurrent = function() {
53
- return false;
54
- };
55
- nullAnimation._hasSameTarget = function() {
56
- return false;
57
- };
58
- return nullAnimation;
59
- };
60
-
61
- if (WEB_ANIMATIONS_TESTING) {
62
- testing.minifillAnimation = scope.Animation;
63
- }
64
-
65
- })(webAnimationsShared, webAnimationsMinifill, webAnimationsTesting);
@@ -1,192 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- (function(scope, testing) {
16
-
17
- var styleAttributes = {
18
- cssText: 1,
19
- length: 1,
20
- parentRule: 1,
21
- };
22
-
23
- var styleMethods = {
24
- getPropertyCSSValue: 1,
25
- getPropertyPriority: 1,
26
- getPropertyValue: 1,
27
- item: 1,
28
- removeProperty: 1,
29
- setProperty: 1,
30
- };
31
-
32
- var styleMutatingMethods = {
33
- removeProperty: 1,
34
- setProperty: 1,
35
- };
36
-
37
- function configureProperty(object, property, descriptor) {
38
- descriptor.enumerable = true;
39
- descriptor.configurable = true;
40
- Object.defineProperty(object, property, descriptor);
41
- }
42
-
43
- function AnimatedCSSStyleDeclaration(element) {
44
- WEB_ANIMATIONS_TESTING && console.assert(!(element.style instanceof AnimatedCSSStyleDeclaration),
45
- 'Element must not already have an animated style attached.');
46
-
47
- // Stores the inline style of the element on its behalf while the
48
- // polyfill uses the element's inline style to simulate web animations.
49
- // This is needed to fake regular inline style CSSOM access on the element.
50
- this._surrogateElement = document.createElement('div');
51
- this._surrogateStyle = this._surrogateElement.style;
52
- this._style = element.style;
53
- this._length = 0;
54
- this._isAnimatedProperty = {};
55
-
56
- // Copy the inline style contents over to the surrogate.
57
- for (var i = 0; i < this._style.length; i++) {
58
- var property = this._style[i];
59
- this._surrogateStyle[property] = this._style[property];
60
- }
61
- this._updateIndices();
62
- }
63
-
64
- AnimatedCSSStyleDeclaration.prototype = {
65
- get cssText() {
66
- return this._surrogateStyle.cssText;
67
- },
68
- set cssText(text) {
69
- var isAffectedProperty = {};
70
- for (var i = 0; i < this._surrogateStyle.length; i++) {
71
- isAffectedProperty[this._surrogateStyle[i]] = true;
72
- }
73
- this._surrogateStyle.cssText = text;
74
- this._updateIndices();
75
- for (var i = 0; i < this._surrogateStyle.length; i++) {
76
- isAffectedProperty[this._surrogateStyle[i]] = true;
77
- }
78
- for (var property in isAffectedProperty) {
79
- if (!this._isAnimatedProperty[property]) {
80
- this._style.setProperty(property, this._surrogateStyle.getPropertyValue(property));
81
- }
82
- }
83
- },
84
- get length() {
85
- return this._surrogateStyle.length;
86
- },
87
- get parentRule() {
88
- return this._style.parentRule;
89
- },
90
- // Mirror the indexed getters and setters of the surrogate style.
91
- _updateIndices: function() {
92
- while (this._length < this._surrogateStyle.length) {
93
- Object.defineProperty(this, this._length, {
94
- configurable: true,
95
- enumerable: false,
96
- get: (function(index) {
97
- return function() { return this._surrogateStyle[index]; };
98
- })(this._length)
99
- });
100
- this._length++;
101
- }
102
- while (this._length > this._surrogateStyle.length) {
103
- this._length--;
104
- Object.defineProperty(this, this._length, {
105
- configurable: true,
106
- enumerable: false,
107
- value: undefined
108
- });
109
- }
110
- },
111
- _set: function(property, value) {
112
- this._style[property] = value;
113
- this._isAnimatedProperty[property] = true;
114
- },
115
- _clear: function(property) {
116
- this._style[property] = this._surrogateStyle[property];
117
- delete this._isAnimatedProperty[property];
118
- },
119
- };
120
-
121
- // Wrap the style methods.
122
- for (var method in styleMethods) {
123
- AnimatedCSSStyleDeclaration.prototype[method] = (function(method, modifiesStyle) {
124
- return function() {
125
- var result = this._surrogateStyle[method].apply(this._surrogateStyle, arguments);
126
- if (modifiesStyle) {
127
- if (!this._isAnimatedProperty[arguments[0]])
128
- this._style[method].apply(this._style, arguments);
129
- this._updateIndices();
130
- }
131
- return result;
132
- }
133
- })(method, method in styleMutatingMethods);
134
- }
135
-
136
- // Wrap the style.cssProperty getters and setters.
137
- for (var property in document.documentElement.style) {
138
- if (property in styleAttributes || property in styleMethods) {
139
- continue;
140
- }
141
- (function(property) {
142
- configureProperty(AnimatedCSSStyleDeclaration.prototype, property, {
143
- get: function() {
144
- return this._surrogateStyle[property];
145
- },
146
- set: function(value) {
147
- this._surrogateStyle[property] = value;
148
- this._updateIndices();
149
- if (!this._isAnimatedProperty[property])
150
- this._style[property] = value;
151
- }
152
- });
153
- })(property);
154
- }
155
-
156
- function ensureStyleIsPatched(element) {
157
- if (element._webAnimationsPatchedStyle)
158
- return;
159
-
160
- var animatedStyle = new AnimatedCSSStyleDeclaration(element);
161
- try {
162
- configureProperty(element, 'style', { get: function() { return animatedStyle; } });
163
- } catch (_) {
164
- // iOS and older versions of Safari (pre v7) do not support overriding an element's
165
- // style object. Animations will clobber any inline styles as a result.
166
- element.style._set = function(property, value) {
167
- element.style[property] = value;
168
- };
169
- element.style._clear = function(property) {
170
- element.style[property] = '';
171
- };
172
- }
173
-
174
- // We must keep a handle on the patched style to prevent it from getting GC'd.
175
- element._webAnimationsPatchedStyle = element.style;
176
- }
177
-
178
- scope.apply = function(element, property, value) {
179
- ensureStyleIsPatched(element);
180
- element.style._set(scope.propertyName(property), value);
181
- };
182
-
183
- scope.clear = function(element, property) {
184
- if (element._webAnimationsPatchedStyle) {
185
- element.style._clear(scope.propertyName(property));
186
- }
187
- };
188
-
189
- if (WEB_ANIMATIONS_TESTING)
190
- testing.ensureStyleIsPatched = ensureStyleIsPatched;
191
-
192
- })(webAnimationsMinifill, webAnimationsTesting);
@@ -1,25 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- (function(scope, testing) {
16
-
17
- scope.apply = function(element, property, value) {
18
- element.style[scope.propertyName(property)] = value;
19
- };
20
-
21
- scope.clear = function(element, property) {
22
- element.style[scope.propertyName(property)] = '';
23
- };
24
-
25
- })(webAnimationsMinifill, webAnimationsTesting);
@@ -1,57 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- (function(scope, testing) {
16
- function consumeLengthPercentOrAuto(string) {
17
- return scope.consumeLengthOrPercent(string) || scope.consumeToken(/^auto/, string);
18
- }
19
- function parseBox(string) {
20
- var result = scope.consumeList([
21
- scope.ignore(scope.consumeToken.bind(null, /^rect/)),
22
- scope.ignore(scope.consumeToken.bind(null, /^\(/)),
23
- scope.consumeRepeated.bind(null, consumeLengthPercentOrAuto, /^,/),
24
- scope.ignore(scope.consumeToken.bind(null, /^\)/)),
25
- ], string);
26
- if (result && result[0].length == 4) {
27
- return result[0];
28
- }
29
- }
30
-
31
- function mergeComponent(left, right) {
32
- if (left == 'auto' || right == 'auto') {
33
- return [true, false, function(t) {
34
- var result = t ? left : right;
35
- if (result == 'auto') {
36
- return 'auto';
37
- }
38
- // FIXME: There's probably a better way to turn a dimension back into a string.
39
- var merged = scope.mergeDimensions(result, result);
40
- return merged[2](merged[0]);
41
- }];
42
- }
43
- return scope.mergeDimensions(left, right);
44
- }
45
-
46
- function wrap(result) {
47
- return 'rect(' + result + ')';
48
- }
49
-
50
- var mergeBoxes = scope.mergeWrappedNestedRepeated.bind(null, wrap, mergeComponent, ', ');
51
-
52
- scope.parseBox = parseBox;
53
- scope.mergeBoxes = mergeBoxes;
54
-
55
- scope.addPropertiesHandler(parseBox, mergeBoxes, ['clip']);
56
-
57
- })(webAnimationsMinifill, webAnimationsTesting);
@@ -1,62 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- (function(scope, testing) {
16
-
17
- var canvas = document.createElement('canvas');
18
- canvas.width = canvas.height = 1;
19
- var context = canvas.getContext('2d');
20
-
21
- function parseColor(string) {
22
- string = string.trim();
23
- // The context ignores invalid colors
24
- context.fillStyle = '#000';
25
- context.fillStyle = string;
26
- var contextSerializedFillStyle = context.fillStyle;
27
- context.fillStyle = '#fff';
28
- context.fillStyle = string;
29
- if (contextSerializedFillStyle != context.fillStyle)
30
- return;
31
- context.fillRect(0, 0, 1, 1);
32
- var pixelColor = context.getImageData(0, 0, 1, 1).data;
33
- context.clearRect(0, 0, 1, 1);
34
- var alpha = pixelColor[3] / 255;
35
- return [pixelColor[0] * alpha, pixelColor[1] * alpha, pixelColor[2] * alpha, alpha];
36
- }
37
-
38
- function mergeColors(left, right) {
39
- return [left, right, function(x) {
40
- function clamp(v) {
41
- return Math.max(0, Math.min(255, v));
42
- }
43
- if (x[3]) {
44
- for (var i = 0; i < 3; i++)
45
- x[i] = Math.round(clamp(x[i] / x[3]));
46
- }
47
- x[3] = scope.numberToString(scope.clamp(0, 1, x[3]));
48
- return 'rgba(' + x.join(',') + ')';
49
- }];
50
- }
51
-
52
- scope.addPropertiesHandler(parseColor, mergeColors,
53
- ['background-color', 'border-bottom-color', 'border-left-color', 'border-right-color',
54
- 'border-top-color', 'color', 'outline-color', 'text-decoration-color']);
55
- scope.consumeColor = scope.consumeParenthesised.bind(null, parseColor);
56
- scope.mergeColors = mergeColors;
57
-
58
- if (WEB_ANIMATIONS_TESTING) {
59
- testing.parseColor = parseColor;
60
- }
61
-
62
- })(webAnimationsMinifill, webAnimationsTesting);
@@ -1,42 +0,0 @@
1
- // Copyright 2014 Google Inc. All rights reserved.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- (function(shared) {
16
-
17
- var silenced = {};
18
-
19
- shared.isDeprecated = function(feature, date, advice, plural) {
20
- var auxVerb = plural ? 'are' : 'is';
21
- var today = new Date();
22
- var expiry = new Date(date);
23
- expiry.setMonth(expiry.getMonth() + 3); // 3 months grace period
24
-
25
- if (today < expiry) {
26
- if (!(feature in silenced)) {
27
- console.warn('Web Animations: ' + feature + ' ' + auxVerb + ' deprecated and will stop working on ' + expiry.toDateString() + '. ' + advice);
28
- }
29
- silenced[feature] = true;
30
- return false;
31
- } else {
32
- return true;
33
- }
34
- };
35
-
36
- shared.deprecated = function(feature, date, advice, plural) {
37
- if (shared.isDeprecated(feature, date, advice, plural)) {
38
- throw new Error(feature + ' ' + auxVerb + ' no longer supported. ' + advice);
39
- }
40
- };
41
-
42
- })(webAnimationsShared);