Commit adc50b30 authored by dpapad's avatar dpapad Committed by Commit Bot

WebUI Polymer: Cleanup reproduce.sh and remove TODO.

 - Several "rm" commands are unnecessary because of rsync_exclude.txt.
 - Audited code that was replacing NBSP in polymer-mini.html (added in
   r332329). Seems to have no effect (no diff exists after running
   the command). Removed related TODO for Polymer 2.
 - Remove unused files from third_party/web-animations-js/. These files
   are not included in the build anyway.

Bug: 738611
Change-Id: I372143a9bc1fd3f18d5aa6fb7fe735fdbdb82015
Reviewed-on: https://chromium-review.googlesource.com/c/1338334
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608860}
parent 5f12700c
......@@ -33,38 +33,19 @@ rm -rf ../../web-animations-js/sources
bower install --no-color --production
rm components/*/.travis.yml
mv components/web-animations-js ../../web-animations-js/sources
# Update third_party/web-animations-js/ folder.
mkdir -p ../../web-animations-js/sources/
mv components/web-animations-js/web-animations-next-lite.min.js \
../../web-animations-js/sources/
mv components/web-animations-js/COPYING \
../../web-animations-js/sources/
cp ../../web-animations-js/sources/COPYING ../../web-animations-js/LICENSE
rm -rf components/web-animations-js/
# Remove source mapping directives since we don't compile the maps.
sed -i 's/^\s*\/\/#\s*sourceMappingURL.*//' \
../../web-animations-js/sources/*.min.js
# Test and demo directories aren't needed.
rm -rf components/*/{test,demo}
rm -rf components/polymer/explainer
# Remove promise-polyfill and components which depend on it.
rm -rf components/promise-polyfill
rm -rf components/iron-ajax
rm -rf components/iron-form
# Make checkperms.py happy.
find components/*/hero.svg -type f -exec chmod -x {} \;
find components/iron-selector -type f -exec chmod -x {} \;
# Remove carriage returns to make CQ happy.
find components -type f \( -name \*.html -o -name \*.css -o -name \*.js\
-o -name \*.md -o -name \*.sh -o -name \*.json -o -name \*.gitignore\
-o -name \*.bat -o -name \*.svg \) -print0 | xargs -0 sed -i -e $'s/\r$//g'
# Resolve a unicode encoding issue in dom-innerHTML.html.
# TODO(dpapad): Examine if this is necessary for polymer2/ as well.
NBSP=$(python -c 'print u"\u00A0".encode("utf-8")')
sed -i 's/['"$NBSP"']/\\u00A0/g' components/polymer/polymer-mini.html
rsync -c --delete -r -v --exclude-from="rsync_exclude.txt" \
--prune-empty-dirs "components/" "components-chromium/"
......
{
"name": "web-animations-js",
"description": "JavaScript implementation of the Web Animations API",
"homepage": "https://github.com/web-animations/web-animations-js",
"main": "web-animations.min.js",
"moduleType": [
"globals"
],
"keywords": [
"animations",
"polyfill"
],
"license": "Apache-2.0",
"ignore": [
"**/.*",
"node_modules",
"templates",
"test",
"src",
"Gruntfile.js",
"package.json",
"target-config.js",
"target-loader.js",
"web-animations.dev.html",
"web-animations.dev.js",
"web-animations-next.dev.html",
"web-animations-next.dev.js",
"web-animations-next-lite.dev.html",
"web-animations-next-lite.dev.js"
],
"version": "2.2.2",
"_release": "2.2.2",
"_resolution": {
"type": "version",
"tag": "2.2.2",
"commit": "8cf9e3567c8a30e905e6a2aefb2ebf4120da6859"
},
"_source": "https://github.com/web-animations/web-animations-js.git",
"_target": "2.2.2",
"_originalSource": "web-animations/web-animations-js"
}
\ No newline at end of file
## Developer setup instructions
1. `git clone git@github.com:web-animations/web-animations-next.git`
1. `git submodule update --init --recursive` (Necessary for running tests.)
1. Install [node](https://nodejs.org/en/) and make sure `npm` is in your $PATH
1. Run `npm install` in the respository to pull in development dependencies.
1. Run `npm install -g grunt grunt-cli` to get the build tools for the command line.
1. Run `grunt` to build the polyfill.
1. Run `grunt test` to run polyfill and web-platform-tests tests.
## Debugging tests
You can run the tests in an interactive mode with `grunt debug`. This starts the
Karma server once for each polyfill target for each test framework.
Navigate to `http://localhost:9876/debug.html` to open the test runner in your
browser of choice, all test results appear in the Javascript console.
Test failures can be accessed via `window.failures` and `window.formattedFailures`
once the tests have completed.
The polyfill target and tests can be specified as arguments to the `debug` task.
Example: `grunt debug:web-animations-next:test/web-platform-tests/web-animations/animation/pause.html`
Multiple test files may be listed with comma separation. Specifying files will output their URL in the command line.
Example: `http://localhost:9876/base/test/web-platform-tests/web-animations/animation/pause.html`
## Design notes
[Design diagrams](https://drive.google.com/folderview?id=0B9rpPoIDv3vTNlZxOVp6a2tNa1E&usp=sharing)
## Publishing a release
1. Determine the version number for the release
* Increment the first number and reset others to 0 when there are large breaking changes
* Increment the second number and reset the third to 0 when there are significant new, but backwards compatible features
* Otherwise, increment the third number
1. Add versioned release notes to `History.md`, for example:
### 3.13.37 — *November 1, 2001*
* Fixed a bug where nothing worked
Use the following to generate a summary of commits, but edit the list to contain only
relevant information.
git log --first-parent `git describe --tags --abbrev=0 web-animations-js/master`..web-animations-next/master --pretty=format:" * %s"
1. Specify the new version inside `package.json` (for NPM), for example:
```js
"version": "3.13.37",
```
1. Build the polyfill with `npm install && grunt` then update `README.md`'s Build Target Comparison with the current gzipped sizes.
1. Submit both changes to web-animations-next then follow the procedure to push from web-animations-next to web-animations-js.
1. Draft a [new release](https://github.com/web-animations/web-animations-js/releases) at the
commit pushed to web-animations-js in step #4. Copy the release notes from `History.md`
added in step #2.
1. Once you've pushed to web-animations-js, run `npm publish` from that checked-out folder
To do this, you'll need to be a collaborator [on the NPM project](https://www.npmjs.com/package/web-animations-js), or have a collaborator help you.
1. If there are any breaking changes to the API in this release you must notify web-animations-changes@googlegroups.com.
Only owners of the group may post to it so you may need to request ownership or ask someone to post it for you.
## Pushing from web-animations-next to web-animations-js
git fetch web-animations-next
git fetch web-animations-js
git checkout web-animations-js/master
git merge web-animations-next/master --no-edit --quiet
npm install
grunt
# Optional "grunt test" to make sure everything still passes.
git add -f *.min.js*
git rm .gitignore
git commit -m 'Add build artifacts from '`cat .git/refs/remotes/web-animations-next/master`
git push web-animations-js HEAD:refs/heads/master
## Testing architecture
This is an overview of what happens when `grunt test` is run.
1. Polyfill tests written in mocha and chai are run.
1. grunt creates a karma config with mocha and chai adapters.
1. grunt adds the test/js files as includes to the karma config.
1. grunt starts the karma server with the config and waits for the result.
1. The mocha adaptor runs the included tests and reports the results to karma.
1. karma outputs results to the console and returns the final pass/fail result to grunt.
1. web-platform-tests/web-animations tests written in testtharness.js are run.
1. grunt creates a karma config with karma-testharness-adaptor.js included.
1. grunt adds the web-platform-tests/web-animations files to the custom testharnessTests config in the karma config.
1. grunt adds failure expectations to the custom testharnessTests config in the karma config.
1. grunt starts the karma server with the config and waits for the result.
1. The testharness.js adaptor runs the included tests (ignoring expected failures) and reports the results to karma.
1. karma outputs results to the console and returns the final pass/fail result to grunt.
1. grunt exits successfully if both test runs passed.
### 2.2.2 - *August 3 2016*
* [Fixed handling of keyframes with overlapping offsets.](https://github.com/web-animations/web-animations-next/pull/470)
* [Throw TypeError on invalid keyframe input.](https://github.com/web-animations/web-animations-next/pull/471)
* [Fixed display and other animation properties being animated.](https://github.com/web-animations/web-animations-next/pull/474)
* [Throw InvalidStateError when calling play() on reversed infinite animation.](https://github.com/web-animations/web-animations-next/pull/475)
* [Fixed infinite loop in cubic-bezier timing function.](https://github.com/web-animations/web-animations-next/pull/476)
* [Fixed idle animations not becoming paused when seeked.](https://github.com/web-animations/web-animations-next/pull/479)
* [Fixed pause() not rewinding idl animations.](https://github.com/web-animations/web-animations-next/pull/480)
* [Extended cubic-bezier timing function domain from [0, 1] to (-Infinity, Infinity).](https://github.com/web-animations/web-animations-next/pull/481)
* [Fixed timing model to handle corner cases involving Infinity and 0 correctly.](https://github.com/web-animations/web-animations-next/pull/482)
* [Fixed source files missing from npm package.](https://github.com/web-animations/web-animations-next/pull/483)
* [Improved performance of starting and updating individual animations.](https://github.com/web-animations/web-animations-next/pull/485)
### 2.2.1 - *April 28 2016*
* [Deprecated invalid timing inputs](https://github.com/web-animations/web-animations-next/pull/437) as they will soon throw [TypeErrors](https://github.com/web-animations/web-animations-next/pull/426) in native browsers.
For example, this is deprecated and will eventually throw a TypeError:
element.animate([], {
duration: -1,
iterationStart: -1,
iterations: -1,
easing: 'garbage string',
});
* [Fixed polyfill crash in browsers based on Chromium 36 to 46.](https://github.com/web-animations/web-animations-next/pull/434)
* [Increased cubic-bezier accuracy.](https://github.com/web-animations/web-animations-next/pull/428)
* [Added support for grad and turn units for angles.](https://github.com/web-animations/web-animations-next/pull/427)
### 2.2.0 - *April 6 2016*
* Deprecated the use of hyphens in property names.
For example, this is deprecated:
element.animate([{'font-size': '0px'}, {'font-size': '10px'}]);
and this should be used instead:
element.animate([{fontSize: '0px'}, {fontSize: '10px'}]);
* Added arbitrary easing capitalisation.
* Added "id" effect option. (http://w3c.github.io/web-animations/#dom-keyframeanimationoptions-id)
* Added "oncancel" event handler.
* Added value list keyframe syntax.
As as alternative to:
element.animate([{color: 'red'}, {color: 'green'}, {color: 'blue'}]);
you can now use:
element.animate({color: ['red', 'green', 'blue']});
* Fixed easing TypeError in FireFox Nightly when using groups.
* Fixed delayed animation updates on Safari and Firefox
* Fixed infinite recursion when setting onfinish to null.
### 2.1.4 - *December 1 2015*
* Use `Date.now()` instead of `performace.now()` for mobile Safari.
### 2.1.3 - *October 12 2015*
* Removed web-animations.min.js.gz
### 2.1.2 - *July 8 2015*
* Fix a bug where onfinish was being called for GroupEffects before they were finished.
### 2.1.1 - *July 1 2015*
* Add Animation.timeline getter
* Add AnimationEffect.parent getter
* Make AnimationEffectTiming (returned by AnimationEffect.timing) attributes mutable
* Expose the Animation constructor
* Change custom effects from AnimationEffects to onsample functions. Custom effects should now be created by setting the onsample attribute of a KeyframeEffect.
For example, this is deprecated:
var myEffect = new KeyframeEffect(
element,
function(timeFraction, target, effect) {
target.style.opacity = timeFraction;
},
1000);
var myAnimation = document.timeline.play(myEffect);
and this should be used insead:
var myEffect = new KeyframeEffect(element, [], 1000);
effect.onsample = function(timeFraction, effect, animation) {
effect.target.style.opacity = timeFraction;
};
var myAnimation = document.timeline.play(myEffect);
### 2.1.0 - *June 15 2015*
* Fix bug affecting GroupEffects with infinite iteration children
* Add GroupEffect.firstChild and GroupEffect.lastChild
* Add initial values for most CSS properties
* Allow `timeline.play()` to be called with no arguments
* Add AnimationEffect.clone
* Add GroupEffect.append and GroupEffect.prepend
* Add AnimationEffect.remove
* Add Animation.ready and Animation.finished promises
### 2.0.0 - *April 5 2015*
* Improve behavior of group Animation playback rate.
* Rename Animation to KeyframeEffect.
* Rename AnimationSequence to SequenceEffect.
* Rename AnimationGroup to GroupEffect.
* Rename AnimationPlayer to Animation.
* Remove KeyframeEffect.effect and add KeyframeEffect.getFrames.
* Rename Animation.source to Animation.effect.
* Rename Timeline.getAnimationPlayers to Timeline.getAnimations.
* Rename Element.getAnimationPlayers to Element.getAnimations.
### 1.0.7 - *March 10 2015*
* Improve performance of constructing groups and sequences.
* Remove support for animating zoom.
* Add bower file.
### 1.0.6 - *February 5 2015*
* Implement playbackRate setter for group players.
* Fix pausing a group player before its first tick.
* Fix cancelling a group player before its first tick.
* Fix excess CPU use on idle pages where custom effects and groups were used.
* Suppress AnimationTiming.playbackRate deprecation warning for cases where AnimationTiming.playbackRate == 1.
### 1.0.5 - *January 6 2015*
* Fix loading the polyfill in an SVG document
* Fix a problem where groups didn't take effect in their first frame
* Don't rely on performance.now
### 1.0.4 - *December 8 2014*
* Fix a critical bug where deprecation logic wasn't being loaded
when `web-animations-next` and `web-animations-next-lite` were
executed on top of a native `element.animate`.
### 1.0.3 - *December 4 2014*
* Fix a critical bug on iOS 7 and Safari <= 6. Due to limitations,
inline style patching is not supported on these platforms.
### 1.0.2 - *November 28 2014*
* Deprecated `AnimationTiming.playbackRate`.
For example, this is no longer supported:
var player = element.animate(
keyframes,
{duration: 1000, playbackRate: 2});
Use `AnimationPlayer.playbackRate` instead:
var player = element.animate(
keyframes,
{duration: 1000});
player.playbackRate = 2;
If you have any feedback on this change, please start a discussion
on the public-fx mailing list:
http://lists.w3.org/Archives/Public/public-fx/
Or file an issue against the specification on GitHub:
https://github.com/w3c/web-animations/issues/new
### 1.0.1 - *November 26 2014*
* Players should be constructed in idle state
* `play()` and `reverse()` should not force a start times
* Add `requestAnimationFrame` ids and `cancelAnimationFrame`
### 1.0.0 — *November 21 2014*
The web-animations-js hackers are pleased to announce the release of
a new codebase for the Web Animations Polyfill:
https://github.com/web-animations/web-animations-js
The previous polyfill has been moved to:
https://github.com/web-animations/web-animations-js-legacy
The new codebase is focused on code-size -- our smallest target is
now only 33kb or 11kb after gzip.
We've implemented native fallback. If the target browser provides
Web Animations features natively, the Polyfill will use them.
We now provide three different build targets:
`web-animations.min.js` - Tracks the Web Animations features that
are supported natively in browsers. Today that means Element.animate
and Playback Control in Chrome. If you’re not sure what features you
will need, start with this.
`web-animations-next.min.js` - All of web-animations.min.js plus
features that are still undergoing discussion or have yet to be
implemented natively.
`web-animations-next-lite.min.js` - A cut down version of
web-animations-next, removes several lesser used property handlers
and some of the larger and less used features such as matrix
interpolation/decomposition.
Not all features of the previous polyfill have been ported to the
new codebase; most notably mutation of Animations and Groups and
Additive Animations are not yet supported. These features are still
important and will be implemented in the coming weeks.
Quick Start
-----------
To provide native Chrome Web Animation features (`Element.animate` and Playback
Control) in other browsers, use `web-animations.min.js`. To explore all of the
proposed Web Animations API, use `web-animations-next.min.js`.
What is Web Animations?
-----------------------
Web Animations is a new JavaScript API for driving animated content on the web.
By unifying the animation features of SVG and CSS, Web Animations unlocks
features previously only usable declaratively, and exposes powerful,
high-performance animation capabilities to developers.
For more details see the
[W3C specification](http://w3c.github.io/web-animations/).
What is the polyfill?
---------------------
The polyfill is a JavaScript implementation of the Web Animations API. It is
supported on modern versions of all major browsers, including:
* Chrome
* Firefox 27+
* IE10+ (including Edge)
* Safari (iOS) 7.1+
* Safari (Mac) 9+
Getting Started
---------------
Here's a simple example of an animation that scales and changes the opacity of
a `<div>` over 0.5 seconds. The animation alternates producing a pulsing
effect.
```html
<script src="web-animations.min.js"></script>
<div class="pulse" style="width:150px;">Hello world!</div>
<script>
var elem = document.querySelector('.pulse');
var animation = elem.animate([
{opacity: 0.5, transform: "scale(0.5)"},
{opacity: 1.0, transform: "scale(1)"}
], {
direction: 'alternate',
duration: 500,
iterations: Infinity
});
</script>
```
Web Animations supports off-main-thread animations, and also allows procedural
generation of animations and fine-grained control of animation playback. See
<http://web-animations.github.io> for ideas and inspiration - or [web-animations-codelabs](https://github.com/web-animations/web-animations-codelabs).
Native Fallback
---------------
When the polyfill runs on a browser that implements `Element.animate` and
`Animation` Playback Control it will detect and use the underlying native
features.
Different Build Targets
-----------------------
### web-animations.min.js
Tracks the Web Animations features that are supported natively in browsers.
Today that means Element.animate and Playback Control in Chrome. If you’re not
sure what features you will need, start with this.
### web-animations-next.min.js
Contains all of web-animations.min.js plus features that are still undergoing
discussion or have yet to be implemented natively.
### web-animations-next-lite.min.js
A cut down version of web-animations-next, it removes several lesser used
property handlers and some of the larger and less used features such as matrix
interpolation/decomposition.
### Build Target Comparison
| | web-animations | web-animations-next | web-animations-next-lite |
|------------------------|:--------------:|:-------------------:|:------------------------:|
|Size (gzipped) | 15KB | 18KB | 15KB |
|Element.animate | ✔ | ✔ | ✔ |
|Timing input (easings, duration, fillMode, etc.) for animation effects| ✔ | ✔ | ✔ |
|Playback control | ✔ | ✔ | ✔ |
|Support for animating lengths, transforms and opacity| ✔ | ✔ | ✔ |
|Support for animating other CSS properties| ✔ | ✔ | 🚫 |
|Matrix fallback for transform animations | ✔ | ✔ | 🚫 |
|KeyframeEffect constructor | 🚫 | ✔ | ✔ |
|Simple GroupEffects & SequenceEffects | 🚫 | ✔ | ✔ |
|Custom Effects | 🚫 | ✔ | ✔ |
|Timing input (easings, duration, fillMode, etc.) for groups</div>| 🚫 | 🚫\* | 🚫 |
|Additive animation | 🚫\* | 🚫\* | 🚫 |
|Motion path | 🚫\* | 🚫\* | 🚫 |
|Modifiable keyframe effect timing| 🚫 | 🚫\* | 🚫\* |
|Modifiable group timing | 🚫 | 🚫\* | 🚫\* |
|Usable inline style\*\* | ✔ | ✔ | 🚫 |
\* support is planned for these features.
\*\* see inline style caveat below.
Caveats
-------
Some things won’t ever be faithful to the native implementation due to browser
and CSS API limitations. These include:
### Inline Style
Inline style modification is the mechanism used by the polyfill to animate
properties. Both web-animations and web-animations-next incorporate a module
that emulates a vanilla inline style object, so that style modification from
JavaScript can still work in the presence of animations. However, to keep the
size of web-animations-next-lite as small as possible, the style emulation
module is not included. When using this version of the polyfill, JavaScript
inline style modification will be overwritten by animations.
Due to browser constraints inline style modification is not supported on iOS 7
or Safari 6 (or earlier versions).
### Prefix handling
The polyfill will automatically detect the correctly prefixed name to use when
writing animated properties back to the platform. Where possible, the polyfill
will only accept unprefixed versions of experimental features. For example:
```js
var effect = new KeyframeEffect(elem, {"transform": "translate(100px, 100px)"}, 2000);
```
will work in all browsers that implement a conforming version of transform, but
```js
var effect = new KeyframeEffect(elem, {"-webkit-transform": "translate(100px, 100px)"}, 2000);
```
will not work anywhere.
API and Specification Feedback
------------------------------
File an issue on GitHub: <https://github.com/w3c/web-animations/issues/new>.
Alternatively, send an email to <public-fx@w3.org> with subject line
“[web-animations] … message topic …”
([archives](http://lists.w3.org/Archives/Public/public-fx/)).
Polyfill Issues
---------------
Report any issues with this implementation on GitHub:
<https://github.com/web-animations/web-animations-next/issues/new>.
Breaking changes
----------------
When we make a potentially breaking change to the polyfill's API
surface (like a rename) we will, where possible, continue supporting the
old version, deprecated, for three months, and ensure that there are
console warnings to indicate that a change is pending. After three
months, the old version of the API surface (e.g. the old version of a
function name) will be removed. *If you see deprecation warnings you
can't avoid it by not updating*.
We also announce anything that isn't a bug fix on
[web-animations-changes@googlegroups.com](https://groups.google.com/forum/#!forum/web-animations-changes).
{
"name": "web-animations-js",
"description": "JavaScript implementation of the Web Animations API",
"homepage": "https://github.com/web-animations/web-animations-js",
"main": "web-animations.min.js",
"moduleType": [
"globals"
],
"keywords": [
"animations",
"polyfill"
],
"license": "Apache-2.0",
"ignore": [
"**/.*",
"node_modules",
"templates",
"test",
"src",
"Gruntfile.js",
"package.json",
"target-config.js",
"target-loader.js",
"web-animations.dev.html",
"web-animations.dev.js",
"web-animations-next.dev.html",
"web-animations-next.dev.js",
"web-animations-next-lite.dev.html",
"web-animations-next-lite.dev.js"
]
}
<!--
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- WARNING: This file is DEPRECATED, for development purposes use
web-animations*.dev.html instead or depend on
web-animations*.min.js in the web-animations-js
repository -->
<script src="src/dev.js"></script>
<script src="src/scope.js"></script>
<script src="src/deprecation.js"></script>
<script src="src/timing-utilities.js"></script>
<script src="src/normalize-keyframes.js"></script>
<script src="src/animation-node.js"></script>
<script src="src/effect.js"></script>
<script src="src/property-interpolation.js"></script>
<script src="src/animation.js"></script>
<script src="src/apply.js"></script>
<script src="src/element-animatable.js"></script>
<script src="src/interpolation.js"></script>
<script src="src/player.js"></script>
<script src="src/tick.js"></script>
<script src="src/handler-utils.js"></script>
<script src="src/shadow-handler.js"></script>
<script src="src/number-handler.js"></script>
<script src="src/visibility-handler.js"></script>
<script src="src/color-handler.js"></script>
<script src="src/dimension-handler.js"></script>
<script src="src/box-handler.js"></script>
<script src="src/transform-handler.js"></script>
<script src="src/property-names.js"></script>
<script src="src/timeline.js"></script>
<script src="src/maxifill-player.js"></script>
<script src="src/animation-constructor.js"></script>
<script src="src/effect-callback.js"></script>
<script src="src/group-constructors.js"></script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment